[
  {
    "path": ".gitignore",
    "content": "*.class\n.classpath\n.project\ntarget/\n*.swp\n*.pyc\n"
  },
  {
    "path": "LICENSE",
    "content": "\n                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright [yyyy] [name of copyright owner]\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License."
  },
  {
    "path": "deploy/README",
    "content": "Files related to deploying Sparrow.\n\nThe ec2 directory contains files for deploying Sparrow on ec2. The Sparrow\nAMI is not yet public, so it is not currently possible for external users to\nuse these scripts. Contact us is this is a problem for you.\n\nIf you'd like to deploy Sparrow on your own cluster, you'll need to\ndo a few things:\n1) Download Sparrow:\n$ git clone git://github.com/radlab/sparrow.git\n2) Build Sparrow:\n$ cd sparrow\n$ mvn package\n3) Write a configuration file and copy the file to all machines. Currently,\neach Sparrow scheduler needs a configuration file that gives a list of where\nall of the Sparrow node monitors (worker machines) are running.\nSee sparrow_configuration_example.conf to get started; see\ndaemon/SparrowConf.java for a full list of options.\n4) Start Sparrow on all machines (both schedulers and node monitors). Starting\nSparrow runs both a scheduler and a node monitor on the machine. Using\nthe concurrent mark and sweep garbage collector is highly recommended -- the GC\npauses using other gargabge collectors become significant when running\nsub-second tasks). Change the class path to reflect the location where you\nbuilt Sparrow, and replace \"sparrow.conf\" with the location of the\ncongiguration file you wrote above.\n$ java -XX:+UseConcMarkSweepGC -cp target/sparrow-1.0-SNAPSHOT.jar edu.berkeley.sparrow.daemon.SparrowDaemon -c sparrow.conf\n5) Start your application executor on all backends. To use the prototype\nbackend, which can run either CPU-intensive or memory-intensive tasks for\nsome period of time:\n$ java -cp target/sparrow-1.0-SNAPSHOT.jar edu.berkeley.sparrow.prototype.ProtoBackend\n6) Start a frontend that submits scheduling requests to Sparrow. The current\nimplementation assumes that there is a scheduler running on the same\nmachine where the frontend is started, so frontends should only be started\non machines where Sparrow is running.\n$ java -cp target/sparrow-1.0-SNAPSHOT.jar edu.berkeley.sparrow.prototype.ProtoFrontend\n\nThe frontend accepts a configuration file (by adding \"-c conf_file\" when\nstarting the frontend) where you can specify various configuration options to\nsubmit different types of jobs (e.g., with different numbers of tasks,\nof different duration, etc.), described in prototype/ProtoFrontend.java.\n\n"
  },
  {
    "path": "deploy/ec2/README",
    "content": "This script automates the deployment of a Sparrow cluster on ec2. To use it:\n\n1) Get an ec2 account.\n\n2) Get your access key ID and value from ec2. You need to have these available\n   in environment variables AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY\n   respectively.\n\n3) Generate a key-pair in the AWS control panel in the \"US East\" datacenter.\n\n4) Run ./ec2_exp.sh --help to see how the script works.\n\n   The basic workflow would is usually like this.\n   # Launch instances\n   ./ec2-exp.sh launch -k eastkey -i ~/.ssh/eastkey.pem\n\n   # Deploy Sparrow files, waiting 100 seconds for instances to boot before\n   # attempting to contact them. It will also set the job rate to 10 jobs/s\n   # on each frontend (-l 10). This will generate config files and send\n   # them to all machines.\n   ./ec2-exp.sh deploy -i ~/.ssh/eastkey.pem -w 100 -l 10\n\n   # Start Sparrow\n   ./ec2-exp.sh start -i ~/.ssh/eastkey.pem\n\n   # Start proto application\n   ./ec2-exp.sh start-proto -i ~/.ssh/eastkey.pem\n\n   # Stop proto application\n   ./ec2-exp.sh stop-proto -i ~/.ssh/eastkey.pem\n\n   # Stop Sparrow\n   ./ec2-exp.sh stop -i ~/.ssh/eastkey.pem\n\nNOTE:\nRight now if you start and stop the proto application while keeping Sparrow\nrunning (i.e. you don't also restart Sparrow) things break. You will get a\nconfusing Thrift error if you do this.\n\nIf you'd like to run the full TPC-H experiment, you need to run two scripts:\n1) prepare_tpch_experiments.sh <num_frontends> <num_backends>:\nThis script launches the given number of frontend and backend machines,\nand loads the TPCH data into HDFS and then into Shark.\n\n2) tpch_experiments.sh:\nThis runs the TPCH experiments and can be executed multiple times after\nthe prepare_tpch_experiments.sh script has been run.\n"
  },
  {
    "path": "deploy/ec2/ec2-exp.sh",
    "content": "#!/bin/sh\n\n#\n# Copyright 2013 The Regents of The University California\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#   http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n\ncd \"`dirname $0`\"\nPYTHONPATH=\"$PYTHONPATH:../third_party/boto-2.1.1\" python ./ec2_exp.py $@\n"
  },
  {
    "path": "deploy/ec2/ec2_exp.py",
    "content": "#\n# Copyright 2013 The Regents of The University California\n# \n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n# \n#   http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n\nimport boto\nimport os\nimport sys\nimport tempfile\nimport time\nimport subprocess\nimport shutil\nimport random\n\nfrom optparse import OptionParser\n\n\ndef parse_args(force_action=True):\n  parser = OptionParser(usage=\"sparrow-exp <action> <cluster> [options]\" +\n    \"\\n\\n<action> can be: launch, deploy, start-sparrow, stop-sparrow, start-proto, stop-proto, start-hdfs, stop-hdfs, start-sparrow-throughput, start-spark-shark, stop-spark, restart-spark-shark, command, collect-logs, destroy, login-fe, login-be, create-database, create-tpch-tables, start-shark-tpch\")\n  parser.add_option(\"-z\", \"--zone\", default=\"us-east-1d\",\n      help=\"Availability zone to launch instances in\")\n  parser.add_option(\"-a\", \"--ami\", default=\"ami-533a733a\",\n      help=\"Amazon Machine Image ID to use (use ami-894801e0 for HVM instance types)\")\n  parser.add_option(\"-t\", \"--instance-type\", default=\"m2.2xlarge\",\n      help=\"Type of instance to launch (default: m2.2xlarge). \" +\n           \"WARNING: must be 64 bit, thus small instances won't work\")\n  parser.add_option(\"-l\", \"--arrival-rate\", type=\"float\", default=1,\n      help = \"Arrival rate of jobs in proto frontends (jobs/s)\")\n  parser.add_option(\"-k\", \"--key-pair\",\n      help=\"Key pair to use on instances\")\n  parser.add_option(\"-i\", \"--identity-file\",\n      help=\"SSH private key file to use for logging into instances\")\n  parser.add_option(\"-f\", \"--frontends\", type=\"int\", default=1,\n      help=\"Number of frontends to launch (default: 1)\")\n  parser.add_option(\"-b\", \"--backends\", type=\"int\", default=1,\n      help=\"Number of backends to launch (default: 1)\")\n  parser.add_option(\"-w\", \"--wait\", type=\"int\", default=0,\n      help=\"Number of seconds to wait for cluster nodes to boot (default: 0)\")\n  parser.add_option(\"-g\", \"--branch\", default=\"master\",\n      help=\"Which git branch to checkout\")\n  parser.add_option(\"-s\", \"--spark-branch\", default=\"sparrow\",\n      help=\"Which git branch to checkout (for spark)\")\n  parser.add_option(\"-d\", \"--log-dir\", default=\"/tmp/\",\n      help=\"Local directory into which log files are copied\")\n  parser.add_option(\"-n\", \"--tasks-per-job\", type=\"int\", default=1,\n      help=\"Number of tasks to launch for each job in prototype\")\n  parser.add_option(\"-x\", \"--num-preferred-nodes\", type=\"int\", default=0,\n      help=\"Number of preferred nodes to use in the prototype frontend (0 means unconstrained)\")\n  parser.add_option(\"-c\", \"--benchmark-id\", type=\"int\", default=1,\n      help=\"Which benchmark to run\")\n  parser.add_option(\"-e\", \"--benchmark-iterations\", type=\"int\", default=100,\n      help=\"Iterations of benchmark to run\")\n  parser.add_option(\"-p\", \"--sample-ratio\", type=\"float\", default=2,\n      help=\"Sample ratio for unconstrained tasks\")\n  parser.add_option(\"-q\", \"--sample-ratio-constrained\", type=int, default=2,\n      help=\"Sample ratio for constrained tasks\")\n  parser.add_option(\"-y\", \"--kill-delay\", type=\"int\", default=1,\n      help=\"Time to wait between killing backends and frontends\")\n  parser.add_option(\"-v\", \"--inter-query-delay\", type=\"int\", default=100,\n      help=\"How many ms to wait between shark queries\")\n  parser.add_option(\"-m\", \"--scheduler\", type=\"string\", default=\"sparrow\",\n      help=\"Which scheduler to use for running spark (mesos/sparrow)\")\n  parser.add_option(\"--spot-price\", type=\"float\", default=None,\n      help=\"If specified, launch slaves as spot instances with the given \" +\n            \"maximum price (in dollars). To see current spot prices, visit \"\n            \"http://aws.amazon.com/ec2/spot-instances/#7\")\n  parser.add_option(\"--cpus\", type=\"int\", default=4,\n      help=\"Number of cpus on the machine, used to determine how many concurrent tasks \"\n           \"to run\")\n  parser.add_option(\"--frontend-type\", type=\"string\", default=\"ProtoFrontend\",\n      help=\"Classname (not fully qualified!) of the frontend to use\")\n  parser.add_option(\"-r\", \"--parallelism\", type=\"int\", default=8,\n      help=\"Level of parallelism for dummy queries.\")\n  parser.add_option(\"-u\", \"--num_partitions\", type=\"int\", default=1,\n      help=\"Number of partitions for shark tables.\")\n  parser.add_option(\"--reduce-tasks\", type=\"int\", default=5,\n      help=\"Number of reduce tasks to use for Shark queries.\")\n  parser.add_option(\"--spark-backend-mem\", default=\"2g\",\n      help=\"Amount of memory to give spark backends.\"),\n  parser.add_option(\"--scale-factor\", default=\"2.5\",\n      help=\"Scale factor to use when creating TPCH database (used with create-database)\")\n  parser.add_option(\"--total-cores\", default=\"200\",\n      help=\"Total number of cores in the cluster (used to determine launch rate for \"\n           \"throughput experiments)\")\n\n  (opts, args) = parser.parse_args()\n  if len(args) < 2 and force_action:\n    parser.print_help()\n    sys.exit(1)\n  if os.getenv('AWS_ACCESS_KEY_ID') == None:\n    print >> sys.stderr, (\"ERROR: The environment variable AWS_ACCESS_KEY_ID \" +\n                          \"must be set\")\n    sys.exit(1)\n  if os.getenv('AWS_SECRET_ACCESS_KEY') == None:\n    print >> sys.stderr, (\"ERROR: The environment variable \" +\n                          \"AWS_SECRET_ACCESS_KEY must be set\")\n    sys.exit(1)\n\n  return (opts, args)\n\n# Get the EC2 security group of the given name, creating it if it doesn't exist\ndef get_or_make_group(conn, name):\n  groups = conn.get_all_security_groups()\n  group = [g for g in groups if g.name == name]\n  if len(group) > 0:\n    return group[0]\n  else:\n    print \"Creating security group \" + name\n    return conn.create_security_group(name, \"Sparrow EC2 group\")\n\n# Copy a file to a given host through scp, throwing an exception if scp fails\ndef scp(host, opts, local_file, dest_file):\n  subprocess.check_call(\n      \"scp -q -o StrictHostKeyChecking=no -i %s '%s' 'root@%s:%s'\" %\n      (opts.identity_file, local_file, host, dest_file), shell=True)\n\n# Copy a file from a given host through scp, throwing an exception if scp fails\ndef scp_from(host, opts, dest_file, local_file):\n  subprocess.check_call(\n      \"scp -q -o StrictHostKeyChecking=no -i %s 'root@%s:%s' '%s'\" %\n      (opts.identity_file, host, dest_file, local_file), shell=True)\n\ndef rsync_from_all(hosts, opts, dest_pattern, local_dir, errors=0):\n  commands = []\n  for host in hosts:\n    cmd = \"rsync -rv -e 'ssh -o StrictHostKeyChecking=no -i %s' root@%s: --include=\\\"%s\\\" --exclude=\\\"*\\\" %s\" % (\n      opts.identity_file, host, dest_pattern, local_dir)\n    commands.append(cmd)\n  parallel_commands(commands, errors)\n\n\n# Execute a sequence of commands in parallel, raising an exception if\n# more than tolerable_failures of them fail\ndef parallel_commands(commands, tolerable_failures):\n  processes = {} # popen object --> command string\n  failures = []\n  for c in commands:\n    p = subprocess.Popen(c, shell=True, stdout = subprocess.PIPE,\n                         stderr = subprocess.PIPE, stdin=subprocess.PIPE)\n    processes[p] = c\n  for p in processes.keys():\n    (stdout, stderr) = p.communicate()\n    if p.poll() != 0:\n      failures.append((stdout, stderr, processes[p]))\n    print stdout\n\n  if len(failures) > tolerable_failures:\n    out = \"Parallel commands failed:\\n\"\n    for (stdout, stderr, cmd) in failures:\n      out = out + \"command:\\n%s\\nstdout\\n%sstderr\\n%s\\n\" %  \\\n        (cmd, stdout, stderr)\n    raise Exception(out)\n\n# Run a command on a host through ssh, throwing an exception if ssh fails\ndef ssh(host, opts, command):\n  subprocess.check_call(\n      \"ssh -t -o StrictHostKeyChecking=no -i %s root@%s '%s'\" %\n      (opts.identity_file, host, command), shell=True)\n\n# Run a command on multiple hosts through ssh, throwing an exception on failure\ndef ssh_all(hosts, opts, command):\n  commands = []\n  for host in hosts:\n    cmd = \"ssh -t -o StrictHostKeyChecking=no -i %s root@%s '%s'\" % \\\n      (opts.identity_file, host, command)\n    commands.append(cmd)\n  parallel_commands(commands, 0)\n\n# Launch a cluster and return instances launched\ndef launch_cluster(conn, opts, cluster_name):\n  backend_group = get_or_make_group(conn, \"%s-backends\" % cluster_name)\n  frontend_group = get_or_make_group(conn, \"%s-frontends\" % cluster_name)\n  groups = [backend_group, frontend_group]\n\n  for group in groups:\n    if group.rules == []: # Group was now just created\n      # Allow all access from all other sparrow machines\n      for group2 in groups:\n        group.authorize(src_group=group2)\n      # Allow some access from all machines\n      group.authorize('tcp', 22, 22, '0.0.0.0/0')\n\n  print \"Launching instances...\"\n  try:\n    image = conn.get_all_images(image_ids=[opts.ami])[0]\n  except:\n    print >> sys.stderr, \"Could not find AMI \" + opts.ami\n    sys.exit(1)\n  if opts.spot_price != None:\n      # Launch spot instances with the requested price.\n      # The launch group ensures that the instances will be launched and\n      # terminated as a set.\n      launch_group_name = \"launch-group-%s\" % cluster_name\n      req_ids = []\n      if opts.frontends > 0:\n        print (\"Requesting %d frontends as spot instances with price $%.3f\" %\n            (opts.frontends, opts.spot_price))\n        frontend_reqs = conn.request_spot_instances(\n            price = opts.spot_price,\n            image_id = opts.ami,\n            launch_group = launch_group_name,\n            placement = opts.zone,\n            count = opts.frontends,\n            key_name = opts.key_pair,\n            security_groups = [frontend_group],\n            instance_type = opts.instance_type)\n\n        req_ids += [req.id for req in frontend_reqs]\n      if opts.backends > 0:\n        print (\"Requesting %d backends as spot instances with price $%.3f\" %\n            (opts.backends, opts.spot_price))\n        backend_reqs = conn.request_spot_instances(\n            price = opts.spot_price,\n            image_id = opts.ami,\n            launch_group = launch_group_name,\n            placement = opts.zone,\n            count = opts.backends,\n            key_name = opts.key_pair,\n            security_groups = [backend_group],\n            instance_type = opts.instance_type)\n        req_ids += [req.id for req in backend_reqs]\n\n      print \"Waiting for spot instances to be granted...\"\n      instances_requested = opts.frontends + opts.backends\n      try:\n        while True:\n          time.sleep(10)\n          # See if all the requests have been fulfilled.\n          reqs = conn.get_all_spot_instance_requests()\n          active_instance_ids = [r.instance_id for r in reqs\n                                 if r.id in req_ids and r.state == \"active\"]\n          if len(active_instance_ids) == instances_requested:\n            print \"All %d frontends and %d backends granted\" % (opts.frontends, opts.backends)\n            break\n          else:\n            print (\"%d of %d nodes granted; waiting longer\" %\n                   (len(active_instance_ids), instances_requested))\n      except:\n        print \"Canceling spot instance requests\"\n        conn.cancel_spot_instance_requests(req_ids)\n        (frontends, backends) = find_existing_cluster(conn, opts, cluster_name)\n        running = len(frontends) + len(backends)\n        if running:\n          print >> sys.stderr, (\"WARNING: %d instances are still running\" % running)\n        sys.exit(0)\n  else:\n    print \"ARE YOU SURE YOU DON'T WANT TO USE SPOT INSTANCES?\"\n    frontend_res = image.run(key_name = opts.key_pair,\n                            security_groups = [frontend_group],\n                            instance_type = opts.instance_type,\n                            placement = opts.zone,\n                            min_count = opts.frontends,\n                            max_count = opts.frontends)\n    backend_res = image.run(key_name = opts.key_pair,\n                            security_groups = [backend_group],\n                            instance_type = opts.instance_type,\n                            placement = opts.zone,\n                            min_count = opts.backends,\n                            max_count = opts.backends)\n\n    print \"Launched cluster with %s frontends and %s backends\" % (\n           opts.frontends, opts.backends)\n\n# Wait for a set of launched instances to exit the \"pending\" state\n# (i.e. either to start running or to fail and be terminated)\ndef wait_for_instances(instances):\n  while True:\n    for i in instances:\n      i.update()\n    if len([i for i in instances if i.state == 'pending']) > 0:\n      time.sleep(5)\n    else:\n      return\n\n# Check whether a given EC2 instance object is in a state we consider active,\n# i.e. not terminating or terminated. We count both stopping and stopped as\n# active since we can restart stopped clusters.\ndef is_active(instance):\n  return (instance.state in ['pending', 'running', 'stopping', 'stopped'])\n\n\ndef find_existing_cluster(conn, opts, cluster_name):\n  print \"Searching for existing Sparrow cluster...\"\n  reservations = conn.get_all_instances()\n  frontend_nodes = []\n  backend_nodes = []\n  for res in reservations:\n    active = [i for i in res.instances if is_active(i)]\n    if len(active) > 0:\n      group_names = [g.name for g in res.groups]\n      if group_names == [\"%s-frontends\" % cluster_name]:\n        frontend_nodes += res.instances\n      elif group_names == [\"%s-backends\" % cluster_name]:\n        backend_nodes += res.instances\n  if frontend_nodes != [] and backend_nodes != []:\n    print (\"Found %d frontend and %s backend nodes\" %\n           (len(frontend_nodes), len(backend_nodes)))\n\n    print \"Frontends:\"\n    frontend_nodes = filter(lambda k: k.public_dns_name != \"\", frontend_nodes)\n    for fe in frontend_nodes:\n      print fe.public_dns_name\n    print \"Backends:\"\n    backend_nodes = filter(lambda k: k.public_dns_name != \"\", backend_nodes)\n    for be in backend_nodes:\n      print be.public_dns_name\n\n    return (frontend_nodes, backend_nodes)\n  else:\n    print \"ERROR: Could not find full cluster named %s: fe=%s be=%s\" % (\n      cluster_name, frontend_nodes, backend_nodes)\n    sys.exit(1)\n\n\"\"\" Replaces all of the variables in the tempate files, based on opts.\n\nReturns the name of the directory with all of the files that need to be deployed.\n\"\"\"\ndef generate_deploy_files(frontends, backends, opts, warmup_job_arrival_s, warmup_s, post_warmup_s,\n                          nm_task_scheduler, users):\n  # Replace template vars\n  tmp_dir = tempfile.mkdtemp()\n\n  template_vars = {\n    \"frontend_list\": \"\\n\".join([\"%s\" % i.public_dns_name \\\n                                 for i in frontends]), \\\n    \"sparrow_schedulers\": \"\\n\".join([\"sparrow@%s:20503\" % i.private_ip_address \\\n                                      for i in frontends]), \\\n    \"static_backends\": \",\".join([\"%s:20502\" % i.public_dns_name \\\n                                 for i in backends]),\n    \"name_node\": frontends[0].public_dns_name,\n    \"backend_list\": \"\\n\".join([\"%s\" % i.public_dns_name \\\n                                 for i in backends]),\n    \"backend_comma_joined_list\": \",\".join([\"%s\" % i.public_dns_name \\\n                                           for i in backends]),\n    \"arrival_lambda\": \"%s\" % opts.arrival_rate,\n    \"git_branch\": \"%s\" % opts.branch,\n    \"spark_git_branch\": \"%s\" % opts.spark_branch,\n    \"benchmark_iterations\": \"%s\" % opts.benchmark_iterations,\n    \"benchmark_id\": \"%s\" % opts.benchmark_id,\n    \"tasks_per_job\": \"%s\" % opts.tasks_per_job,\n    \"num_preferred_nodes\": \"%s\" % opts.num_preferred_nodes,\n    \"sample_ratio\": \"%s\" % opts.sample_ratio,\n    \"sample_ratio_constrained\": \"%s\" % opts.sample_ratio_constrained,\n    \"warmup_job_arrival_rate_s\": \"%s\" % warmup_job_arrival_s,\n    \"warmup_s\": \"%s\" % warmup_s,\n    \"post_warmup_s\": \"%s\" % post_warmup_s,\n    \"node_monitor_task_scheduler\": \"%s\" % nm_task_scheduler,\n    \"num_partitions\": \"%s\" % opts.num_partitions,\n    \"reduce_tasks\": \"%s\" % (opts.reduce_tasks),\n    \"inter_query_delay\": \"%s\" % opts.inter_query_delay,\n    \"users\": users,\n    \"frontend_type\": opts.frontend_type,\n    \"cpus\": \"%s\" % opts.cpus,\n    \"total_cores\": \"%s\" % opts.total_cores,\n    \"spark_backend_mem\": \"%s\" % opts.spark_backend_mem\n  }\n\n  for dirpath, dirnames, filenames in os.walk(\"template\"):\n    rel_dir_path=dirpath.replace(\"template\", \"\")\n    if rel_dir_path.startswith(os.sep):\n      rel_dir_path = rel_dir_path[1:]\n    if rel_dir_path != \"\":\n      os.mkdir(os.path.join(tmp_dir, rel_dir_path))\n    for filename in filenames:\n      if filename[0] not in '#.~' and filename[-1] != '~':\n\tlocal_file = os.path.join(tmp_dir, rel_dir_path, filename)\n        with open(os.path.join(dirpath, filename)) as src:\n          with open(local_file, \"w\") as dest:\n            text = src.read()\n            for key in template_vars:\n\t      text = text.replace(\"{{\" + key + \"}}\", template_vars[key])\n\t    dest.write(text)\n\t    dest.close()\n  return tmp_dir\n\n# Deploy Sparrow configuration on a launched cluster (but don't rebuild).\ndef redeploy_sparrow(machines, frontends, backends, opts, warmup_job_arrival_s=0, warmup_s=0,\n                     post_warmup_s=0, nm_task_scheduler=\"fifo\",\n                     users=\"user0:1:0\"):\n  # Replace template vars\n  tmp_dir = generate_deploy_files(frontends, backends, opts, warmup_job_arrival_s, warmup_s,\n                                  post_warmup_s, nm_task_scheduler, users)\n\n  for machine in machines:\n    print \"Copying files to: %s ...\" % machine.public_dns_name\n\n    # Rsync this to one machine\n    command = ((\"rsync -rv -e 'ssh -o StrictHostKeyChecking=no -i %s' \" +\n        \"'%s/' 'root@%s:~/'\") % (opts.identity_file, tmp_dir, machine.public_dns_name))\n    subprocess.check_call(command, shell=True)\n\n# Deploy Sparrow binaries and configuration on a launched cluster\ndef deploy_cluster(frontends, backends, opts, warmup_job_arrival_s=0, warmup_s=0,\n                   post_warmup_s=0, nm_task_scheduler=\"fifo\",\n                   users=\"user0:1:0\"):\n  # Replace template vars\n  tmp_dir = generate_deploy_files(frontends, backends, opts, warmup_job_arrival_s, warmup_s,\n                                  post_warmup_s, nm_task_scheduler, users)\n\n  driver_machine = frontends[0].public_dns_name\n  print \"Chose driver machine: %s ...\" % driver_machine\n\n  # Rsync this to one machine\n  command = ((\"rsync -rv -e 'ssh -o StrictHostKeyChecking=no -i %s' \" +\n      \"'%s/' 'root@%s:~/'\") % (opts.identity_file, tmp_dir, driver_machine))\n  subprocess.check_call(command, shell=True)\n  # Remove the temp directory we created above\n  shutil.rmtree(tmp_dir)\n\n  print \"Copying SSH key %s to driver...\" % opts.identity_file\n  ssh(driver_machine, opts, 'mkdir -p /root/.ssh')\n  scp(driver_machine, opts, opts.identity_file, '/root/.ssh/id_rsa')\n\n  print \"Building sparrow on driver machine...\"\n  ssh(driver_machine, opts, \"chmod 755 /root/*.sh;\"\n                            \"/root/build_sparrow.sh;\")\n\n  print \"Deploying sparrow to other machines...\"\n  ssh(driver_machine, opts, \"/root/deploy_sparrow.sh\")\n\ndef start_sparrow_throughput(frontends, backends, opts):\n  start_sparrow(frontends, backends, opts)\n  start_spark_shark(frontends, backends, opts)\n  ssh_all([fe.public_dns_name for fe in frontends], opts, \"/root/start_throughput_exp_sparrow.sh\")\n\ndef start_sparrow(frontends, backends, opts):\n  all_machines = []\n  for fe in frontends:\n    all_machines.append(fe.public_dns_name)\n  for be in backends:\n    all_machines.append(be.public_dns_name)\n\n  print \"Starting sparrow on all machines...\"\n  ssh_all(all_machines, opts, \"/root/start_sparrow.sh;\")\n\ndef stop_sparrow(frontends, backends, opts):\n  all_machines = []\n  for fe in frontends:\n    all_machines.append(fe.public_dns_name)\n  for be in backends:\n    all_machines.append(be.public_dns_name)\n  print \"Stopping sparrow on all machines...\"\n  ssh_all(all_machines, opts, \"/root/stop_sparrow.sh;\")\n\ndef start_mesos(frontends, backends, opts):\n  print \"Starting mesos master...\"\n  ssh(frontends[0].public_dns_name, opts, \"/root/start_mesos_master.sh;\")\n  print \"Starting mesos slaves...\"\n  ssh_all([be.public_dns_name for be in backends],\n           opts, \"/root/start_mesos_slave.sh\")\n\ndef stop_mesos(frontends, backends, opts):\n  print \"Stopping mesos slaves...\"\n  ssh_all([be.public_dns_name for be in backends],\n          opts, \"/root/stop_mesos_slave.sh\")\n  print \"Stopping mesos master...\"\n  ssh(frontends[0].public_dns_name, opts, \"/root/stop_mesos_master.sh\")\n\n\n\"\"\" Starts spark backends only to allow shark shell to launch. \"\"\"\ndef start_spark_shark(frontends, backends, opts):\n  if opts.scheduler != \"sparrow\":\n    print \"ERROR: shark only supported w/ sparrow scheduler\"\n    return\n  print \"Starting Spark backends...\"\n  ssh_all([be.public_dns_name for be in backends], opts,\n          \"/root/start_spark_backend.sh\")\n\ndef stop_spark(frontends, backends, opts):\n  print \"Stopping spark frontends...\"\n  ssh_all([fe.public_dns_name for fe in frontends], opts,\n          \"/root/stop_spark_frontend.sh\")\n  time.sleep(opts.kill_delay)\n  print \"Stopping spark backends...\"\n  ssh_all([be.public_dns_name for be in backends], opts,\n         \"/root/stop_spark_backend.sh\")\n\ndef start_hdfs(frontends, backends, opts):\n  print \"Starting HDFS\"\n  ssh(frontends[0].public_dns_name, opts,\n      'HADOOP_SSH_OPTS=\"-o StrictHostKeyChecking=no\" /opt/hadoop/bin/start-dfs.sh')\n\ndef stop_hdfs(frontends, backends,opts):\n  print \"Stopping HDFS\"\n  ssh(frontends[0].public_dns_name, opts,\n      'HADOOP_SSH_OPTS=\"-o StrictHostKeyChecking=no\" /opt/hadoop/bin/stop-dfs.sh')\n\n# Start the prototype backends/frontends\ndef start_proto(frontends, backends, opts):\n  print \"Starting Proto backends...\"\n  ssh_all([be.public_dns_name for be in backends], opts,\n         \"/root/start_proto_backend.sh\")\n  print \"Starting Proto frontends...\"\n  ssh_all([fe.public_dns_name for fe in frontends], opts,\n          \"/root/start_proto_frontend.sh\")\n\n# Start the prototype backends/frontends\ndef stop_proto(frontends, backends, opts):\n  print \"Stopping Proto frontends...\"\n  ssh_all([fe.public_dns_name for fe in frontends], opts,\n          \"/root/stop_proto_frontend.sh\")\n  time.sleep(opts.kill_delay)\n  print \"Stopping Proto backends...\"\n  ssh_all([be.public_dns_name for be in backends], opts,\n         \"/root/stop_proto_backend.sh\")\n\ndef create_database(frontends, opts):\n  scale_factor = opts.scale_factor\n  print \"Creating TPCH database in HDFS on primary node with scale factor \" + scale_factor\n  ssh(frontends[0].public_dns_name, opts,\n      \"/root/create_database.sh %s\" % scale_factor)\n\ndef create_tpch_tables(frontends, backends, opts):\n  print \"Creating tables on primary node (takes longer)\"\n  ssh(frontends[0].public_dns_name, opts, \n      \"/root/create_tpch_tables_primary.sh\")\n \n  print \"Creating table on other nodes\"\n  ssh_all([fe.public_dns_name for fe in frontends[1:]], opts,\n      \"/root/create_tpch_tables_secondary.sh\")\n\ndef start_shark_tpch(frontends, backends, opts):\n  print \"Starting Shark/TPCH workloads\"\n  ssh_all([fe.public_dns_name for fe in frontends], opts,\n          \"/root/start_shark_tpch.sh\")\n\n# Collect logs from all machines\ndef collect_logs(frontends, backends, opts):\n  print \"Zipping logs...\"\n  ssh_all([fe.public_dns_name for fe in frontends], opts,\n          \"/root/prepare_logs.sh\")\n  ssh_all([be.public_dns_name for be in backends], opts,\n          \"/root/prepare_logs.sh\")\n  print \"Hauling logs\"\n  rsync_from_all([fe.public_dns_name for fe in frontends], opts,\n    \"*.log.gz\", opts.log_dir, len(frontends))\n  rsync_from_all([be.public_dns_name for be in backends], opts,\n    \"*.log.gz\", opts.log_dir, len(backends))\n#  f = open(os.path.join(opts.log_dir, \"params.txt\"), 'w')\n#  for (k, v) in opts.__dict__.items():\n#    f.write(\"%s\\t%s\\n\" % (k, v))\n#  f.close()\n\n  ssh_all([fe.public_dns_name for fe in frontends], opts,\n          \"rm -f /tmp/*audit*.log.gz; mv /root/*log.gz /tmp;\")\n  ssh_all([be.public_dns_name for be in backends], opts,\n          \"rm -f /tmp/*audit*.log.gz; mv /root/*log.gz /tmp;\")\n\n# Tear down a cluster\ndef destroy_cluster(frontends, backends, opts):\n  response = raw_input(\"Are you sure you want to destroy the cluster \" +\n    \"?\\nALL DATA ON ALL NODES WILL BE LOST!!\\n\" +\n    \"Destroy cluster (y/N): \")\n\n  if response == \"y\":\n    print \"Terminating frontends\"\n    for fe in frontends:\n      fe.terminate()\n    print \"Terminating backends\"\n    for be in backends:\n      be.terminate()\n\n# Execute a shell command on all machines\ndef execute_command(frontends, backends, opts, cmd):\n  ssh_all([fe.public_dns_name for fe in frontends], opts, cmd)\n  ssh_all([be.public_dns_name for be in backends], opts, cmd)\n\n# Login to a random frontend\ndef login_frontend(frontends, backends, opts):\n  node = frontends[0].public_dns_name\n  print \"Logging into a frontend \" + node\n  subprocess.check_call(\"ssh -o StrictHostKeyChecking=no -i %s root@%s\" %\n    (opts.identity_file, node), shell=True)\n\n# Login to a random backend\ndef login_backend(frontends, backends, opts):\n  node = backends[0].public_dns_name\n  print \"Logging into a backend \" + node\n  subprocess.check_call(\"ssh -o StrictHostKeyChecking=no -i %s root@%s\" %\n    (opts.identity_file, node), shell=True)\n\ndef main():\n  (opts, args) = parse_args()\n  conn = boto.connect_ec2()\n  action = args[0]\n  cluster = args[1]\n\n  if action == \"launch\":\n    launch_cluster(conn, opts, cluster)\n    return\n\n  if action == \"command\" and len(args) < 3:\n    print \"Command action requires command string\"\n\n  # Wait until ec2 says the cluster is started, then possibly wait more time\n  # to make sure all nodes have booted.\n  (frontends, backends) = find_existing_cluster(conn, opts, cluster)\n  print \"Waiting for instances to start up\"\n  wait_for_instances(frontends)\n  wait_for_instances(backends)\n\n  print \"Waiting %d more seconds...\" % opts.wait\n  time.sleep(opts.wait)\n\n  print \"Executing action: %s\" % action\n\n  if action == \"command\":\n    cmd = \" \".join(args[2:])\n    execute_command(frontends, backends, opts, cmd)\n  elif action == \"deploy\":\n    deploy_cluster(frontends, backends, opts)\n  elif action == \"start-sparrow\":\n    start_sparrow(frontends, backends, opts)\n  elif action == \"stop-sparrow\":\n    stop_sparrow(frontends, backends, opts)\n  elif action == \"start-sparrow-throughput\":\n    # Starts a throughput testing experiment using Sparrow.\n    start_sparrow_throughput(frontends, backends, opts)\n  elif action == \"start-mesos\":\n    start_mesos(frontends, backends, opts)\n  elif action == \"stop-mesos\":\n    stop_mesos(frontends, backends, opts)\n  elif action == \"start-spark-shark\":\n    start_spark_shark(frontends, backends, opts)\n  elif action == \"stop-spark\":\n    stop_spark(frontends, backends, opts)\n  elif action == \"restart-spark-shark\":\n    stop_spark(frontends, backends, opts)\n    stop_sparrow(frontends, backends, opts)\n    start_sparrow(frontends, backends, opts)\n    start_spark_shark(frontends, backends, opts)\n  elif action == \"start-proto\":\n    start_proto(frontends, backends, opts)\n  elif action == \"stop-proto\":\n    stop_proto(frontends, backends, opts)\n  elif action == \"start-hdfs\":\n    start_hdfs(frontends, backends, opts)\n  elif action == \"stop-hdfs\":\n    stop_hdfs(frontends, backends, opts)\n  elif action == \"collect-logs\":\n    collect_logs(frontends, backends, opts)\n  elif action == \"destroy\":\n    destroy_cluster(frontends, backends, opts)\n  elif action == \"login-fe\":\n    login_frontend(frontends, backends, opts)\n  elif action == \"login-be\":\n    login_backend(frontends, backends, opts)\n  elif action == \"create-database\":\n    create_database(frontends, opts)\n  elif action == \"create-tpch-tables\":\n    create_tpch_tables(frontends, backends, opts)\n  elif action == \"start-shark-tpch\":\n    start_shark_tpch(frontends, backends, opts)\n  else:\n    print \"Unknown action: %s\" % action\n    sys.exit(1)\n\nif __name__ == \"__main__\":\n  main()\n"
  },
  {
    "path": "deploy/ec2/fairness.py",
    "content": "#\n# Copyright 2013 The Regents of The University California\n# \n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n# \n#   http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n\nimport boto\nimport os\nimport subprocess\nimport sys\nimport time\n\nimport ec2_exp\n\ndef run_cmd(cmd):\n    subprocess.check_call(cmd, shell=True)\n\ndef main(argv):\n    launch_instances = False\n    if len(argv) >= 1 and argv[0] == \"True\":\n        launch_instances = True\n\n    utilizations = [1.0]\n    sample_ratios = [2.0]\n    sample_ratio_constrained = 1\n\n    # Amount of time it takes each task to run in isolation\n    task_duration_ms = 100\n    tasks_per_job = 3\n    private_ssh_key = \"patkey.pem\"\n    sparrow_branch = \"master\"\n    num_backends = 100\n    num_frontends = 10\n    cores_per_backend = 4\n    # Run each trial for many minutes.\n    trial_length = 700\n    num_preferred_nodes = 0\n    nm_task_scheduler = \"round_robin\"\n    cluster_name = \"fairness\"\n\n    full_utilization_rate_s = (float(num_backends * cores_per_backend * 1000) /\n                               (task_duration_ms * tasks_per_job * num_frontends))\n\n    # Warmup information\n    warmup_s = 120\n    post_warmup_s = 30\n    warmup_arrival_rate_s = 0.4 * full_utilization_rate_s\n\n    if launch_instances:\n        print \"********Launching instances...\"\n        run_cmd(\"./ec2-exp.sh launch %s -f %s -b %s -i %s\" %\n                (cluster_name, num_frontends, num_backends, private_ssh_key))\n        time.sleep(10)\n\n    for sample_ratio in sample_ratios:\n        for utilization in utilizations:\n            arrival_rate_s = utilization * full_utilization_rate_s\n\n            # This is a little bit of a hacky way to pass args to the ec2 script.\n            (opts, args) = ec2_exp.parse_args(False)\n            opts.identity_file = private_ssh_key\n            opts.arrival_rate = arrival_rate_s\n            opts.branch = sparrow_branch\n            opts.sample_ratio  = sample_ratio\n            opts.sample_ratio_constrained = sample_ratio_constrained\n            opts.tasks_per_job = tasks_per_job\n            opts.num_preferred_nodes = num_preferred_nodes\n            opts.frontend_type = \"FairnessTestingFrontend\"\n\n            conn = boto.connect_ec2()\n            frontends, backends = ec2_exp.find_existing_cluster(conn, opts, cluster_name)\n\n            print (\"********Launching experiment at utilization %s with sample ratio %s...\" %\n                   (utilization, sample_ratio))\n\n            print (\"********Deploying with arrival rate %s and warmup arrival rate %s\"\n                   % (arrival_rate_s, warmup_arrival_rate_s))\n            #ec2_exp.deploy_cluster(frontends, backends, opts, warmup_arrival_rate_s, warmup_s,\n            #                       post_warmup_s, nm_task_scheduler)\n            ec2_exp.start_sparrow(frontends, backends, opts)\n\n            print \"*******Sleeping after starting Sparrow\"\n            time.sleep(10)\n            print \"********Starting prototype frontends and backends\"\n            ec2_exp.start_proto(frontends, backends, opts)\n            time.sleep(trial_length)\n\n            log_dirname = \"/Users/keo/Documents/opportunistic-scheduling/sparrow/deploy/ec2/fairness_%s_%s\" % (utilization, sample_ratio)\n            while os.path.exists(log_dirname):\n                log_dirname = \"%s_a\" % log_dirname\n            os.mkdir(log_dirname)\n\n            ec2_exp.execute_command(frontends, backends, opts, \"./find_bugs.sh\")\n\n            print \"********Stopping prototypes and Sparrow\"\n            ec2_exp.stop_proto(frontends, backends, opts)\n            ec2_exp.stop_sparrow(frontends, backends, opts)\n\n            print \"********Collecting logs and placing in %s\" % log_dirname\n            opts.log_dir = log_dirname\n            ec2_exp.collect_logs(frontends, backends, opts)\n            run_cmd(\"gunzip %s/*.gz\" % log_dirname)\n\n            print \"********Parsing logs\"\n            run_cmd((\"cd ../../src/main/python/ && ./parse_logs.sh log_dir=%s \"\n                     \"output_dir=%s/results start_sec=240 end_sec=540 && cd -\") %\n                    (log_dirname, log_dirname))\n\nif __name__ == \"__main__\":\n    main(sys.argv[1:])\n\n"
  },
  {
    "path": "deploy/ec2/fairness.sh",
    "content": "#!/bin/sh\n\n#\n# Copyright 2013 The Regents of The University California\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#   http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n\ncd \"`dirname $0`\"\nPYTHONPATH=\"$PYTHONPATH:../third_party/boto-2.1.1\" python ./fairness.py $@\n"
  },
  {
    "path": "deploy/ec2/isolation.py",
    "content": "#\n# Copyright 2013 The Regents of The University California\n# \n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n# \n#   http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n\nimport boto\nimport os\nimport subprocess\nimport sys\nimport time\n\nimport ec2_exp\n\ndef run_cmd(cmd):\n    subprocess.check_call(cmd, shell=True)\n\ndef main(argv):\n    launch_instances = False\n    if len(argv) >= 1 and argv[0] == \"True\":\n        launch_instances = True\n\n    utilization_user_pairs = [(0.25, \"high:1:0\"),\n                              (0.5, \"high:1:0,low:1:0\"),\n                              (0.75, \"high:1:0,low:2:0\"),\n                              (1.0, \"high:1:0,low:3:0\"),\n                              (1.25, \"high:1:0,low:4:0\"),\n                              (1.5, \"high:1:0,low:5:0\"),\n                              (1.75, \"high:1:0,low:6:0\"),\n                              (2.0, \"high:1:0,low:7:0\")]\n    sample_ratios = [2.0]\n    sample_ratio_constrained = 1\n\n    # Amount of time it takes each task to run in isolation\n    task_duration_ms = 100\n    tasks_per_job = 1\n    private_ssh_key = \"patkey.pem\"\n    sparrow_branch = \"debugging\"\n    num_backends = 5\n    num_frontends = 1\n    cores_per_backend = 4\n    # Run each trial for 5 minutes.\n    trial_length = 500\n    num_preferred_nodes = 0\n    nm_task_scheduler = \"priority\"\n    cluster_name = \"isolation\"\n\n    full_utilization_rate_s = (float(num_backends * cores_per_backend * 1000) /\n                               (task_duration_ms * tasks_per_job * num_frontends))\n\n    # Warmup information\n    warmup_s = 120\n    post_warmup_s = 30\n    warmup_arrival_rate_s = 0.4 * full_utilization_rate_s\n\n    if launch_instances:\n        print \"********Launching instances...\"\n        run_cmd((\"./ec2-exp.sh launch %s --ami ami-a658c0cf \" +\n                 \"--instance-type cr1.8xlarge --spot-price %s -f %s -b %s -i %s\") %\n                (cluster_name, 0.5, num_frontends, num_backends, private_ssh_key))\n        time.sleep(10)\n\n    for sample_ratio in sample_ratios:\n        for utilization, users in utilization_user_pairs:\n            arrival_rate_s = utilization * full_utilization_rate_s\n\n            # This is a little bit of a hacky way to pass args to the ec2 script.\n            (opts, args) = ec2_exp.parse_args(False)\n            opts.identity_file = private_ssh_key\n            opts.arrival_rate = arrival_rate_s\n            opts.branch = sparrow_branch\n            opts.sample_ratio  = sample_ratio\n            opts.sample_ratio_constrained = sample_ratio_constrained\n            opts.tasks_per_job = tasks_per_job\n            opts.num_preferred_nodes = num_preferred_nodes\n            opts.cpus = cores_per_backend\n\n            conn = boto.connect_ec2()\n            frontends, backends = ec2_exp.find_existing_cluster(conn, opts, cluster_name)\n\n            print (\"********Launching experiment at utilization %s with sample ratio %s...\" %\n                   (utilization, sample_ratio))\n\n            print (\"********Deploying with arrival rate %s and warmup arrival rate %s\"\n                   % (arrival_rate_s, warmup_arrival_rate_s))\n            ec2_exp.deploy_cluster(frontends, backends, opts, warmup_arrival_rate_s, warmup_s,\n                                   post_warmup_s, nm_task_scheduler, users)\n            ec2_exp.start_sparrow(frontends, backends, opts)\n\n            print \"*******Sleeping after starting Sparrow\"\n            time.sleep(10)\n            print \"********Starting prototype frontends and backends\"\n            ec2_exp.start_proto(frontends, backends, opts)\n            time.sleep(trial_length)\n\n            log_dirname = \"/disk1/sparrow/isolation_%s_%s\" % (utilization, sample_ratio)\n            while os.path.exists(log_dirname):\n                log_dirname = \"%s_a\" % log_dirname\n            os.mkdir(log_dirname)\n\n            ec2_exp.execute_command(frontends, backends, opts, \"./find_bugs.sh\")\n\n            print \"********Stopping prototypes and Sparrow\"\n            ec2_exp.stop_proto(frontends, backends, opts)\n            ec2_exp.stop_sparrow(frontends, backends, opts)\n\n            print \"********Collecting logs and placing in %s\" % log_dirname\n            opts.log_dir = log_dirname\n            ec2_exp.collect_logs(frontends, backends, opts)\n            run_cmd(\"gunzip %s/*.gz\" % log_dirname)\n\n            print \"********Parsing logs\"\n            run_cmd((\"cd /tmp/sparrow/src/main/python/ && ./parse_logs.sh log_dir=%s \"\n                     \"output_dir=%s/results start_sec=350 end_sec=450 && cd -\") %\n                    (log_dirname, log_dirname))\n\nif __name__ == \"__main__\":\n    main(sys.argv[1:])\n\n"
  },
  {
    "path": "deploy/ec2/isolation.sh",
    "content": "#!/bin/sh\n#\n# Copyright 2013 The Regents of The University California\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#   http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n\ncd \"`dirname $0`\"\nPYTHONPATH=\"$PYTHONPATH:../third_party/boto-2.1.1\" python ./isolation.py $@\n"
  },
  {
    "path": "deploy/ec2/osdi.py",
    "content": "#\n# Copyright 2013 The Regents of The University California\n# \n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n# \n#   http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n\nimport os\nimport subprocess\nimport time\n\ndef run_cmd(cmd):\n  subprocess.check_call(cmd, shell=True)\n\n# 50-node: q1, 3.5, par 10, sf .5 = 60% utilization\n# 50-node: q6, 4, par 10, sf .5 = 60% utilization\n# 50-node: q3, 2, par 10, sf .5 = 50% utilization\n# 100-node: q6 (think I ran at 4ps)\n# 100-node: q3\n\ntrial_length = 300\nratios = [(2, 2)]\nrates = [1]\ntpch_query = 1\npar_level = 20\n\nfor ratio in ratios:\n  for rate in rates:\n    run_cmd(\"./ec2-exp.sh stop-sparrow -i ~/.ssh/eastkey.pem\")\n    run_cmd(\"./ec2-exp.sh stop-spark -i ~/.ssh/eastkey.pem\")\n    run_cmd(\"./ec2-exp.sh deploy -g better-policies -s sparrow -k eastkey -i ~/.ssh/eastkey.pem -p %s -q %s\" % (ratio[0], ratio[1]))\n    run_cmd(\"./ec2-exp.sh start-sparrow -i ~/.ssh/eastkey.pem\")\n    time.sleep(30)\n    max_queries = int(trial_length * rate)\n    run_cmd(\"./ec2-exp.sh start-spark -i ~/.ssh/eastkey.pem -m \"\n            \"sparrow -v %s -j %s -o %s -r %s\" % (rate, max_queries, \n                                                 tpch_query, par_level))\n    dirname = \"%s_%s_%s\" % (ratio[0], ratio[1], rate)\n    if not os.path.exists(dirname):\n      os.mkdir(dirname)\n    time.sleep(trial_length + 130) \n    run_cmd(\"./ec2-exp.sh collect-logs -i ~/.ssh/eastkey.pem --log-dir=%s/\" % \n    dirname)\n    run_cmd(\"cd %s && gunzip *.gz && cd -\" % dirname)\n\n\n"
  },
  {
    "path": "deploy/ec2/prepare_tpch_experiments.py",
    "content": "#\n# Copyright 2013 The Regents of The University California\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#   http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\nimport os\nimport subprocess\nimport sys\nimport time\n\ndef run_cmd(cmd):\n  subprocess.check_call(cmd, shell=True)\n\n\ndef main(argv):\n  if len(argv) != 3 and len(argv) != 1:\n    print \"Usage: python prepare_tpch_experiments.py [opt: num_frontends num_backends]\"\n    print \"Specifying num_frontends and num_backends will cause a cluster to be launched\"\n    return\n\n  cluster_name = \"tpch\"\n  key_loc = \"patkey.pem\"\n\n  if len(argv) == 3:\n      num_frontends = argv[1]\n      num_backends = argv[2]\n\n      print \"Launching %s frontends and %s backends\" % (num_frontends, num_backends)\n# add --spot-price=foo for spot pricing\n      launch_cmd = (\"./ec2-exp.sh -t m2.4xlarge --spot-price=2.00 -a ami-533a733a -i %s launch %s -f %s -b %s\" %\n          (key_loc, cluster_name, num_frontends, num_backends))\n      #launch_cmd = (\"./ec2-exp.sh -t cr1.8xlarge --spot-price=2.00 -a ami-894801e0 -i %s launch %s -f %s -b %s\" %\n      #    (key_loc, cluster_name, num_frontends, num_backends))\n      run_cmd(launch_cmd)\n\n      print \"Sleeping for 1 minute after launching machines\"\n      time.sleep(60)\n\n  print \"***********Attempting to stop HDFS\"\n  stop_hdfs_cmd = \"./ec2-exp.sh -i %s stop-hdfs %s\" % (key_loc, cluster_name)\n  run_cmd(stop_hdfs_cmd)\n \n  print \"***********Deploying Code and Config Files\"\n  backend_mem=\"10g\"\n  deploy_cmd = \"./ec2-exp.sh -i %s deploy %s --spark-backend-mem %s\" % (key_loc, cluster_name, backend_mem)\n  run_cmd(deploy_cmd)\n\n  print \"***********Starting HDFS\"\n  hdfs_cmd = \"./ec2-exp.sh -i %s start-hdfs %s\" % (key_loc, cluster_name)\n  run_cmd(hdfs_cmd)\n\n  scale_factor = 2\n  print \"***********Creating database\"\n  create_db_cmd = (\"./ec2-exp.sh -i %s create-database %s --scale-factor %s\" %\n                   (key_loc, cluster_name, scale_factor))\n  # This returns a non-zero exit code if some of the directorys already exist, which is\n  # not an error we care about.\n  subprocess.call(create_db_cmd, shell=True)\n\n  print \"***********Starting Sparrow (needed for creating denormalized Hive tables)\"\n  restart_cmd = \"./ec2-exp.sh -i %s restart-spark-shark %s\" % (key_loc, cluster_name)\n  run_cmd(restart_cmd)\n\n  print \"***********Creating TPCH Tables in Shark\"\n  create_tables_cmd = \"./ec2-exp.sh -i %s create-tpch-tables %s \" % (key_loc, cluster_name)\n  run_cmd(create_tables_cmd)\n\nif __name__ == \"__main__\":\n  main(sys.argv)\n"
  },
  {
    "path": "deploy/ec2/prepare_tpch_experiments.sh",
    "content": "#!/bin/sh\n\n#\n# Copyright 2013 The Regents of The University California\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#   http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n\ncd \"`dirname $0`\"\nPYTHONPATH=\"$PYTHONPATH:../third_party/boto-2.1.1\" python ./prepare_tpch_experiments.py $@\n"
  },
  {
    "path": "deploy/ec2/probe-ratio-het.sh",
    "content": "#!/bin/sh\n#\n# Copyright 2013 The Regents of The University California\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#   http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n\ncd \"`dirname $0`\"\nPYTHONPATH=\"$PYTHONPATH:../third_party/boto-2.1.1\" python ./probe_ratio_het.py $@\n"
  },
  {
    "path": "deploy/ec2/probe-ratio.sh",
    "content": "#!/bin/sh\n#\n# Copyright 2013 The Regents of The University California\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#   http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n\ncd \"`dirname $0`\"\nPYTHONPATH=\"$PYTHONPATH:../third_party/boto-2.1.1\" python ./probe_ratio.py $@\n"
  },
  {
    "path": "deploy/ec2/probe_ratio.py",
    "content": "#\n# Copyright 2013 The Regents of The University California\n# \n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n# \n#   http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n\nimport boto\nimport os\nimport subprocess\nimport sys\nimport time\n\nimport ec2_exp\n\ndef run_cmd(cmd):\n    subprocess.check_call(cmd, shell=True)\n\ndef main(argv):\n    launch_instances = False\n    if len(argv) >= 1 and argv[0] == \"True\":\n        launch_instances = True\n\n    utilizations = [0.8, 0.9]\n    sample_ratios = [1, 1.1, 1.2, 1.5, 2.0, 3.0]\n    sample_ratio_constrained = 2\n\n    # Amount of time it takes each task to run in isolation\n    task_duration_ms = 100\n    tasks_per_job = 10\n    private_ssh_key = \"patkey.pem\"\n    sparrow_branch = \"master\"\n    nm_task_scheduler = \"fifo\"\n    num_backends = 100\n    num_frontends = 10\n    cores_per_backend = 8\n    # Run each trial for 5 minutes.\n    trial_length = 400\n    num_preferred_nodes = 0\n    num_users = 1\n    cluster = \"probe\"\n\n    full_utilization_rate_s = (float(num_backends * cores_per_backend * 1000) /\n                               (task_duration_ms * tasks_per_job * num_frontends))\n\n    # Warmup information\n    warmup_s = 30\n    post_warmup_s = 30\n    warmup_arrival_rate_s = 0.4 * full_utilization_rate_s\n\n    if launch_instances:\n        print \"********Launching instances...\"\n        run_cmd(\"./ec2-exp.sh launch %s -f %s -b %s -i %s\" % # --spot-price %s\" %\n                (cluster, num_frontends, num_backends, private_ssh_key))\n        time.sleep(10)\n\n    for sample_ratio in sample_ratios:\n        for utilization in utilizations:\n            arrival_rate_s = utilization * full_utilization_rate_s\n\n            # This is a little bit of a hacky way to pass args to the ec2 script.\n            (opts, args) = ec2_exp.parse_args(False)\n            opts.identity_file = private_ssh_key\n            opts.arrival_rate = arrival_rate_s\n            opts.branch = sparrow_branch\n            opts.sample_ratio  = sample_ratio\n            opts.sample_ratio_constrained = sample_ratio_constrained\n            opts.tasks_per_job = tasks_per_job\n            opts.num_preferred_nodes = num_preferred_nodes\n            opts.cpus = cores_per_backend\n\n            conn = boto.connect_ec2()\n            frontends, backends = ec2_exp.find_existing_cluster(conn, opts, cluster)\n\n            print (\"********Launching experiment at utilization %s with sample ratio %s...\" %\n                   (utilization, sample_ratio))\n\n            print (\"********Deploying with arrival rate %s and warmup arrival rate %s\"\n                   % (arrival_rate_s, warmup_arrival_rate_s))\n            ec2_exp.deploy_cluster(frontends, backends, opts, warmup_arrival_rate_s, warmup_s,\n                                   post_warmup_s, nm_task_scheduler)\n            ec2_exp.start_sparrow(frontends, backends, opts)\n\n            print \"*******Sleeping after starting Sparrow\"\n            time.sleep(10)\n            print \"********Starting prototype frontends and backends\"\n            ec2_exp.start_proto(frontends, backends, opts)\n            time.sleep(trial_length)\n\n            log_dirname = \"/home/ec2-user/sparrow/deploy/ec2/probe_ratio_%s_%s\" % (utilization, sample_ratio)\n            while os.path.exists(log_dirname):\n                log_dirname = \"%s_a\" % log_dirname\n            os.mkdir(log_dirname)\n\n            ec2_exp.execute_command(frontends, backends, opts, \"./find_bugs.sh\")\n\n            print \"********Stopping prototypes and Sparrow\"\n            ec2_exp.stop_proto(frontends, backends, opts)\n            ec2_exp.stop_sparrow(frontends, backends, opts)\n\n            print \"********Collecting logs and placing in %s\" % log_dirname\n            opts.log_dir = log_dirname\n            ec2_exp.collect_logs(frontends, backends, opts)\n            #run_cmd(\"gunzip %s/*.gz\" % log_dirname)\n\n            #print \"********Parsing logs\"\n            #run_cmd((\"cd ../../src/main/python/ && ./parse_logs.sh log_dir=%s \"\n            #         \"output_dir=%s/results start_sec=350 end_sec=450 && cd -\") %\n            #        (log_dirname, log_dirname))\n\nif __name__ == \"__main__\":\n    main(sys.argv[1:])\n\n"
  },
  {
    "path": "deploy/ec2/probe_ratio_het.py",
    "content": "#\n# Copyright 2013 The Regents of The University California\n# \n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n# \n#   http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n\nimport boto\nimport os\nimport subprocess\nimport sys\nimport time\n\nimport ec2_exp\n\ndef run_cmd(cmd):\n    subprocess.check_call(cmd, shell=True)\n\ndef main(argv):\n    launch_instances = False\n    if len(argv) >= 1 and argv[0] == \"True\":\n        launch_instances = True\n\n    utilizations = [0.8, 0.9]\n    sample_ratios = [1.1, 1.2, 1.5, 2.0, 3.0]\n    sample_ratio_constrained = 2\n\n    # Amount of time it takes each task to run in isolation\n    task_duration_ms = 100\n    tasks_per_job = 10\n    private_ssh_key = \"patkey.pem\"\n    sparrow_branch = \"master\"\n    nm_task_scheduler = \"fifo\"\n    num_backends = 100\n    num_frontends = 10\n    cores_per_backend = 8\n    # Run each trial for 5 minutes.\n    trial_length = 400\n    num_preferred_nodes = 0\n    num_users = 1\n    cluster = \"probe\"\n\n    full_utilization_rate_s = (float(num_backends * cores_per_backend * 1000) /\n                               (task_duration_ms * tasks_per_job * num_frontends))\n\n    # Warmup information\n    warmup_s = 120\n    post_warmup_s = 30\n    warmup_arrival_rate_s = 0.4 * full_utilization_rate_s\n\n    if launch_instances:\n        print \"********Launching instances...\"\n        run_cmd(\"./ec2-exp.sh launch %s -f %s -b %s -i %s\" % # --spot-price %s\" %\n                (cluster, num_frontends, num_backends, private_ssh_key))\n        time.sleep(10)\n\n    for sample_ratio in sample_ratios:\n        for utilization in utilizations:\n            arrival_rate_s = utilization * full_utilization_rate_s\n\n            # This is a little bit of a hacky way to pass args to the ec2 script.\n            (opts, args) = ec2_exp.parse_args(False)\n            opts.identity_file = private_ssh_key\n            opts.arrival_rate = arrival_rate_s\n            opts.branch = sparrow_branch\n            opts.sample_ratio  = sample_ratio\n            opts.sample_ratio_constrained = sample_ratio_constrained\n            opts.tasks_per_job = tasks_per_job\n            opts.num_preferred_nodes = num_preferred_nodes\n            opts.cpus = cores_per_backend\n            opts.benchmark_iterations = 100\n\n            conn = boto.connect_ec2()\n            frontends, backends = ec2_exp.find_existing_cluster(conn, opts, cluster)\n\n            print (\"********Launching experiment at utilization %s with sample ratio %s...\" %\n                   (utilization, sample_ratio))\n\n            print (\"********Deploying with arrival rate %s and warmup arrival rate %s\"\n                   % (arrival_rate_s, warmup_arrival_rate_s))\n            ec2_exp.deploy_cluster(frontends, backends, opts, warmup_arrival_rate_s, warmup_s,\n                                   post_warmup_s, nm_task_scheduler)\n            # Redeploy on half of the frontends with a longer duration for each task and a correspondingly\n            # lower arrival rate.\n            opts.arrival_rate = arrival_rate_s / 100.\n            opts.benchmark_iterations = 10000\n            ec2_exp.redeploy_sparrow(frontends[:5], backends, opts, warmup_arrival_rate_s / 100., warmup_s, post_warmup_s, nm_task_scheduler) \n            ec2_exp.start_sparrow(frontends, backends, opts)\n\n            print \"*******Sleeping after starting Sparrow\"\n            time.sleep(10)\n            print \"********Starting prototype frontends and backends\"\n            ec2_exp.start_proto(frontends, backends, opts)\n            time.sleep(trial_length)\n\n            log_dirname = \"/home/ec2-user/sparrow/deploy/ec2/probe_ratio_%s_%s\" % (utilization, sample_ratio)\n            while os.path.exists(log_dirname):\n                log_dirname = \"%s_a\" % log_dirname\n            os.mkdir(log_dirname)\n\n            ec2_exp.execute_command(frontends, backends, opts, \"./find_bugs.sh\")\n\n            print \"********Stopping prototypes and Sparrow\"\n            ec2_exp.stop_proto(frontends, backends, opts)\n            ec2_exp.stop_sparrow(frontends, backends, opts)\n\n            print \"********Collecting logs and placing in %s\" % log_dirname\n            opts.log_dir = log_dirname\n            ec2_exp.collect_logs(frontends, backends, opts)\n            #run_cmd(\"gunzip %s/*.gz\" % log_dirname)\n\n            #print \"********Parsing logs\"\n            #run_cmd((\"cd ../../src/main/python/ && ./parse_logs.sh log_dir=%s \"\n            #         \"output_dir=%s/results start_sec=350 end_sec=450 && cd -\") %\n            #        (log_dirname, log_dirname))\n\nif __name__ == \"__main__\":\n    main(sys.argv[1:])\n\n"
  },
  {
    "path": "deploy/ec2/spark_v_mesos.py",
    "content": "#\n# Copyright 2013 The Regents of The University California\n# \n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n# \n#   http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n\nimport os\nimport subprocess\nimport time\n\ndef run_cmd(cmd):\n  print cmd\n  subprocess.check_call(cmd, shell=True)\n\ntrial_length = 400\nprobe_ratio = (2, 2)\nquery_nums = [7000]\nquery_par = 10\nscheds = [\"sparrow\"]\n\n# STOP ALL THE THINGS\nrun_cmd(\"./ec2-exp.sh stop-spark -i ~/.ssh/eastkey.pem\")\nrun_cmd(\"./ec2-exp.sh stop-sparrow -i ~/.ssh/eastkey.pem\")\nrun_cmd(\"./ec2-exp.sh stop-mesos -i ~/.ssh/eastkey.pem\")\n\nfor task_length in query_nums:\n  rate = float(1000) / task_length # WAS 2000! but went from 5->10 nodes\n  for sched in scheds:\n    run_cmd(\"./ec2-exp.sh deploy -g better-policies -s sparrow -k eastkey -i ~/.ssh/eastkey.pem -p %s -q %s\" % (probe_ratio[0], probe_ratio[1]))\n    run_cmd(\"./ec2-exp.sh start-%s -i ~/.ssh/eastkey.pem\" % sched)\n#    time.sleep(30)\n    max_queries = int(trial_length * rate)\n    run_cmd(\"./ec2-exp.sh start-spark -i ~/.ssh/eastkey.pem \"\n            \"-v %s -j %s -o %s -r %s -m %s\" % (rate, max_queries, \n                                                 task_length, query_par, sched))\n    dirname = \"race/%s_%s\" % (sched, task_length)\n    if not os.path.exists(dirname):\n      os.mkdir(dirname)\n    time.sleep(trial_length + 20) \n    run_cmd(\"./ec2-exp.sh collect-logs -i ~/.ssh/eastkey.pem --log-dir=%s/\" % \n    dirname)\n    run_cmd(\"cd %s && gunzip *.gz && cd -\" % dirname)\n    run_cmd(\"./ec2-exp.sh stop-spark -i ~/.ssh/eastkey.pem\")\n    run_cmd(\"./ec2-exp.sh stop-%s -i ~/.ssh/eastkey.pem\" % sched)\n\n\n"
  },
  {
    "path": "deploy/ec2/template/README",
    "content": "All files in this folder are copied to each remote Sparrow node, with any\nvariables filled in by the EC2 install script.\n"
  },
  {
    "path": "deploy/ec2/template/backends.txt",
    "content": "{{backend_list}}\n"
  },
  {
    "path": "deploy/ec2/template/build_sparrow.sh",
    "content": "#!/bin/bash\n# Build Sparrow locally\n\nSPARROW_INSTALL_DIR=~/sparrow/\nSPARK_INSTALL_DIR=~/spark/\nSHARK_INSTALL_DIR=~/shark/\n\nchmod 755 ~/*.sh\n\nif [ ! -d \"$SPARROW_INSTALL_DIR\" ]; then\n  mkdir $SPARROW_INSTALL_DIR\nfi;\n\nif [ ! -d \"$SPARK_INSTALL_DIR\" ]; then\n  mkdir $SPARK_INSTALL_DIR\nfi;\n\nif [ ! -d \"$SHARK_INSTALL_DIR\" ]; then\n  mkdir $SHARK_INSTALL_DIR\nfi;\n\ncd /tmp/\n\nif [ ! -d \"sparrow\" ]; then\n  git clone git://github.com/radlab/sparrow.git -b {{git_branch}}\nfi;\n\n\nif [ ! -d \"spark\" ]; then\n  git clone git://github.com/kayousterhout/spark.git -b {{spark_git_branch}}\nfi;\n\nif [ ! -d \"shark\" ]; then\n  git clone git://github.com/kayousterhout/shark.git -b sparrow\nfi;\n\ncd sparrow\nif [ ! -e \"/tmp/sparrow/target/sparrow-1.0-SNAPSHOT.jar\" ]; then\n  mvn package -Dmaven.test.skip=true\nfi\ncp /tmp/sparrow/target/sparrow-1.0-SNAPSHOT.jar $SPARROW_INSTALL_DIR\n\n# Copy the Sparrow jar to a place where Spark includes it in the build.\nif [ ! -d \"/tmp/spark/core/lib\" ]; then\n  mkdir /tmp/spark/core/lib\nfi\ncp /tmp/sparrow/target/sparrow-1.0-SNAPSHOT.jar /tmp/spark/core/lib/\n\ncd /tmp/spark\nif [ ! -e \"/tmp/spark/core/target/scala-2.9.1\" ]; then\n  sbt/sbt compile\n  sbt/sbt publish-local\nfi\n\n# Manually download httpcore, which SBT seems to have issues with\nwget http://repo1.maven.org/maven2/org/apache/httpcomponents/httpcore/4.1.2/httpcore-4.1.2.jar\nHTTPCORE_DIR=/root/.m2/repository/org/apache/httpcomponents/httpcore/4.1.2\nmkdir -p $HTTPCORE_DIR\nmv httpcore-4.1.2.jar $HTTPCORE_DIR\n\ncd /tmp/shark\n\n# Copy shark-conv into the conf/ directory, because it's needed for building.\nif [ ! -d \"conf\" ]; then\n  mkdir conf\nfi\ncp ~/shark-env.sh conf/\n\nif [ ! -e \"/tmp/shark/target/scala-2.9.1/classes/shark/SharkEnv.class\" ]; then\nsbt/sbt products\nfi\n# This jar could be in sparrow spark branch instead.\ncp /tmp/spark/core/lib/sparrow* /tmp/shark/lib\n\ncp -r /tmp/spark/* $SPARK_INSTALL_DIR\ncp -r /tmp/shark/* $SHARK_INSTALL_DIR\n"
  },
  {
    "path": "deploy/ec2/template/clean_logs.sh",
    "content": "#!/bin/bash\nrm -f /tmp/*.log\nrm -f /tmp/*.log.gz\nrm -f ~/*.log\nrm -f ~/*.log.gz\nrm /tmp/spark-local-* -rf\n"
  },
  {
    "path": "deploy/ec2/template/configure_node.sh",
    "content": "#!/bin/bash\n\n/etc/init.d/ntpd stop\nntpdate ntp.ubuntu.com\n\nrm -rf /tmp/spark-local*\n\nif [ -d \"/mnt\" ]; then\n  umount /mnt/\n  rmdir /mnt/\nfi;\n\nif [ ! -d \"/disk1\" ]; then\n  mkdir /disk1\n  mount /dev/xvdb /disk1 -t ext3\nfi;\n\nmkdir -p /disk1/hdfs/name\nchown hdfs.hdfs /disk1/hdfs/name\n\nmkdir -p /disk1/sparrow\nmkdir -p /disk1/spark-tmp\nmkdir -p /disk1/hdfs/data\nmkdir -p /disk1/tmp/\nmkdir -p /disk1/tmp/spark/\nchown hdfs.hdfs /disk1/hdfs/data\n\n# Annoying ec2 cloud entry in hostfile\ncat /etc/hosts | grep -v internal > tmp && mv tmp /etc/hosts\n\ncp ~/hdfs-site.xml /opt/hadoop/conf/\ncp ~/hadoop-env.sh /opt/hadoop/conf/\ncp ~/backends.txt /opt/hadoop/conf/slaves\ncp ~/hive-site.xml /opt/hive/conf/\ncp ~/shark-env.sh /root/shark/conf/shark-env.sh\ncp ~/spark-env.sh /root/spark/conf/spark-env.sh\n\n# Create references to per-frontend hive tables\ncd /opt/tpch_hive/\nbash -c \"sed -i 's/\\/tpch/\\/`hostname -i`/g' *.hive\"\ncd -\n\n# Reference correct directory in hive queries\nbash -c \"sed -i 's/HOST_IP/`hostname -i`/g' ~/tpch/*\"\n\n"
  },
  {
    "path": "deploy/ec2/template/create_database.sh",
    "content": "#!/bin/bash\n# Generate databases\n\nSCALE=$1\nFRONTENDS=`cat frontends.txt`\n\nif [ \"$SCALE\" = \"\" ];\nthen\n  echo \"Scale factor required\"\n  exit -1\nfi\n\nif [ -d \"/disk1/tpch\" ];\nthen\n  rm -rf /disk1/tpch\nfi\n\nmkdir /disk1/tpch\ncp /opt/tpch/dbgen/* /disk1/tpch\n\necho \"Generating database\"\ncd /disk1/tpch\n./dbgen -f -s $SCALE\n\n\necho \"Copying database\"\nsudo -u hdfs /opt/hadoop/bin/hadoop dfs -rmr \"hdfs://{{name_node}}:8020/tpch/*\"\nsudo -u hdfs /opt/hadoop/bin/hadoop dfs -rmr \"hdfs://{{name_node}}:8020/tpch/\"\nsudo -u hdfs /opt/hadoop/bin/hadoop dfs -mkdir \"hdfs://{{name_node}}:8020/tpch/\"\n\n# Make and populate /tpch/[tbl] directory for each table\nfor t in *.tbl; do\n  name=`echo $t | sed \"s/.tbl//g\"`\n  sudo -u hdfs /opt/hadoop/bin/hadoop dfs -mkdir \"hdfs://{{name_node}}:8020/tpch/$name/\"\n  sudo -u hdfs /opt/hadoop/bin/hadoop dfs -Ddfs.block.size=33554432 -copyFromLocal $t hdfs://{{name_node}}:8020/tpch/$name/\ndone\n\necho \"Making Hive User Directory\"\nsudo -u hdfs /opt/hadoop/bin/hadoop dfs -mkdir \"hdfs://{{name_node}}:8020/user/\"\nsudo -u hdfs /opt/hadoop/bin/hadoop dfs -mkdir \"hdfs://{{name_node}}:8020/user/hive/\"\n\necho \"Making Temp Dir\"\nsudo -u hdfs /opt/hadoop/bin/hadoop dfs -mkdir \"hdfs://{{name_node}}:8020/tmp/\"\nsudo -u hdfs /opt/hadoop/bin/hadoop dfs -chmod -R 777 \"hdfs://{{name_node}}:8020/tmp/\"\n\necho \"Making Hive warehouse dir for denorm table\"\nsudo -u hdfs /opt/hadoop/bin/hadoop dfs -mkdir \"hdfs://{{name_node}}:8020/tpch/denorm-warehouse/\"\n\n"
  },
  {
    "path": "deploy/ec2/template/create_tpch_tables_primary.sh",
    "content": "#!/bin/bash\n# Create shark tables for tpc-h benchmark\n\nLOG=/disk1/sparrow/createTPCH.log\n\nSHARK=/root/shark/bin/shark-withinfo\nQUERY_DIR=/root/tpch\n\ncd /disk1/sparrow/\necho \"Making base tables\"\n$SHARK -f $QUERY_DIR/make_base_tables.hql > $LOG 2>&1\n\necho \"Making demormalized table\"\n$SHARK -f $QUERY_DIR/make_denorm_table_primary.hql > $LOG 2>&1\n\n"
  },
  {
    "path": "deploy/ec2/template/create_tpch_tables_secondary.sh",
    "content": "#!/bin/bash\n# Create shark tables for tpc-h benchmark\n\nLOG=/disk1/sparrow/createTPCH.log\n\nSHARK=/root/shark/bin/shark-withinfo\nQUERY_DIR=/root/tpch\n\ncd /disk1/sparrow/\necho \"Making base tables\"\n$SHARK -f $QUERY_DIR/make_base_tables.hql > $LOG 2>&1\n\necho \"Making demormalized table\"\n$SHARK -f $QUERY_DIR/make_denorm_table_secondary.hql > $LOG 2>&1\n\n"
  },
  {
    "path": "deploy/ec2/template/deploy_sparrow.sh",
    "content": "#!/bin/bash\n# Deploy built version of Sparrow on frontends and backends.\n\nFRONTENDS=`cat frontends.txt`\nBACKENDS=`cat backends.txt`\nSSH_OPTS=\"-o StrictHostKeyChecking=no -o ConnectTimeout=5\"\n\nfor fe in $FRONTENDS; do\n  rsync -e \"ssh $SSH_OPTS\" --delete -az ~/ `dig +short $fe`:~/ &\ndone\nwait\n\nfor fe in $FRONTENDS; do\n  ssh $SSH_OPTS `dig +short $fe` \"/root/configure_node.sh\" &\ndone\n\nfor be in $BACKENDS; do\n  rsync -e \"ssh $SSH_OPTS\" --delete -az ~/ `dig +short $be`:~/ &\ndone\nwait\n\nfor be in $BACKENDS; do\n  ssh $SSH_OPTS `dig +short $be` \"/root/configure_node.sh\" &\ndone\nwait\n\nif [ ! -d \"/disk1/hdfs/name/current/\" ]; then\n  echo \"Formatting Namenode\"\n  echo \"Y\" | sudo -u hdfs /opt/hadoop/bin/hadoop namenode -format\nelse\n  echo \"Namenode formatted\"\nfi\n"
  },
  {
    "path": "deploy/ec2/template/find_bugs.sh",
    "content": "#!/bin/bash\nhost=`ec2metadata  |grep public-hostname | cut -d \" \" -f 2`\necho $host\ncat /disk1/sparrow/* |egrep \"ERROR|Exception\" | wc  \n"
  },
  {
    "path": "deploy/ec2/template/find_bugs_filtered.sh",
    "content": "#!/bin/bash\n#Filters out some known issues\nhost=`ec2metadata  |grep public-hostname | cut -d \" \" -f 2`\necho $host\ncat /disk1/sparrow/* |egrep \"ERROR|Exception\" | grep -v ConfigNodeMonitorState | wc  \n"
  },
  {
    "path": "deploy/ec2/template/find_bugs_verbose.sh",
    "content": "#!/bin/bash\n#Filters out some known issues\nhost=`ec2metadata  |grep public-hostname | cut -d \" \" -f 2`\necho $host\ncat /disk1/sparrow/* |egrep \"ERROR|Exception\" | grep -v ConfigNodeMonitorState \n"
  },
  {
    "path": "deploy/ec2/template/find_cache_partitions.sh",
    "content": "#!/bin/bash\nhost=`ec2metadata  |grep public-hostname | cut -d \" \" -f 2`\necho $host\ncat /disk1/sparrow/* |egrep \"ensureFree\"\nexit 0\n"
  },
  {
    "path": "deploy/ec2/template/frontend.conf",
    "content": "job_arrival_rate_s = {{arrival_lambda}}\ntasks_per_job = {{tasks_per_job}}\nbenchmark.id = {{benchmark_id}}\nbenchmark.iterations = {{benchmark_iterations}}\nnum_preferred_nodes = {{num_preferred_nodes}}\nbackends = {{backend_comma_joined_list}}\nwarmup_job_arrival_rate_s = {{warmup_job_arrival_rate_s}}\nwarmup_s = {{warmup_s}}\npost_warmup_s = {{post_warmup_s}}\nusers = {{users}}\n"
  },
  {
    "path": "deploy/ec2/template/frontends.txt",
    "content": "{{frontend_list}}\n"
  },
  {
    "path": "deploy/ec2/template/hadoop-env.sh",
    "content": "# The only required environment variable is JAVA_HOME.  All others are\n# optional.  When running a distributed configuration it is best to\n# set JAVA_HOME in this file, so that it is correctly defined on\n# remote nodes.\n\n# The java implementation to use.  Required.\nexport JAVA_HOME=/usr/lib/jvm/java-6-sun/jre\n#export JAVA_HOME=/usr/lib/jvm/jre-1.6.0-openjdk.x86_64\n\n# Extra Java CLASSPATH elements.  Optional.\nexport HADOOP_CLASSPATH=\"/opt/hive/conf/:/opt/hive/build/dist/lib\"\n\n# The maximum amount of heap to use, in MB. Default is 1000.\n# export HADOOP_HEAPSIZE=2000\n\n# Extra Java runtime options.  Empty by default.\n# export HADOOP_OPTS=-server\n\n# Command specific options appended to HADOOP_OPTS when specified\nexport HADOOP_NAMENODE_OPTS=\"-Dcom.sun.management.jmxremote $HADOOP_NAMENODE_OPTS\"\nexport HADOOP_SECONDARYNAMENODE_OPTS=\"-Dcom.sun.management.jmxremote $HADOOP_SECONDARYNAMENODE_OPTS\"\nexport HADOOP_DATANODE_OPTS=\"-Dcom.sun.management.jmxremote $HADOOP_DATANODE_OPTS\"\nexport HADOOP_BALANCER_OPTS=\"-Dcom.sun.management.jmxremote $HADOOP_BALANCER_OPTS\"\nexport HADOOP_JOBTRACKER_OPTS=\"-Dcom.sun.management.jmxremote $HADOOP_JOBTRACKER_OPTS\"\n# export HADOOP_TASKTRACKER_OPTS=\n# The following applies to multiple commands (fs, dfs, fsck, distcp etc)\n# export HADOOP_CLIENT_OPTS\n\n# Extra ssh options.  Empty by default.\n# export HADOOP_SSH_OPTS=\"-o ConnectTimeout=1 -o SendEnv=HADOOP_CONF_DIR\"\n\n# Where log files are stored.  $HADOOP_HOME/logs by default.\n# export HADOOP_LOG_DIR=${HADOOP_HOME}/logs\n\n# File naming remote slave hosts.  $HADOOP_HOME/conf/slaves by default.\n# export HADOOP_SLAVES=${HADOOP_HOME}/conf/slaves\n\n# host:path where hadoop code should be rsync'd from.  Unset by default.\n# export HADOOP_MASTER=master:/home/$USER/src/hadoop\n\n# Seconds to sleep between slave commands.  Unset by default.  This\n# can be useful in large clusters, where, e.g., slave rsyncs can\n# otherwise arrive faster than the master can service them.\n# export HADOOP_SLAVE_SLEEP=0.1\n\n# The directory where pid files are stored. /tmp by default.\n# export HADOOP_PID_DIR=/var/hadoop/pids\n\n# A string representing this instance of hadoop. $USER by default.\n# export HADOOP_IDENT_STRING=$USER\n\n# The scheduling priority for daemon processes.  See 'man nice'.\n# export HADOOP_NICENESS=10\n"
  },
  {
    "path": "deploy/ec2/template/hdfs-site.xml",
    "content": "<?xml version=\"1.0\"?>\n<?xml-stylesheet type=\"text/xsl\" href=\"configuration.xsl\"?>\n\n<!-- Put site-specific property overrides in this file. -->\n\n<configuration>\n  <property>\n    <name>dfs.permissions</name>\n    <value>false</value>\n  </property>\n\n  <property>\n    <name>dfs.name.dir</name>\n    <value>/disk1/hdfs/name</value>\n  </property>\n\n  <property>\n    <name>dfs.data.dir</name>\n    <value>/disk1/hdfs/data</value>\n  </property>\n\n  <property>\n    <name>fs.default.name</name>\n    <value>hdfs://{{name_node}}:8020/</value>\n  </property>\n\n  <property>\n  <name>dfs.blocksize</name>\n  <value>33554432</value>\n  </property>\n</configuration>\n"
  },
  {
    "path": "deploy/ec2/template/hive-site.xml",
    "content": "<?xml version=\"1.0\"?>\n<?xml-stylesheet type=\"text/xsl\" href=\"configuration.xsl\"?>\n<!--\n   Licensed to the Apache Software Foundation (ASF) under one or more\n   contributor license agreements.  See the NOTICE file distributed with\n   this work for additional information regarding copyright ownership.\n   The ASF licenses this file to You under the Apache License, Version 2.0\n   (the \"License\"); you may not use this file except in compliance with\n   the License.  You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n-->\n\n<configuration>\n\n<!-- Just need to set this to something other than local -->\n<property>\n<name>mapreduce.framework.name</name>\n<value>foo</value>\n</property>\n<property>\n<name>mapred.job.tracker</name>\n<value>foo</value>\n</property>\n\n<!-- Hive Configuration can either be stored in this file or in the hadoop configuration files  -->\n<!-- that are implied by Hadoop setup variables.                                                -->\n<!-- Aside from Hadoop setup variables - this file is provided as a convenience so that Hive    -->\n<!-- users do not have to edit hadoop configuration files (that may be managed as a centralized -->\n<!-- resource).                                                                                 -->\n\n<!-- Hive Execution Parameters -->\n<property>\n  <name>mapred.reduce.tasks</name>\n  <value>-1</value>\n    <description>The default number of reduce tasks per job.  Typically set\n  to a prime close to the number of available hosts.  Ignored when\n  mapred.job.tracker is \"local\". Hadoop set this to 1 by default, whereas hive uses -1 as its default value.\n  By setting this property to -1, Hive will automatically figure out what should be the number of reducers.\n  </description>\n</property>\n\n<property>\n  <name>mapred.max.split.size</name>\n  <value>256000000</value>\n  <description>Largest valid size in bytes for a file split.\n  This should be set to a small multiple of the block size in bytes</description>\n</property>\n\n<property>\n  <name>mapred.min.split.size</name>\n  <value>1</value>\n  <description>Smallest valid size in bytes for a file split</description>\n</property>\n\n<property>\n  <name>mapred.min.split.size.per.rack</name>\n  <value>1</value>\n  <description>The minimum number of bytes of data required to create a rack-local partition</description>\n</property>\n\n<property>\n  <name>mapred.min.split.size.per.node</name>\n  <value>1</value>\n  <description>The minimum number of bytes of data required to create a node-local partition</description>\n</property>\n\n<property>\n  <name>hive.exec.reducers.bytes.per.reducer</name>\n  <value>1000000000</value>\n  <description>size per reducer.The default is 1G, i.e if the input size is 10G, it will use 10 reducers.</description>\n</property>\n\n<property>\n  <name>hive.exec.reducers.max</name>\n  <value>999</value>\n  <description>max number of reducers will be used. If the one\n\tspecified in the configuration parameter mapred.reduce.tasks is\n\tnegative, hive will use this one as the max number of reducers when\n\tautomatically determine number of reducers.</description>\n</property>\n\n<property>\n  <name>hive.cli.print.header</name>\n  <value>false</value>\n  <description>Whether to print the names of the columns in query output.</description>\n</property>\n\n<property>\n  <name>hive.exec.scratchdir</name>\n  <value>/tmp/hive-${user.name}</value>\n  <description>Scratch space for Hive jobs</description>\n</property>\n\n<property>\n  <name>hive.test.mode</name>\n  <value>false</value>\n  <description>whether hive is running in test mode. If yes, it turns on sampling and prefixes the output tablename</description>\n</property>\n\n<property>\n  <name>hive.test.mode.prefix</name>\n  <value>test_</value>\n  <description>if hive is running in test mode, prefixes the output table by this string</description>\n</property>\n\n<!-- If the input table is not bucketed, the denominator of the tablesample is determinied by the parameter below   -->\n<!-- For example, the following query:                                                                              -->\n<!--   INSERT OVERWRITE TABLE dest                                                                                  -->\n<!--   SELECT col1 from src                                                                                         -->\n<!-- would be converted to                                                                                          -->\n<!--   INSERT OVERWRITE TABLE test_dest                                                                             -->\n<!--   SELECT col1 from src TABLESAMPLE (BUCKET 1 out of 32 on rand(1))                                             -->\n<property>\n  <name>hive.test.mode.samplefreq</name>\n  <value>32</value>\n  <description>if hive is running in test mode and table is not bucketed, sampling frequency</description>\n</property>\n\n<property>\n  <name>hive.test.mode.nosamplelist</name>\n  <value></value>\n  <description>if hive is running in test mode, dont sample the above comma seperated list of tables</description>\n</property>\n\n<property>\n  <name>hive.metastore.local</name>\n  <value>true</value>\n  <description>controls whether to connect to remove metastore server or open a new metastore server in Hive Client JVM</description>\n</property>\n\n<property>\n  <name>javax.jdo.option.ConnectionURL</name>\n  <value>jdbc:derby:;databaseName=metastore_db;create=true</value>\n  <description>JDBC connect string for a JDBC metastore</description>\n</property>\n\n<property>\n  <name>javax.jdo.option.ConnectionDriverName</name>\n  <value>org.apache.derby.jdbc.EmbeddedDriver</value>\n  <description>Driver class name for a JDBC metastore</description>\n</property>\n\n<property>\n  <name>javax.jdo.PersistenceManagerFactoryClass</name>\n  <value>org.datanucleus.jdo.JDOPersistenceManagerFactory</value>\n  <description>class implementing the jdo persistence</description>\n</property>\n\n<property>\n  <name>javax.jdo.option.DetachAllOnCommit</name>\n  <value>true</value>\n  <description>detaches all objects from session so that they can be used after transaction is committed</description>\n</property>\n\n<property>\n  <name>javax.jdo.option.NonTransactionalRead</name>\n  <value>true</value>\n  <description>reads outside of transactions</description>\n</property>\n\n<property>\n  <name>javax.jdo.option.ConnectionUserName</name>\n  <value>APP</value>\n  <description>username to use against metastore database</description>\n</property>\n\n<property>\n  <name>javax.jdo.option.ConnectionPassword</name>\n  <value>mine</value>\n  <description>password to use against metastore database</description>\n</property>\n\n<property>\n  <name>datanucleus.connectionPoolingType</name>\n  <value>DBCP</value>\n  <description>Uses a DBCP connection pool for JDBC metastore</description>\n</property>\n\n<property>\n  <name>datanucleus.validateTables</name>\n  <value>false</value>\n  <description>validates existing schema against code. turn this on if you want to verify existing schema </description>\n</property>\n\n<property>\n  <name>datanucleus.validateColumns</name>\n  <value>false</value>\n  <description>validates existing schema against code. turn this on if you want to verify existing schema </description>\n</property>\n\n<property>\n  <name>datanucleus.validateConstraints</name>\n  <value>false</value>\n  <description>validates existing schema against code. turn this on if you want to verify existing schema </description>\n</property>\n\n<property>\n  <name>datanucleus.storeManagerType</name>\n  <value>rdbms</value>\n  <description>metadata store type</description>\n</property>\n\n<property>\n  <name>datanucleus.autoCreateSchema</name>\n  <value>true</value>\n  <description>creates necessary schema on a startup if one doesn't exist. set this to false, after creating it once</description>\n</property>\n\n<property>\n  <name>datanucleus.autoStartMechanismMode</name>\n  <value>checked</value>\n  <description>throw exception if metadata tables are incorrect</description>\n</property>\n\n<property>\n  <name>datanucleus.transactionIsolation</name>\n  <value>read-committed</value>\n  <description>Default transaction isolation level for identity generation. </description>\n</property>\n\n<property>\n  <name>datanucleus.cache.level2</name>\n  <value>false</value>\n  <description>Use a level 2 cache. Turn this off if metadata is changed independently of hive metastore server</description>\n</property>\n\n<property>\n  <name>datanucleus.cache.level2.type</name>\n  <value>SOFT</value>\n  <description>SOFT=soft reference based cache, WEAK=weak reference based cache.</description>\n</property>\n\n<property>\n  <name>datanucleus.identifierFactory</name>\n  <value>datanucleus</value>\n  <description>Name of the identifier factory to use when generating table/column names etc. 'datanucleus' is used for backward compatibility</description>\n</property>\n\n<property>\n  <name>datanucleus.plugin.pluginRegistryBundleCheck</name>\n  <value>LOG</value>\n  <description>Defines what happens when plugin bundles are found and are duplicated [EXCEPTION|LOG|NONE]</description>\n</property>\n\n<property>\n  <name>hive.metastore.warehouse.dir</name>\n  <value>/tpch/denorm-warehouse</value>\n  <description>location of default database for the warehouse</description>\n</property>\n\n<property>\n  <name>hive.metastore.connect.retries</name>\n  <value>5</value>\n  <description>Number of retries while opening a connection to metastore</description>\n</property>\n\n<property>\n  <name>hive.metastore.client.connect.retry.delay</name>\n  <value>1</value>\n  <description>Number of seconds for the client to wait between consecutive connection attempts</description>\n</property>\n\n<property>\n  <name>hive.metastore.client.socket.timeout</name>\n  <value>20</value>\n  <description>MetaStore Client socket timeout in seconds</description>\n</property>\n\n<property>\n  <name>hive.metastore.rawstore.impl</name>\n  <value>org.apache.hadoop.hive.metastore.ObjectStore</value>\n  <description>Name of the class that implements org.apache.hadoop.hive.metastore.rawstore interface. This class is used to store and retrieval of raw metadata objects such as table, database</description>\n</property>\n\n<property>\n  <name>hive.default.fileformat</name>\n  <value>TextFile</value>\n  <description>Default file format for CREATE TABLE statement. Options are TextFile and SequenceFile. Users can explicitly say CREATE TABLE ... STORED AS &lt;TEXTFILE|SEQUENCEFILE&gt; to override</description>\n</property>\n\n<property>\n  <name>hive.fileformat.check</name>\n  <value>true</value>\n  <description>Whether to check file format or not when loading data files</description>\n</property>\n\n<property>\n  <name>hive.map.aggr</name>\n  <value>true</value>\n  <description>Whether to use map-side aggregation in Hive Group By queries</description>\n</property>\n\n<property>\n  <name>hive.groupby.skewindata</name>\n  <value>false</value>\n  <description>Whether there is skew in data to optimize group by queries</description>\n</property>\n\n<property>\n  <name>hive.groupby.mapaggr.checkinterval</name>\n  <value>100000</value>\n  <description>Number of rows after which size of the grouping keys/aggregation classes is performed</description>\n</property>\n\n<property>\n  <name>hive.mapred.local.mem</name>\n  <value>0</value>\n  <description>For local mode, memory of the mappers/reducers</description>\n</property>\n\n<property>\n  <name>hive.mapjoin.followby.map.aggr.hash.percentmemory</name>\n  <value>0.3</value>\n  <description>Portion of total memory to be used by map-side grup aggregation hash table, when this group by is followed by map join</description>\n</property>\n\n<property>\n  <name>hive.map.aggr.hash.force.flush.memory.threshold</name>\n  <value>0.9</value>\n  <description>The max memory to be used by map-side grup aggregation hash table, if the memory usage is higher than this number, force to flush data</description>\n</property>\n\n<property>\n  <name>hive.map.aggr.hash.percentmemory</name>\n  <value>0.5</value>\n  <description>Portion of total memory to be used by map-side grup aggregation hash table</description>\n</property>\n\n<property>\n  <name>hive.map.aggr.hash.min.reduction</name>\n  <value>0.5</value>\n  <description>Hash aggregation will be turned off if the ratio between hash\n  table size and input rows is bigger than this number. Set to 1 to make sure\n  hash aggregation is never turned off.</description>\n</property>\n\n<property>\n  <name>hive.optimize.cp</name>\n  <value>true</value>\n  <description>Whether to enable column pruner</description>\n</property>\n\n<property>\n  <name>hive.optimize.ppd</name>\n  <value>true</value>\n  <description>Whether to enable predicate pushdown</description>\n</property>\n\n<property>\n  <name>hive.optimize.ppd.storage</name>\n  <value>true</value>\n  <description>Whether to push predicates down into storage handlers.  Ignored when hive.optimize.ppd is false.</description>\n</property>\n\n<property>\n  <name>hive.optimize.pruner</name>\n  <value>true</value>\n  <description>Whether to enable the new partition pruner which depends on predicate pushdown. If this is disabled,\n  the old partition pruner which is based on AST will be enabled.</description>\n</property>\n\n<property>\n  <name>hive.optimize.groupby</name>\n  <value>true</value>\n  <description>Whether to enable the bucketed group by from bucketed partitions/tables.</description>\n</property>\n\n<property>\n  <name>hive.join.emit.interval</name>\n  <value>1000</value>\n  <description>How many rows in the right-most join operand Hive should buffer before emitting the join result. </description>\n</property>\n\n<property>\n  <name>hive.join.cache.size</name>\n  <value>25000</value>\n  <description>How many rows in the joining tables (except the streaming table) should be cached in memory. </description>\n</property>\n\n<property>\n  <name>hive.mapjoin.bucket.cache.size</name>\n  <value>100</value>\n  <description>How many values in each keys in the map-joined table should be cached in memory. </description>\n</property>\n\n<property>\n  <name>hive.mapjoin.maxsize</name>\n  <value>100000</value>\n  <description>Maximum # of rows of the small table that can be handled by map-side join. If the size is reached and hive.task.progress is set, a fatal error counter is set and the job will be killed.</description>\n</property>\n\n<property>\n  <name>hive.mapjoin.cache.numrows</name>\n  <value>25000</value>\n  <description>How many rows should be cached by jdbm for map join. </description>\n</property>\n\n<property>\n  <name>hive.optimize.skewjoin</name>\n  <value>false</value>\n  <description>Whether to enable skew join optimization. </description>\n</property>\n\n<property>\n  <name>hive.skewjoin.key</name>\n  <value>100000</value>\n  <description>Determine if we get a skew key in join. If we see more\n\tthan the specified number of rows with the same key in join operator,\n\twe think the key as a skew join key. </description>\n</property>\n\n<property>\n  <name>hive.skewjoin.mapjoin.map.tasks</name>\n  <value>10000</value>\n  <description> Determine the number of map task used in the follow up map join job\n\tfor a skew join. It should be used together with hive.skewjoin.mapjoin.min.split\n\tto perform a fine grained control.</description>\n</property>\n\n<property>\n  <name>hive.skewjoin.mapjoin.min.split</name>\n  <value>33554432</value>\n  <description> Determine the number of map task at most used in the follow up map join job\n\tfor a skew join by specifying the minimum split size. It should be used together with\n\thive.skewjoin.mapjoin.map.tasks to perform a fine grained control.</description>\n</property>\n\n<property>\n  <name>hive.mapred.mode</name>\n  <value>nonstrict</value>\n  <description>The mode in which the hive operations are being performed. In strict mode, some risky queries are not allowed to run</description>\n</property>\n\n<property>\n  <name>hive.exec.script.maxerrsize</name>\n  <value>100000</value>\n  <description>Maximum number of bytes a script is allowed to emit to standard error (per map-reduce task). This prevents runaway scripts from filling logs partitions to capacity </description>\n</property>\n\n<property>\n  <name>hive.exec.script.allow.partial.consumption</name>\n  <value>false</value>\n  <description> When enabled, this option allows a user script to exit successfully without consuming all the data from the standard input.\n  </description>\n</property>\n\n<property>\n  <name>hive.script.operator.id.env.var</name>\n  <value>HIVE_SCRIPT_OPERATOR_ID</value>\n  <description> Name of the environment variable that holds the unique script operator ID in the user's transform function (the custom mapper/reducer that the user has specified in the query)\n  </description>\n</property>\n\n<property>\n  <name>hive.exec.compress.output</name>\n  <value>false</value>\n  <description> This controls whether the final outputs of a query (to a local/hdfs file or a hive table) is compressed. The compression codec and other options are determined from hadoop config variables mapred.output.compress* </description>\n</property>\n\n<property>\n  <name>hive.exec.compress.intermediate</name>\n  <value>false</value>\n  <description> This controls whether intermediate files produced by hive between multiple map-reduce jobs are compressed. The compression codec and other options are determined from hadoop config variables mapred.output.compress* </description>\n</property>\n\n<property>\n  <name>hive.exec.parallel</name>\n  <value>false</value>\n  <description>Whether to execute jobs in parallel</description>\n</property>\n\n<property>\n  <name>hive.exec.parallel.thread.number</name>\n  <value>8</value>\n  <description>How many jobs at most can be executed in parallel</description>\n</property>\n\n<property>\n  <name>hive.task.progress</name>\n  <value>false</value>\n  <description>Whether Hive should periodically update task progress counters during execution.  Enabling this allows task progress to be monitored more closely in the job tracker, but may impose a performance penalty.  This flag is automatically set to true for jobs with hive.exec.dynamic.partition set to true.</description>\n</property>\n\n<property>\n  <name>hive.hwi.war.file</name>\n  <value>lib/hive-hwi-0.7.1-cdh3u3.war</value>\n  <description>This sets the path to the HWI war file, relative to ${HIVE_HOME}. </description>\n</property>\n\n<property>\n  <name>hive.hwi.listen.host</name>\n  <value>0.0.0.0</value>\n  <description>This is the host address the Hive Web Interface will listen on</description>\n</property>\n\n<property>\n  <name>hive.hwi.listen.port</name>\n  <value>9999</value>\n  <description>This is the port the Hive Web Interface will listen on</description>\n</property>\n\n<property>\n  <name>hive.exec.pre.hooks</name>\n  <value></value>\n  <description>Comma-separated list of pre-execution hooks to be invoked for each statement.  A pre-execution hook is specified as the name of a Java class which implements the org.apache.hadoop.hive.ql.hooks.ExecuteWithHookContext interface.</description>\n</property>\n\n<property>\n  <name>hive.exec.post.hooks</name>\n  <value></value>\n  <description>Comma-separated list of post-execution hooks to be invoked for each statement.  A post-execution hook is specified as the name of a Java class which implements the org.apache.hadoop.hive.ql.hooks.ExecuteWithHookContext interface.</description>\n</property>\n\n<property>\n  <name>hive.merge.mapfiles</name>\n  <value>true</value>\n  <description>Merge small files at the end of a map-only job</description>\n</property>\n\n<property>\n  <name>hive.merge.mapredfiles</name>\n  <value>false</value>\n  <description>Merge small files at the end of a map-reduce job</description>\n</property>\n\n<property>\n  <name>hive.mergejob.maponly</name>\n  <value>true</value>\n  <description>Try to generate a map-only job for merging files if CombineHiveInputFormat is supported.</description>\n</property>\n\n<property>\n  <name>hive.heartbeat.interval</name>\n  <value>1000</value>\n  <description>Send a heartbeat after this interval - used by mapjoin and filter operators</description>\n</property>\n\n<property>\n  <name>hive.merge.size.per.task</name>\n  <value>256000000</value>\n  <description>Size of merged files at the end of the job</description>\n</property>\n\n<property>\n  <name>hive.merge.smallfiles.avgsize</name>\n  <value>16000000</value>\n  <description>When the average output file size of a job is less than this number, Hive will start an additional map-reduce job to merge the output files into bigger files.  This is only done for map-only jobs if hive.merge.mapfiles is true, and for map-reduce jobs if hive.merge.mapredfiles is true.</description>\n</property>\n\n\n<property>\n  <name>hive.mapjoin.hashtable.initialCapacity</name>\n  <value>100000</value>\n  <description>In the process of Mapjoin, the key/value will be hold in the hashtable. This value means the initialCapacity of the in-memory hashtable</description>\n</property>\n\n<property>\n  <name>hive.mapjoin.hashtable.loadfactor</name>\n  <value>0.75</value>\n  <description>In the process of Mapjoin, the key/value will be hold in the hashtable. This value means the load factor for the in-memory hashtable</description>\n</property>\n\n<property>\n  <name>hive.mapjoin.smalltable.filesize</name>\n  <value>25000000</value>\n  <description>The threshold for the input file size of the small tables; if the file size is smaller than this threshold, it will try to convert the common join into map join</description>\n</property>\n\n<property>\n<name>mapred.job.tracker</name>\n<value>foobar</value>\n</property>\n\n<property>\n  <name>hive.mapjoin.localtask.max.memory.usage</name>\n  <value>0.90</value>\n  <description>This number means how much memory the local task can take to hold the key/value into in-memory hash table; If the local task's memory usage is more than this number, the local task will be abort by themself. It means the data of small table is too large to be hold in the memory.</description>\n</property>\n\n<property>\n  <name>hive.mapjoin.followby.gby.localtask.max.memory.usage</name>\n  <value>0.55</value>\n  <description>This number means how much memory the local task can take to hold the key/value into in-memory hash table when this map join followed by a group by; If the local task's memory usage is more than this number, the local task will be abort by themself. It means the data of small table is too large to be hold in the memory.</description>\n</property>\n\n<property>\n  <name>hive.mapjoin.check.memory.rows</name>\n  <value>100000</value>\n  <description>The number means after how many rows processed it needs to check the memory usage</description>\n</property>\n\n<property>\n  <name>hive.auto.convert.join</name>\n  <value>false</value>\n  <description>Whether Hive enable the optimization about converting common join into mapjoin based on the input file size</description>\n</property>\n\n\n<property>\n  <name>hive.script.auto.progress</name>\n  <value>false</value>\n  <description>Whether Hive Tranform/Map/Reduce Clause should automatically send progress information to TaskTracker to avoid the task getting killed because of inactivity.  Hive sends progress information when the script is outputting to stderr.  This option removes the need of periodically producing stderr messages, but users should be cautious because this may prevent infinite loops in the scripts to be killed by TaskTracker.  </description>\n</property>\n\n<property>\n  <name>hive.script.serde</name>\n  <value>org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe</value>\n  <description>The default serde for trasmitting input data to and reading output data from the user scripts. </description>\n</property>\n\n<property>\n  <name>hive.script.recordreader</name>\n  <value>org.apache.hadoop.hive.ql.exec.TextRecordReader</value>\n  <description>The default record reader for reading data from the user scripts. </description>\n</property>\n\n<property>\n  <name>hive.script.recordwriter</name>\n  <value>org.apache.hadoop.hive.ql.exec.TextRecordWriter</value>\n  <description>The default record writer for writing data to the user scripts. </description>\n</property>\n\n<property>\n  <name>hive.input.format</name>\n  <value>org.apache.hadoop.hive.ql.io.CombineHiveInputFormat</value>\n  <description>The default input format. Set this to HiveInputFormat if you encounter problems with CombineHiveInputFormat.</description>\n</property>\n\n<property>\n  <name>hive.udtf.auto.progress</name>\n  <value>false</value>\n  <description>Whether Hive should automatically send progress information to TaskTracker when using UDTF's to prevent the task getting killed because of inactivity.  Users should be cautious because this may prevent TaskTracker from killing tasks with infinte loops.  </description>\n</property>\n\n<property>\n  <name>hive.mapred.reduce.tasks.speculative.execution</name>\n  <value>true</value>\n  <description>Whether speculative execution for reducers should be turned on. </description>\n</property>\n\n<property>\n  <name>hive.exec.counters.pull.interval</name>\n  <value>1000</value>\n  <description>The interval with which to poll the JobTracker for the counters the running job. The smaller it is the more load there will be on the jobtracker, the higher it is the less granular the caught will be.</description>\n</property>\n\n<property>\n  <name>hive.enforce.bucketing</name>\n  <value>false</value>\n  <description>Whether bucketing is enforced. If true, while inserting into the table, bucketing is enforced. </description>\n</property>\n\n<property>\n  <name>hive.enforce.sorting</name>\n  <value>false</value>\n  <description>Whether sorting is enforced. If true, while inserting into the table, sorting is enforced. </description>\n</property>\n\n<property>\n  <name>hive.metastore.ds.connection.url.hook</name>\n  <value></value>\n  <description>Name of the hook to use for retriving the JDO connection URL. If empty, the value in javax.jdo.option.ConnectionURL is used </description>\n</property>\n\n<property>\n  <name>hive.metastore.ds.retry.attempts</name>\n  <value>1</value>\n  <description>The number of times to retry a metastore call if there were a connection error</description>\n</property>\n\n<property>\n   <name>hive.metastore.ds.retry.interval</name>\n   <value>1000</value>\n   <description>The number of miliseconds between metastore retry attempts</description>\n</property>\n\n<property>\n  <name>hive.metastore.server.min.threads</name>\n  <value>200</value>\n  <description>Minimum number of worker threads in the Thrift server's pool.</description>\n</property>\n\n<property>\n  <name>hive.metastore.server.max.threads</name>\n  <value>100000</value>\n  <description>Maximum number of worker threads in the Thrift server's pool.</description>\n</property>\n\n<property>\n  <name>hive.metastore.server.tcp.keepalive</name>\n  <value>true</value>\n  <description>Whether to enable TCP keepalive for the metastore server. Keepalive will prevent accumulation of half-open connections.</description>\n</property>\n\n<property>\n  <name>hive.metastore.sasl.enabled</name>\n  <value>false</value>\n  <description>If true, the metastore thrift interface will be secured with SASL. Clients must authenticate with Kerberos.</description>\n</property>\n\n<property>\n  <name>hive.metastore.kerberos.keytab.file</name>\n  <value></value>\n  <description>The path to the Kerberos Keytab file containing the metastore thrift server's service principal.</description>\n</property>\n\n<property>\n  <name>hive.metastore.kerberos.principal</name>\n  <value>hive-metastore/_HOST@EXAMPLE.COM</value>\n  <description>The service principal for the metastore thrift server. The special string _HOST will be replaced automatically with the correct host name.</description>\n</property>\n\n<property>\n  <name>hive.metastore.cache.pinobjtypes</name>\n  <value>Table,StorageDescriptor,SerDeInfo,Partition,Database,Type,FieldSchema,Order</value>\n  <description>List of comma separated metastore object types that should be pinned in the cache</description>\n</property>\n\n<property>\n  <name>hive.optimize.reducededuplication</name>\n  <value>true</value>\n  <description>Remove extra map-reduce jobs if the data is already clustered by the same key which needs to be used again. This should always be set to true. Since it is a new feature, it has been made configurable.</description>\n</property>\n\n<property>\n  <name>hive.exec.dynamic.partition</name>\n  <value>false</value>\n  <description>Whether or not to allow dynamic partitions in DML/DDL.</description>\n</property>\n\n<property>\n  <name>hive.exec.dynamic.partition.mode</name>\n  <value>strict</value>\n  <description>In strict mode, the user must specify at least one static partition in case the user accidentally overwrites all partitions.</description>\n</property>\n\n<property>\n  <name>hive.exec.max.dynamic.partitions</name>\n  <value>1000</value>\n  <description>Maximum number of dynamic partitions allowed to be created in total.</description>\n</property>\n\n<property>\n  <name>hive.exec.max.dynamic.partitions.pernode</name>\n  <value>100</value>\n  <description>Maximum number of dynamic partitions allowed to be created in each mapper/reducer node.</description>\n</property>\n\n<property>\n  <name>hive.exec.max.created.files</name>\n  <value>100000</value>\n  <description>Maximum number of HDFS files created by all mappers/reducers in a MapReduce job.</description>\n</property>\n\n<property>\n  <name>hive.exec.default.partition.name</name>\n  <value>__HIVE_DEFAULT_PARTITION__</value>\n  <description>The default partition name in case the dynamic partition column value is null/empty string or anyother values that cannot be escaped. This value must not contain any special character used in HDFS URI (e.g., ':', '%', '/' etc). The user has to be aware that the dynamic partition value should not contain this value to avoid confusions.</description>\n</property>\n\n<property>\n  <name>hive.stats.dbclass</name>\n  <value>jdbc:derby</value>\n  <description>The default database that stores temporary hive statistics.</description>\n</property>\n\n<property>\n  <name>hive.stats.autogather</name>\n  <value>true</value>\n  <description>A flag to gather statistics automatically during the INSERT OVERWRITE command.</description>\n</property>\n\n<property>\n  <name>hive.stats.jdbcdriver</name>\n  <value>org.apache.derby.jdbc.EmbeddedDriver</value>\n  <description>The JDBC driver for the database that stores temporary hive statistics.</description>\n</property>\n\n<property>\n  <name>hive.stats.dbconnectionstring</name>\n  <value>jdbc:derby:;databaseName=TempStatsStore;create=true</value>\n  <description>The default connection string for the database that stores temporary hive statistics.</description>\n</property>\n\n<property>\n  <name>hive.stats.default.publisher</name>\n  <value></value>\n  <description>The Java class (implementing the StatsPublisher interface) that is used by default if hive.stats.dbclass is not JDBC or HBase.</description>\n</property>\n\n<property>\n  <name>hive.stats.default.aggregator</name>\n  <value></value>\n  <description>The Java class (implementing the StatsAggregator interface) that is used by default if hive.stats.dbclass is not JDBC or HBase.</description>\n</property>\n\n<property>\n  <name>hive.stats.jdbc.timeout</name>\n  <value>30</value>\n  <description>Timeout value (number of seconds) used by JDBC connection and statements.</description>\n</property>\n\n<property>\n  <name>hive.stats.jdbc.atomic</name>\n  <value>false</value>\n  <description>If this is set to true then the metastore stats will be updated only if all types of stats (# of rows, # of files, # of bytes etc.) are available. Otherwise metastore stats are updated in a best effort fashion with whatever are available.</description>\n</property>\n\n<property>\n  <name>hive.support.concurrency</name>\n  <value>false</value>\n  <description>Whether hive supports concurrency or not. A zookeeper instance must be up and running for the default hive lock manager to support read-write locks.</description>\n</property>\n\n<property>\n  <name>hive.concurrency.manager</name>\n  <value>org.apache.hadoop.hive.ql.lockmgr.ZooKeeperLockMgr</value>\n  <description>The concurrency manager for hive.</description>\n</property>\n\n<property>\n  <name>hive.lock.numretries</name>\n  <value>100</value>\n  <description>The number of times you want to try to get all the locks</description>\n</property>\n\n<property>\n  <name>hive.lock.sleep.between.retries</name>\n  <value>60</value>\n  <description>The sleep time (in seconds) between various retries</description>\n</property>\n\n<property>\n  <name>hive.zookeeper.quorum</name>\n  <value></value>\n  <description>The list of zookeeper servers to talk to. This is only needed for read/write locks.</description>\n</property>\n\n<property>\n  <name>hive.zookeeper.client.port</name>\n  <value>2181</value>\n  <description>The port of zookeeper servers to talk to. This is only needed for read/write locks.</description>\n</property>\n\n<property>\n  <name>hive.zookeeper.session.timeout</name>\n  <value></value>\n  <description>Zookeeper client's session timeout. The client is disconnected, and as a result, all locks released, if a heartbeat is not sent in the timeout.</description>\n</property>\n\n<property>\n  <name>hive.zookeeper.namespace</name>\n  <value>hive_zookeeper_namespace</value>\n  <description>The parent node under which all zookeeper nodes are created.</description>\n</property>\n\n<property>\n  <name>hive.zookeeper.clean.extra.nodes</name>\n  <value>false</value>\n  <description>Clean extra nodes at the end of the session.</description>\n</property>\n\n<property>\n  <name>fs.har.impl</name>\n  <value>org.apache.hadoop.hive.shims.HiveHarFileSystem</value>\n  <description>The implementation for accessing Hadoop Archives. Note that this won't be applicable to Hadoop vers less than 0.20</description>\n</property>\n\n<property>\n  <name>hive.archive.enabled</name>\n  <value>false</value>\n  <description>Whether archiving operations are permitted</description>\n</property>\n\n<property>\n  <name>hive.archive.har.parentdir.settable</name>\n  <value>false</value>\n  <description>In new Hadoop versions, the parent directory must be set while\n  creating a HAR. Because this functionality is hard to detect with just version\n  numbers, this conf var needs to be set manually.</description>\n</property>\n\n<property>\n  <name>hive.fetch.output.serde</name>\n  <value>org.apache.hadoop.hive.serde2.DelimitedJSONSerDe</value>\n  <description>The serde used by FetchTask to serialize the fetch output.</description>\n</property>\n\n<property>\n  <name>hive.exec.mode.local.auto</name>\n  <value>false</value>\n  <description> Let hive determine whether to run in local mode automatically </description>\n</property>\n\n<property>\n  <name>hive.exec.drop.ignorenonexistent</name>\n  <value>true</value>\n  <description>\n    Do not report an error if DROP TABLE/VIEW specifies a non-existent table/view\n  </description>\n</property>\n\n<property>\n  <name>hive.exec.show.job.failure.debug.info</name>\n  <value>false</value>\n  <description>\n  \tIf a job fails, whether to provide a link in the CLI to the task with the\n  \tmost failures, along with debugging hints if applicable.\n  </description>\n</property>\n\n<property>\n  <name>hive.auto.progress.timeout</name>\n  <value>0</value>\n  <description>\n    How long to run autoprogressor for the script/UDTF operators (in seconds).\n    Set to 0 for forever.\n  </description>\n</property>\n\n<!-- HBase Storage Handler Parameters -->\n\n<property>\n  <name>hive.hbase.wal.enabled</name>\n  <value>true</value>\n  <description>Whether writes to HBase should be forced to the write-ahead log.  Disabling this improves HBase write performance at the risk of lost writes in case of a crash.</description>\n</property>\n\n<property>\n  <name>hive.table.parameters.default</name>\n  <value></value>\n  <description>Default property values for newly created tables</description>\n</property>\n\n<property>\n  <name>hive.variable.substitute</name>\n  <value>true</value>\n  <description>This enables substitution using syntax like ${var} ${system:var} and ${env:var}.</description>\n</property>\n\n\n<property>\n  <name>hive.security.authorization.enabled</name>\n  <value>false</value>\n  <description>enable or disable the hive client authorization</description>\n</property>\n\n<property>\n  <name>hive.security.authorization.manager</name>\n  <value>org.apache.hadoop.hive.ql.security.authorization.DefaultHiveAuthorizationProvider</value>\n  <description>the hive client authorization manager class name.\n  The user defined authorization class should implement interface org.apache.hadoop.hive.ql.security.authorization.HiveAuthorizationProvider. \n  </description>\n</property>\n\n<property>\n  <name>hive.security.authenticator.manager</name>\n  <value>org.apache.hadoop.hive.ql.security.HadoopDefaultAuthenticator</value>\n  <description>hive client authenticator manager class name. \n  The user defined authenticator should implement interface org.apache.hadoop.hive.ql.security.HiveAuthenticationProvider.</description>\n</property>\n\n<property>\n  <name>hive.security.authorization.createtable.user.grants</name>\n  <value></value>\n  <description>the privileges automatically granted to some users whenever a table gets created. \n   An example like \"userX,userY:select;userZ:create\" will grant select privilege to userX and userY, \n   and grant create privilege to userZ whenever a new table created.</description>\n</property>\n\n<property>\n  <name>hive.security.authorization.createtable.group.grants</name>\n  <value></value>\n  <description>the privileges automatically granted to some groups whenever a table gets created. \n   An example like \"groupX,groupY:select;groupZ:create\" will grant select privilege to groupX and groupY, \n   and grant create privilege to groupZ whenever a new table created.</description>\n</property>\n\n<property>\n  <name>hive.security.authorization.createtable.role.grants</name>\n  <value></value>\n  <description>the privileges automatically granted to some roles whenever a table gets created. \n   An example like \"roleX,roleY:select;roleZ:create\" will grant select privilege to roleX and roleY, \n   and grant create privilege to roleZ whenever a new table created.</description>\n</property>\n\n<property>\n  <name>hive.security.authorization.createtable.owner.grants</name>\n  <value></value>\n  <description>the privileges automatically granted to the owner whenever a table gets created. \n   An example like \"select,drop\" will grant select and drop privilege to the owner of the table</description>\n</property>\n\n<property>\n  <name>hive.error.on.empty.partition</name>\n  <value>false</value>\n  <description>Whether to throw an excpetion if dynamic partition insert generates empty results.</description>\n</property>\n\n<property>\n  <name>hive.index.compact.file.ignore.hdfs</name>\n  <value>false</value>\n  <description>True the hdfs location stored in the index file will be igbored at runtime. \n  If the data got moved or the name of the cluster got changed, the index data should still be usable.</description>\n</property>\n\n<property>\n  <name>hive.rework.mapredwork</name>\n  <value>false</value>\n  <description>should rework the mapred work or not.\n  This is first introduced by SymlinkTextInputFormat to replace symlink files with real paths at compile time.</description>\n</property>\n\n<property>\n  <name>hive.output.file.extension</name>\n  <value></value>\n  <description>String used as a file extension for output files. If not set, defaults to the codec extension for text files (e.g. \".gz\"), or no extension otherwise.</description>\n</property>\n\n<property>    \n  <name>fs.default.name</name>\n  <value>hdfs://{{name_node}}:8020/</value>\n</property>\n\n</configuration>\n"
  },
  {
    "path": "deploy/ec2/template/prepare_logs.sh",
    "content": "#!/bin/bash\ncp /disk1/sparrow/shark_* /root/\ntouch foo.log && gzip -f *.log\n"
  },
  {
    "path": "deploy/ec2/template/shark-env.sh",
    "content": "#!/usr/bin/env bash\n\n# Copyright (C) 2012 The Regents of The University California.\n# All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n# (Required) Amount of memory used per slave node. This should be in the same\n# format as the JVM's -Xmx option, e.g. 300m or 1g.\nexport SPARK_MEM=15g\n\n# (Required) Set the master program's memory\nexport SHARK_MASTER_MEM=1g\n\n# (Required) Point to your Scala installation.\nexport SCALA_HOME=\"/opt/scala-2.9.3\"\nexport SCALA_VERSON=2.9.3\n# Use this for non-HVM amis:\nexport JAVA_HOME=\"/usr/lib/jvm/java-6-sun/jre\"\n# Use this for HVM amis:\n#export JAVA_HOME=\"/usr/lib/jvm/jre-1.6.0-openjdk.x86_64\"\n\n# (Required) Point to the patched Hive binary distribution\nexport HIVE_DEV_HOME=\"/opt/hive\"\nexport HIVE_HOME=\"$HIVE_DEV_HOME/build/dist\"\n\n# (Optional) Specify the location of Hive's configuration directory. By default,\n# it points to $HIVE_HOME/conf\nexport HIVE_CONF_DIR=\"$HIVE_DEV_HOME/conf\"\n\n# For running Shark in distributed mode, set the following:\nexport HADOOP_HOME=\"/opt/hadoop/\"\nexport SPARK_HOME=\"/disk1/tmp/spark/\"\n\nmy_ip=`hostname -i`\nbefore_me=`cat /root/sparrow_schedulers.txt | grep -B 1000 $my_ip | grep -v $my_ip | tr \"\\n\" \",\"`\nafter_me=`cat /root/sparrow_schedulers.txt | grep -A 1000 $my_ip | grep -v $my_ip | tr \"\\n\" \",\"`\nexport MASTER=\"sparrow@$my_ip:20503,\"\n# Temp fix: need to add this back to the master thing for fault tolerance $before_me$after_me\"\n\n# Only required if using Mesos:\n#export MESOS_NATIVE_LIBRARY=/usr/local/lib/libmesos.so \n\n# (Optional) Extra classpath\n#export SPARK_LIBRARY_PATH=\"\"\n\n# Java options\n# On EC2, change the local.dir to /mnt/tmp\nSPARK_JAVA_OPTS=\"-Dspark.local.dir=/tmp \"\nSPARK_JAVA_OPTS+=\"-Dspark.serializer=spark.KryoSerializer -Dspark.kryoserializer.buffer.mb=10 \"\nSPARK_JAVA_OPTS+=\"-verbose:gc -XX:-PrintGCDetails -XX:+PrintGCTimeStamps -XX:+UseConcMarkSweepGC\"\nSPARK_JAVA_OPTS+=\" -Dsparrow.app.name=spark_`hostname -i`\"\n# Spark options that are usually sent to the executor using environment variables packaged\n# from the Spark master, but that we need to set manually when running with Sparrow.\nSPARK_JAVA_OPTS+=\" -Dspark.broadcast.port=33624 -Dspark.driver.port=60500\"\nSPARK_JAVA_OPTS+=\" -Dspark.io.compression.codec=spark.io.LZFCompressionCodec\"\nexport SPARK_JAVA_OPTS\n"
  },
  {
    "path": "deploy/ec2/template/spark-env.sh",
    "content": "#!/usr/bin/env bash\n\n# Set Spark environment variables for your site in this file. Some useful\n# variables to set are:\n# - MESOS_HOME, to point to your Mesos installation\n# - SCALA_HOME, to point to your Scala installation\nSCALA_HOME=/opt/scala-2.9.3\nSPARK_CLASSPATH=\"/root/spark/core/lib/sparrow-1.0-SNAPSHOT.jar\"\n\n# Add Shark jars\nSHARK_HOME=\"/root/shark\"\nSPARK_CLASSPATH+=:$SHARK_HOME/target/scala-$SCALA_VERSION/classes\nfor jar in `find $SHARK_HOME/lib -name '*jar'`; do\n  SPARK_CLASSPATH+=:$jar\ndone\nfor jar in `find $SHARK_HOME/lib_managed/jars -name '*jar'`; do\n  SPARK_CLASSPATH+=:$jar\ndone\nfor jar in `find $SHARK_HOME/lib_managed/bundles -name '*jar'`; do\n  SPARK_CLASSPATH+=:$jar\ndone\n\n# Add Hive jars.\nexport HIVE_HOME=\"/opt/hive/build/dist\"\nfor jar in `find $HIVE_HOME/lib -name '*jar'`; do\n  # Ignore the logging library since it has already been included with the Spark jar.\n  if [[ \"$jar\" != *slf4j* ]]; then\n    SPARK_CLASSPATH+=:$jar\n  fi\ndone\n\n# Add location of Hive configuration file.\nSPARK_CLASSPATH+=:/opt/hive/conf/\n\nSPARK_JAVA_OPTS=\"-Dspark.io.compression.codec=spark.io.LZFCompressionCodec -Dspark.local.dir=/disk1/spark-tmp\"\n# - SPARK_MEM, to change the amount of memory used per node (this should\n#   be in the same format as the JVM's -Xmx option, e.g. 300m or 1g).\n# - SPARK_LIBRARY_PATH, to add extra search paths for native libraries.\n\n\n"
  },
  {
    "path": "deploy/ec2/template/spark-run.sh",
    "content": "#!/usr/bin/env bash\n\n#\n# Licensed to the Apache Software Foundation (ASF) under one or more\n# contributor license agreements.  See the NOTICE file distributed with\n# this work for additional information regarding copyright ownership.\n# The ASF licenses this file to You under the Apache License, Version 2.0\n# (the \"License\"); you may not use this file except in compliance with\n# the License.  You may obtain a copy of the License at\n#\n#    http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n\nSCALA_VERSION=2.9.3\n\n# Figure out where the Scala framework is installed\nFWDIR=\"$(cd `dirname $0`; pwd)\"\n\n# Export this as SPARK_HOME\nexport SPARK_HOME=\"$FWDIR\"\n\n# Load environment variables from conf/spark-env.sh, if it exists\nif [ -e $FWDIR/conf/spark-env.sh ] ; then\n  . $FWDIR/conf/spark-env.sh\nfi\n\nif [ -z \"$1\" ]; then\n  echo \"Usage: run <spark-class> [<args>]\" >&2\n  exit 1\nfi\n\n# If this is a standalone cluster daemon, reset SPARK_JAVA_OPTS and SPARK_MEM to reasonable\n# values for that; it doesn't need a lot\nif [ \"$1\" = \"spark.deploy.master.Master\" -o \"$1\" = \"spark.deploy.worker.Worker\" ]; then\n  SPARK_MEM=${SPARK_DAEMON_MEMORY:-512m}\n  SPARK_DAEMON_JAVA_OPTS=\"$SPARK_DAEMON_JAVA_OPTS -Dspark.akka.logLifecycleEvents=true\"\n  # Do not overwrite SPARK_JAVA_OPTS environment variable in this script\n  OUR_JAVA_OPTS=\"$SPARK_DAEMON_JAVA_OPTS\"   # Empty by default\nelse\n  OUR_JAVA_OPTS=\"$SPARK_JAVA_OPTS\"\nfi\n\n\n# Add java opts for master, worker, executor. The opts maybe null\ncase \"$1\" in\n  'spark.deploy.master.Master')\n    OUR_JAVA_OPTS=\"$OUR_JAVA_OPTS $SPARK_MASTER_OPTS\"\n    ;;\n  'spark.deploy.worker.Worker')\n    OUR_JAVA_OPTS=\"$OUR_JAVA_OPTS $SPARK_WORKER_OPTS\"\n    ;;\n  'spark.executor.StandaloneExecutorBackend')\n    OUR_JAVA_OPTS=\"$OUR_JAVA_OPTS $SPARK_EXECUTOR_OPTS\"\n    ;;\n  'spark.executor.MesosExecutorBackend')\n    OUR_JAVA_OPTS=\"$OUR_JAVA_OPTS $SPARK_EXECUTOR_OPTS\"\n    ;;\n  'spark.repl.Main')\n    OUR_JAVA_OPTS=\"$OUR_JAVA_OPTS $SPARK_REPL_OPTS\"\n    ;;\nesac\n\n# Figure out whether to run our class with java or with the scala launcher.\n# In most cases, we'd prefer to execute our process with java because scala\n# creates a shell script as the parent of its Java process, which makes it\n# hard to kill the child with stuff like Process.destroy(). However, for\n# the Spark shell, the wrapper is necessary to properly reset the terminal\n# when we exit, so we allow it to set a variable to launch with scala.\n# We still fall back on java for the shell if this is a \"release\" created\n# from make-distribution.sh since it's possible scala is not installed\n# but we have everything we need to run the shell.\nif [[ \"$SPARK_LAUNCH_WITH_SCALA\" == \"1\" && ! -f \"$FWDIR/RELEASE\" ]]; then\n  if [ \"$SCALA_HOME\" ]; then\n    RUNNER=\"${SCALA_HOME}/bin/scala\"\n  else\n    if [ `command -v scala` ]; then\n      RUNNER=\"scala\"\n    else\n      echo \"SCALA_HOME is not set and scala is not in PATH\" >&2\n      exit 1\n    fi\n  fi\nelse\n  if [ -n \"${JAVA_HOME}\" ]; then\n    RUNNER=\"${JAVA_HOME}/bin/java\"\n  else\n    if [ `command -v java` ]; then\n      RUNNER=\"java\"\n    else\n      echo \"JAVA_HOME is not set\" >&2\n      exit 1\n    fi\n  fi\n  if [[ ! -f \"$FWDIR/RELEASE\" && -z \"$SCALA_LIBRARY_PATH\" ]]; then\n    if [ -z \"$SCALA_HOME\" ]; then\n      echo \"SCALA_HOME is not set\" >&2\n      exit 1\n    fi\n    SCALA_LIBRARY_PATH=\"$SCALA_HOME/lib\"\n  fi\nfi\n\n# Figure out how much memory to use per executor and set it as an environment\n# variable so that our process sees it and can report it to Mesos\nif [ -z \"$SPARK_MEM\" ] ; then\n  SPARK_MEM=\"512m\"\nfi\nexport SPARK_MEM\n\n# Set JAVA_OPTS to be able to load native libraries and to set heap size\nJAVA_OPTS=\"$OUR_JAVA_OPTS\"\nJAVA_OPTS=\"$JAVA_OPTS -Djava.library.path=$SPARK_LIBRARY_PATH\"\nJAVA_OPTS=\"$JAVA_OPTS -Xms$SPARK_MEM -Xmx$SPARK_MEM\"\n# Load extra JAVA_OPTS from conf/java-opts, if it exists\nif [ -e $FWDIR/conf/java-opts ] ; then\n  JAVA_OPTS=\"$JAVA_OPTS `cat $FWDIR/conf/java-opts`\"\nfi\nexport JAVA_OPTS\n# Attention: when changing the way the JAVA_OPTS are assembled, the change must be reflected in ExecutorRunner.scala!\n\nif [ ! -f \"$FWDIR/RELEASE\" ]; then\n  CORE_DIR=\"$FWDIR/core\"\n  EXAMPLES_DIR=\"$FWDIR/examples\"\n  REPL_DIR=\"$FWDIR/repl\"\n\n  # Exit if the user hasn't compiled Spark\n  if [ ! -e \"$CORE_DIR/target\" ]; then\n    echo \"Failed to find Spark classes in $CORE_DIR/target\" >&2\n    echo \"You need to compile Spark before running this program\" >&2\n    exit 1\n  fi\n\n  if [[ \"$@\" = *repl* && ! -e \"$REPL_DIR/target\" ]]; then\n    echo \"Failed to find Spark classes in $REPL_DIR/target\" >&2\n    echo \"You need to compile Spark repl module before running this program\" >&2\n    exit 1\n  fi\n\n  # Figure out the JAR file that our examples were packaged into. This includes a bit of a hack\n  # to avoid the -sources and -doc packages that are built by publish-local.\n  if [ -e \"$EXAMPLES_DIR/target/scala-$SCALA_VERSION/spark-examples\"*[0-9T].jar ]; then\n    # Use the JAR from the SBT build\n    export SPARK_EXAMPLES_JAR=`ls \"$EXAMPLES_DIR/target/scala-$SCALA_VERSION/spark-examples\"*[0-9T].jar`\n  fi\n  if [ -e \"$EXAMPLES_DIR/target/spark-examples\"*[0-9T].jar ]; then\n    # Use the JAR from the Maven build\n    export SPARK_EXAMPLES_JAR=`ls \"$EXAMPLES_DIR/target/spark-examples\"*[0-9T].jar`\n  fi\nfi\n\n# Compute classpath using external script\nCLASSPATH=`$FWDIR/bin/compute-classpath.sh`\nexport CLASSPATH\n\nif [ \"$SPARK_LAUNCH_WITH_SCALA\" == \"1\" ]; then\n  EXTRA_ARGS=\"\"     # Java options will be passed to scala as JAVA_OPTS\nelse\n  # The JVM doesn't read JAVA_OPTS by default so we need to pass it in\n  EXTRA_ARGS=\"$JAVA_OPTS\"\nfi\n\ncommand=\"$RUNNER -cp \\\"$CLASSPATH\\\" $EXTRA_ARGS $@\"\nif [ \"$SPARK_PRINT_LAUNCH_COMMAND\" == \"1\" ]; then\n  echo \"Spark Command: $command\"\n  echo \"========================================\"\n  echo\nfi\n\nexec \"$RUNNER\" -cp \"$CLASSPATH\" $EXTRA_ARGS \"$@\"\n"
  },
  {
    "path": "deploy/ec2/template/sparrow.conf",
    "content": "deployment.mode = configbased\nstatic.node_monitors = {{static_backends}}\nsystem.cpus = {{cpus}}\nstatic.app.name = spark\nscheduler.thrift.threads = 200\nlog_level = DEBUG\nagent.thrift.threads = 200\ninternal_agent.thrift.threads = 200\nsample.ratio = {{sample_ratio}}\nsample.ratio.constrained = {{sample_ratio_constrained}}\nnode_monitor.task_scheduler = {{node_monitor_task_scheduler}}\ncancellation = True\nspread_evenly_task_set_size={{num_partitions}}\nper_task = True\n"
  },
  {
    "path": "deploy/ec2/template/sparrow_schedulers.txt",
    "content": "{{sparrow_schedulers}}\n"
  },
  {
    "path": "deploy/ec2/template/start_mesos_master.sh",
    "content": "#!/bin/bash\n# Start mesos master\n\n# Make sure software firewall is stopped (ec2 firewall subsumes)\n/etc/init.d/iptables stop > /dev/null 2>&1\n\nAPPCHK=$(ps aux | grep -v grep | grep -c mesos-master)\n\nif [ ! $APPCHK = '0' ]; then\n  echo \"Mesos master already running, cannot start it.\"\n  exit 1;\nfi\n\nLOG=/disk1/sparrow/mesosMaster.log\nnohup /opt/mesos/bin/mesos-master > $LOG 2>&1 &\nPID=$!\necho \"Logging to $LOG\"\nsleep 1\nif ! kill -0 $PID > /dev/null 2>&1; then\n  echo \"Mesos masger failed to start\"\n  exit 1;\nelse\n  echo \"Mesos master started with pid $PID\"\n  exit 0;\nfi\n"
  },
  {
    "path": "deploy/ec2/template/start_mesos_slave.sh",
    "content": "#!/bin/bash\n# Start mesos slave\n\n# Make sure software firewall is stopped (ec2 firewall subsumes)\n/etc/init.d/iptables stop > /dev/null 2>&1\n\nAPPCHK=$(ps aux | grep -v grep | grep -c mesos-slave)\n\nexport MESOS_HOME=\"/opt/mesos\"\n\nCPUS=`grep processor /proc/cpuinfo | wc -l`\n#CPUS=8\nMEM_KB=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`\nMEM=$[(MEM_KB - 1024 * 1024) / 1024] # Leaves 1 GB free\nRES_OPTS=\"--resources=cpus:$CPUS;mem:$MEM\"\n\nif [ ! $APPCHK = '0' ]; then\n  echo \"Mesos slave already running, cannot start it.\"\n  exit 1;\nfi\nMASTER=`cat frontends.txt | head -n 1`\nLOG=/disk1/sparrow/mesosSlave.log\nHOSTNAME=`ec2metadata  | grep local-hostname  | cut -d \" \" -f 2`\nexport SPARK_HOSTNAME=$HOSTNAME\n\nnohup /opt/mesos/bin/mesos-slave $RES_OPTS --master=mesos://master@$MASTER:5050> $LOG 2>&1 &\nPID=$!\necho \"Logging to $LOG\"\nsleep 1\nif ! kill -0 $PID > /dev/null 2>&1; then\n  echo \"Mesos slave failed to start\"\n  exit 1;\nelse\n  echo \"Mesos slave started with pid $PID\"\n  exit 0;\nfi\n"
  },
  {
    "path": "deploy/ec2/template/start_proto_backend.sh",
    "content": "#!/bin/bash\n# Start Prototype backend\n\nLOG=/disk1/sparrow/protoBackend\n\nAPPCHK=$(ps aux | grep -v grep | grep -c ProtoBackend)\n\nif [ ! $APPCHK = '0' ]; then\n  echo \"Backend already running, cannot start it.\"\n  exit 1;\nfi\n\nnohup java -cp ./sparrow/sparrow-1.0-SNAPSHOT.jar edu.berkeley.sparrow.examples.ProtoBackend  > $LOG 2>&1 &\nPID=$!\necho \"Logging to $LOG\"\nsleep 1\nif ! kill -0 $PID > /dev/null 2>&1; then\n  echo \"Proto backend failed to start\"\n  exit 1;\nelse\n  echo \"Proto backend started with pid $PID\"\n  exit 0;\nfi\n"
  },
  {
    "path": "deploy/ec2/template/start_proto_frontend.sh",
    "content": "#!/bin/bash\n# Start Prototype frontend\n\nLOG=/disk1/sparrow/protoFrontend.log\n\nAPPCHK=$(ps aux | grep -v grep | grep -c {{frontend_type}})\n\nif [ ! $APPCHK = '0' ]; then\n  echo \"Frontend already running, cannot start it.\"\n  exit 1;\nfi\n\nnohup java -XX:+UseConcMarkSweepGC -verbose:gc -XX:+PrintGCTimeStamps -Xmx2046m -XX:+PrintGCDetails  -cp ./sparrow/sparrow-1.0-SNAPSHOT.jar edu.berkeley.sparrow.examples.{{frontend_type}} -c frontend.conf > $LOG 2>&1 &\nPID=$!\necho \"Logging to $LOG\"\nsleep 1\nif ! kill -0 $PID > /dev/null 2>&1; then\n  echo \"Proto frontend failed to start\"\n  exit 1;\nelse\n  echo \"Proto frontend started with pid $PID\"\n  exit 0;\nfi\n"
  },
  {
    "path": "deploy/ec2/template/start_shark_tpch.sh",
    "content": "#!/bin/bash\n# Start shark tpch workload\nulimit -n 16384\n\nAPPCHK=$(ps aux | grep -v grep |grep -v start| grep java | grep -c spark)\n\nip=`ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}'`\nlog=\"/disk1/sparrow/shark_$ip.log\"\n\npublic_hostname=`ec2metadata  | grep public-hostname  | cut -d \" \" -f 2`\nfe_num=`cat frontends.txt | grep -n $public_hostname | cut -d \":\" -f 1`\n\ncd /disk1/sparrow/\nsleep .0$[ ( $RANDOM % 10 ) + 1 ]s # Helps avoid synchronization\n/root/shark/run shark.sparrow.SparrowTPCHRunner /root/tpch/tpch_workload_$fe_num {{inter_query_delay}} > $log 2>&1 &\n\nPID=$!\necho \"Logging to $log\"\nsleep 1\nif ! kill -0 $PID > /dev/null 2>&1; then\n  echo \"Shark TPCH failed to start\"\n  exit 1;\nelse\n  echo \"Shark TPCH started with pid $PID\"\n  exit 0;\nfi\n"
  },
  {
    "path": "deploy/ec2/template/start_spark_backend.sh",
    "content": "#!/bin/bash\n# Start Spark backend\nulimit -n 16384\nFRONTENDS=`cat frontends.txt`\n\n\nAPPCHK=$(ps aux | grep -v grep | grep spark |grep -c java)\n\nif [ ! $APPCHK = '0' ]; then\n  echo \"Spark already running, cannot start it.\"\n  exit 1;\nfi\n\nport=8300\nfor fe in $FRONTENDS; do\n  ip=`dig +short $fe`\n  id=spark_$ip\n  log=/disk1/sparrow/$id\n  chmod 755 spark-run.sh\n  HOSTNAME=`ec2metadata  | grep local-hostname  | cut -d \" \" -f 2`\n  export SPARK_HOSTNAME=$HOSTNAME\n  export SPARK_MEM={{spark_backend_mem}}\n  name=`host $ip | cut -d \" \" -f 5 | cut -d \".\" -f 1-3`\n\n  /root/spark/run -Dspark.scheduler=sparrow -Dspark.master.port=7077 -Dspark.hostname=$HOSTNAME -Dspark.serializer=spark.KryoSerializer -Dspark.driver.host=$name -Dspark.driver.port=60500 -Dsparrow.app.name=$id -Dsparrow.app.port=$port -Dspark.httpBroadcast.uri=http://$ip:33624 spark.scheduler.sparrow.SparrowExecutorBackend > $log 2>&1 &\n  ((port++))\n  PID=$!\n  echo \"Logging to $log\"\n  sleep .5\n  if ! kill -0 $PID > /dev/null 2>&1; then\n    echo \"Spark executor failed to start\"\n    exit 1;\n  else\n    echo \"Spark executor started with pid $PID\"\n  fi\ndone\n"
  },
  {
    "path": "deploy/ec2/template/start_spark_frontend.sh",
    "content": "#!/bin/bash\n# Start Prototype frontend\nulimit -n 16384\n\nAPPCHK=$(ps aux | grep -v grep |grep -v start| grep java | grep -c spark)\nSCHED=$1\nRATE=$2\nMAX=$3\nQNUM=$4\nPAR_LEVEL=$5\nMESOS_MASTER=`cat frontends.txt | head -n 1`\n\n/etc/init.d/iptables stop > /dev/null 2>&1\n\nif [ \"$SCHED\" = \"\" ];\nthen\n  echo \"Scheduler required\"\n  exit -1\nfi\n\nif [ ! $APPCHK = '0' ]; then\n  echo \"Frontend already running, cannot start it.\"\n  exit 1;\nfi\n\nip=`ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}'`\nlog=\"/disk1/sparrow/spark_$ip.log\"\n\nchmod 755 spark-run.sh\nHOSTNAME=`ec2metadata  | grep local-hostname  | cut -d \" \" -f 2`\n\nif [ \"$SCHED\" = \"sparrow\" ];\nthen\n  export SPARK_HOSTNAME=$HOSTNAME\n  nohup ./spark-run.sh -Dspark.master.host=$ip -Dspark.master.port=7077 -Dsparrow.app.name=spark_$ip -Dspark.scheduler=sparrow spark.SparkTPCHRunner sparrow@localhost:20503 hdfs://{{name_node}}:8020/`hostname -i`/ $QNUM true $RATE $MAX /root/spark_tpch_$ip.log $PAR_LEVEL > $log 2>&1 &\nelse\n  SPARK_MEM=\"1300m\"\n  export SPARK_MEM\n  nohup ./spark-run.sh -Dspark.master.host=$ip -Dspark.master.port=7077 -Dspark.locality.wait=500000 spark.SparkTPCHRunner master@$MESOS_MASTER:5050 hdfs://{{name_node}}:8020/`hostname -i`/ $QNUM true $RATE $MAX /root/spark_tpch_$ip.log $PAR_LEVEL > $log 2>&1 &\nfi\n\nPID=$!\necho \"Logging to $log\"\nsleep 1\nif ! kill -0 $PID > /dev/null 2>&1; then\n  echo \"Proto frontend failed to start\"\n  exit 1;\nelse\n  echo \"Proto frontend started with pid $PID\"\n  exit 0;\nfi\n"
  },
  {
    "path": "deploy/ec2/template/start_sparrow.sh",
    "content": "#!/bin/bash\n# Start Sparrow locally\nulimit -n 16384\n\nLOG=/disk1/sparrow/sparrowDaemon.log\nIP=`ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}'`\n\nip_there=`cat sparrow.conf |grep hostname`\nif [ \"X$ip_there\" == \"X\" ]; then\n  echo \"hostname = $IP\" >> sparrow.conf\nfi\n\n# Make sure software firewall is stopped (ec2 firewall subsumes)\n/etc/init.d/iptables stop > /dev/null 2>&1\n\nAPPCHK=$(ps aux | grep -v grep | grep -c SparrowDaemon)\n\nif [ ! $APPCHK = '0' ]; then\n  echo \"Sparrow already running, cannot start it.\"\n  exit 1;\nfi\n\n# -XX:MaxGCPauseMillis=3 \n# removed nice -n -20\nnohup java -XX:+UseConcMarkSweepGC -verbose:gc -XX:+PrintGCTimeStamps -Xmx2046m -XX:+PrintGCDetails -cp ./sparrow/sparrow-1.0-SNAPSHOT.jar edu.berkeley.sparrow.daemon.SparrowDaemon -c sparrow.conf > $LOG 2>&1 &\nPID=$!\necho \"Logging to $LOG\"\nsleep 1\nif ! kill -0 $PID > /dev/null 2>&1; then\n  echo \"Sparrow Daemon failed to start\"\n  exit 1;\nelse\n  echo \"Sparrow Daemon started with pid $PID\"\n  exit 0;\nfi\n"
  },
  {
    "path": "deploy/ec2/template/start_throughput_exp_spark.sh",
    "content": "#!/bin/bash\n# Starts an experiment to test scheduler throughput with spark.\n# Starts the master and slaves, and then the throughpupt\n# tester.\nmy_ip=`hostname -i`\nlog=\"/disk1/sparrow/spark_throughput_$my_ip.log\"\n\n# Spark needs the list of backends in order to start them all.\ncp ~/backends.txt /root/spark/conf/slaves\n/root/spark/bin/start-all.sh\n\n# Give the master and workers a moment to get started.\necho \"Done starting master and workers; sleeping before starting tester\"\nsleep 5s\necho \"Starting throughput tester\"\n\n/root/spark/run spark.scheduler.sparrow.ThroughputTester \"spark://`hostname`:7077\" {{total_cores}} 60000 10000,1000,500,100 > $log 2>&1 &\n\n"
  },
  {
    "path": "deploy/ec2/template/start_throughput_exp_sparrow.sh",
    "content": "#!/bin/bash\n# Starts an experiment to test scheduler throughput.\nmy_ip=`hostname -i`\nlog=\"/disk1/sparrow/spark_$my_ip.log\"\n# for sparrow master: \"sparrow@$my_ip:20503\n\n/root/spark/run -Dspark.serializer=spark.KryoSerializer -Dsparrow.app.name=spark_`hostname -i` -Dspark.broadcast.port=33624 -Dspark.driver.port=60500 spark.scheduler.sparrow.ThroughputTester \"sparrow@$my_ip:20503\" {{total_cores}} 60000 1001,1002,1375,250,100,50 > $log 2>&1 &\n"
  },
  {
    "path": "deploy/ec2/template/stop_mesos_master.sh",
    "content": "#!/bin/bash\n# Stop mesos master\n\nAPPCHK=$(ps aux | grep -v grep | grep -c mesos-master)\n\nif [ $APPCHK = '0' ]; then\n  echo \"Mesos master is not running. Doing nothing.\"\n  exit 0;\nfi\nps -ef |grep mesos-master| grep -v grep | awk '{ print $2; }' | xargs -I {} kill -9 {}\necho \"Stopped mesos master process.\"\nexit 0;\n"
  },
  {
    "path": "deploy/ec2/template/stop_mesos_slave.sh",
    "content": "#!/bin/bash\n# Stop mesos slave\n\nAPPCHK=$(ps aux | grep -v grep | grep -c mesos-slave)\n\nif [ $APPCHK = '0' ]; then\n  echo \"Mesos slave is not running. Doing nothing.\"\n  exit 0;\nfi\nps -ef |grep mesos-slave| grep -v grep | awk '{ print $2; }' | xargs -I {} kill -9 {}\necho \"Stopped mesos slave process.\"\nexit 0;\n"
  },
  {
    "path": "deploy/ec2/template/stop_proto_backend.sh",
    "content": "#!/bin/bash\n# Stop proto backend locally\n\nAPPCHK=$(ps aux | grep -v grep | grep -c ProtoBackend)\n\nif [ $APPCHK = '0' ]; then\n  echo \"ProtoBackend is not running. Doing nothing.\"\n  exit 0;\nfi\nps -ef |grep ProtoBackend |grep -v grep | awk '{ print $2; }' | xargs -I {} kill -9 {}\necho \"Stopped ProtoBackend process\"\nexit 0;\n\n"
  },
  {
    "path": "deploy/ec2/template/stop_proto_frontend.sh",
    "content": "#!/bin/bash\n# Stop proto frontend locally\n\nAPPCHK=$(ps aux | grep -v grep | grep -c {{frontend_type}})\n\nif [ $APPCHK = '0' ]; then\n  echo \"{{frontend_type}} is not running. Doing nothing.\"\n  exit 0;\nfi\nps -ef |grep {{frontend_type}} |grep -v grep | awk '{ print $2; }' | xargs -I {} kill -9 {}\necho \"Stopped {{frontend_type}} process\"\nexit 0;\n"
  },
  {
    "path": "deploy/ec2/template/stop_spark_backend.sh",
    "content": "#!/bin/bash\n# Stop spark backend locally\n\nAPPCHK=$(ps aux | grep -v grep | grep -v stop | grep -c spark)\n\nif [ $APPCHK = '0' ]; then\n  echo \"Spark is not running. Doing nothing.\"\n  exit 0;\nfi\nps -ef |grep spark |grep -v grep | grep -v stop | awk '{ print $2; }' | xargs -I {} kill -9 {}\necho \"Stopped spark process\"\nexit 0;\n\n"
  },
  {
    "path": "deploy/ec2/template/stop_spark_frontend.sh",
    "content": "#!/bin/bash\n# Stop spark frontend locally\n\nAPPCHK=$(ps aux | grep -v grep | grep -v stop | grep -c spark)\n\nif [ $APPCHK = '0' ]; then\n  echo \"Spark is not running. Doing nothing.\"\n  exit 0;\nfi\nps -ef |grep spark | grep -v stop | grep -v grep | awk '{ print $2; }' | xargs -I {} kill -9 {}\necho \"Stopped spark process\"\nexit 0;\n"
  },
  {
    "path": "deploy/ec2/template/stop_sparrow.sh",
    "content": "#!/bin/bash\n# Stop sparrow locally\n\nAPPCHK=$(ps aux | grep -v grep | grep -c SparrowDaemon)\n\nif [ $APPCHK = '0' ]; then\n  echo \"Sparrow is not running. Doing nothing.\"\n  exit 0;\nfi\nps -ef |grep SparrowDaemon |grep -v grep | awk '{ print $2; }' | xargs -I {} kill -9 {}\necho \"Stopped Sparrow process\"\nexit 0;\n"
  },
  {
    "path": "deploy/ec2/template/tpch/make_base_tables.hql",
    "content": "drop table if exists lineitem;\ndrop table if exists orders;\ndrop table if exists denorm;\ndrop table if exists part;\ndrop table if exists supplier;\ndrop table if exists nation;\ndrop table if exists partsupp;\ndrop table if exists customer;\ndrop table if exists region;\n\ncreate external table region (R_REGIONKEY INT, R_NAME STRING, R_COMMENT STRING) ROW FORMAT DELIMITED FIELDS TERMINATED BY '|' STORED AS TEXTFILE LOCATION '/tpch/region';\nCreate external table lineitem (L_ORDERKEY INT, L_PARTKEY INT, L_SUPPKEY INT, L_LINENUMBER INT, L_QUANTITY DOUBLE, L_EXTENDEDPRICE DOUBLE, L_DISCOUNT DOUBLE, L_TAX DOUBLE, L_RETURNFLAG STRING, L_LINESTATUS STRING, L_SHIPDATE STRING, L_COMMITDATE STRING, L_RECEIPTDATE STRING, L_SHIPINSTRUCT STRING, L_SHIPMODE STRING, L_COMMENT STRING) ROW FORMAT DELIMITED FIELDS TERMINATED BY '|' STORED AS TEXTFILE LOCATION '/tpch/lineitem';\ncreate external table orders (O_ORDERKEY INT, O_CUSTKEY INT, O_ORDERSTATUS STRING, O_TOTALPRICE DOUBLE, O_ORDERDATE STRING, O_ORDERPRIORITY STRING, O_CLERK STRING, O_SHIPPRIORITY INT, O_COMMENT STRING) ROW FORMAT DELIMITED FIELDS TERMINATED BY '|' STORED AS TEXTFILE LOCATION '/tpch/orders';\ncreate external table part (P_PARTKEY INT, P_NAME STRING, P_MFGR STRING, P_BRAND STRING, P_TYPE STRING, P_SIZE INT, P_CONTAINER STRING, P_RETAILPRICE DOUBLE, P_COMMENT STRING) ROW FORMAT DELIMITED FIELDS TERMINATED BY '|' STORED AS TEXTFILE LOCATION '/tpch/part';\ncreate external table supplier (S_SUPPKEY INT, S_NAME STRING, S_ADDRESS STRING, S_NATIONKEY INT, S_PHONE STRING, S_ACCTBAL DOUBLE, S_COMMENT STRING) ROW FORMAT DELIMITED FIELDS TERMINATED BY '|' STORED AS TEXTFILE LOCATION '/tpch/supplier';\ncreate external table nation (N_NATIONKEY INT, N_NAME STRING, N_REGIONKEY INT, N_COMMENT STRING) ROW FORMAT DELIMITED FIELDS TERMINATED BY '|' STORED AS TEXTFILE LOCATION '/tpch/nation';\ncreate external table partsupp (PS_PARTKEY INT, PS_SUPPKEY INT, PS_AVAILQTY INT, PS_SUPPLYCOST DOUBLE, PS_COMMENT STRING) ROW FORMAT DELIMITED FIELDS TERMINATED BY '|' STORED AS TEXTFILE LOCATION'/tpch/partsupp';\ncreate external table customer (C_CUSTKEY INT, C_NAME STRING, C_ADDRESS STRING, C_NATIONKEY INT, C_PHONE STRING, C_ACCTBAL DOUBLE, C_MKTSEGMENT STRING, C_COMMENT STRING) ROW FORMAT DELIMITED FIELDS TERMINATED BY '|' STORED AS TEXTFILE LOCATION '/tpch/customer';\n"
  },
  {
    "path": "deploy/ec2/template/tpch/make_denorm_cached.hql",
    "content": "set mapred.reduce.tasks={{num_partitions}};\nset hive.map.aggr=false;\ncreate table denorm_cached as\nselect r_regionkey, l_linenumber, r_name, n_nationkey, n_name, s_suppkey, s_name, s_address, s_nationkey, s_phone, s_acctbal, s_comment, ps_partkey, ps_suppkey, ps_availqty, ps_supplycost, p_partkey, p_name, p_mfgr, p_brand, p_type, p_size, p_container, l_orderkey, l_partkey, l_suppkey, l_quantity, l_extendedprice, l_discount, l_returnflag, l_shipdate, l_linestatus, l_commitdate, l_receiptdate, l_shipinstruct, l_shipmode, l_tax, o_orderkey, o_custkey, o_orderstatus, o_totalprice, o_orderdate, o_orderpriority, o_shippriority, o_comment, c_nationkey, c_custkey, c_name, c_mktsegment\nfrom denorm\ngroup by r_regionkey, l_linenumber, r_name, n_nationkey, n_name, s_suppkey, s_name, s_address, s_nationkey, s_phone, s_acctbal, s_comment, ps_partkey, ps_suppkey, ps_availqty, ps_supplycost, p_partkey, p_name, p_mfgr, p_brand, p_type, p_size, p_container, l_orderkey, l_partkey, l_suppkey, l_quantity, l_extendedprice, l_discount, l_returnflag, l_shipdate, l_linestatus, l_commitdate, l_receiptdate, l_shipinstruct, l_shipmode, l_tax, o_orderkey, o_custkey, o_orderstatus, o_totalprice, o_orderdate, o_orderpriority, o_shippriority, o_comment, c_nationkey, c_custkey, c_name, c_mktsegment;\nset hive.map.aggr=true;\n"
  },
  {
    "path": "deploy/ec2/template/tpch/make_denorm_table_primary.hql",
    "content": "SET mapred.reduce.tasks={{reduce_tasks}};\ndrop table if exists denorm;\ncreate table denorm\nrow format delimited fields terminated by '|'\nSTORED AS TEXTFILE\nAS\nselect r_regionkey, l_linenumber, r_name, n_nationkey, n_name, s_suppkey, s_name, s_address, s_nationkey, s_phone, s_acctbal, s_comment, ps_partkey, ps_suppkey, ps_availqty, ps_supplycost, p_partkey, p_name, p_mfgr, p_brand, p_type, p_size, p_container, l_orderkey, l_partkey, l_suppkey, l_quantity, l_extendedprice, l_discount, l_returnflag, l_shipdate, l_linestatus, l_commitdate, l_receiptdate, l_shipinstruct, l_shipmode, l_tax, o_orderkey, o_custkey, o_orderstatus, o_totalprice, o_orderdate, o_orderpriority, o_shippriority, o_comment, c_nationkey, c_custkey, c_name, c_mktsegment \n  from \n  (select * from \n    (select * from\n      (select * from\n\t(select * from\n\t  (select * from \n\t    (select r_regionkey, r_name, n_nationkey, n_name from region r\n\t      join nation n on n.n_regionkey = r.r_regionkey) nr\n\t    join supplier s on s.s_nationkey = nr.n_nationkey) nrs\n\t  join partsupp ps on nrs.s_suppkey = ps.ps_suppkey) nrsps\n\tjoin part p on p.p_partkey = nrsps.ps_partkey) nrspsp\n      join lineitem l on l.l_partkey = nrspsp.ps_partkey and\n\t\t\t l.l_suppkey = nrspsp.ps_suppkey) nrspspl\n    join orders o on o.o_orderkey = nrspspl.l_orderkey) nrspsplo\n  join customer c on c.c_custkey = nrspsplo.o_custkey;\n"
  },
  {
    "path": "deploy/ec2/template/tpch/make_denorm_table_secondary.hql",
    "content": "create external table denorm (r_regionkey int, l_linenumber int, r_name string, n_nationkey int, n_name string, s_suppkey int, s_name string, s_address string, s_nationkey int, s_phone string, s_acctbal double, s_comment string, ps_partkey int, ps_suppkey int, ps_availqty int, ps_supplycost double, p_partkey int, p_name string, p_mfgr string, p_brand string, p_type string, p_size int, p_container string, l_orderkey int, l_partkey int, l_suppkey int, l_quantity double, l_extendedprice double, l_discount double, l_returnflag string, l_shipdate string, l_linestatus string, l_commitdate string, l_receiptdate string, l_shipinstruct string, l_shipmode string, l_tax double, o_orderkey int, o_custkey int, o_orderstatus string, o_totalprice double, o_orderdate string, o_orderpriority string, o_shippriority int, o_comment string, c_nationkey int, c_custkey int, c_name string, c_mktsegment string) ROW FORMAT DELIMITED FIELDS TERMINATED BY '|' STORED AS TEXTFILE LOCATION '/tpch/denorm-warehouse/denorm/';\n"
  },
  {
    "path": "deploy/ec2/template/tpch/tpch_workload_1",
    "content": "set mapred.reduce.tasks={{num_partitions}};\nset hive.map.aggr=false;\ndrop table if exists denorm_cached;\ncreate table denorm_cached as\nselect --SPREAD_EVENLY--\n  r_regionkey, l_linenumber, r_name, n_nationkey, n_name, s_suppkey, s_name, s_address, s_nationkey, s_phone, s_acctbal, s_comment, ps_partkey, ps_suppkey, ps_availqty, ps_supplycost, p_partkey, p_name, p_mfgr, p_brand, p_type, p_size, p_container, l_orderkey, l_partkey, l_suppkey, l_quantity, l_extendedprice, l_discount, l_returnflag, l_shipdate, l_linestatus, l_commitdate, l_receiptdate, l_shipinstruct, l_shipmode, l_tax, o_orderkey, o_custkey, o_orderstatus, o_totalprice, o_orderdate, o_orderpriority, o_shippriority, o_comment, c_nationkey, c_custkey, c_name, c_mktsegment\nfrom denorm\ngroup by r_regionkey, l_linenumber, r_name, n_nationkey, n_name, s_suppkey, s_name, s_address, s_nationkey, s_phone, s_acctbal, s_comment, ps_partkey, ps_suppkey, ps_availqty, ps_supplycost, p_partkey, p_name, p_mfgr, p_brand, p_type, p_size, p_container, l_orderkey, l_partkey, l_suppkey, l_quantity, l_extendedprice, l_discount, l_returnflag, l_shipdate, l_linestatus, l_commitdate, l_receiptdate, l_shipinstruct, l_shipmode, l_tax, o_orderkey, o_custkey, o_orderstatus, o_totalprice, o_orderdate, o_orderpriority, o_shippriority, o_comment, c_nationkey, c_custkey, c_name, c_mktsegment;\nset hive.map.aggr=true;\nselect --SPREAD_EVENLY--\n  count(*) from denorm_cached;\nselect --SPREAD_EVENLY--\n  count(*) from denorm_cached;\nset mapred.reduce.tasks={{reduce_tasks}};\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\n"
  },
  {
    "path": "deploy/ec2/template/tpch/tpch_workload_10",
    "content": "set mapred.reduce.tasks={{num_partitions}};\nset hive.map.aggr=false;\ndrop table if exists denorm_cached;\ncreate table denorm_cached as\nselect --SPREAD_EVENLY--\nr_regionkey, l_linenumber, r_name, n_nationkey, n_name, s_suppkey, s_name, s_address, s_nationkey, s_phone, s_acctbal, s_comment, ps_partkey, ps_suppkey, ps_availqty, ps_supplycost, p_partkey, p_name, p_mfgr, p_brand, p_type, p_size, p_container, l_orderkey, l_partkey, l_suppkey, l_quantity, l_extendedprice, l_discount, l_returnflag, l_shipdate, l_linestatus, l_commitdate, l_receiptdate, l_shipinstruct, l_shipmode, l_tax, o_orderkey, o_custkey, o_orderstatus, o_totalprice, o_orderdate, o_orderpriority, o_shippriority, o_comment, c_nationkey, c_custkey, c_name, c_mktsegment\nfrom denorm\ngroup by r_regionkey, l_linenumber, r_name, n_nationkey, n_name, s_suppkey, s_name, s_address, s_nationkey, s_phone, s_acctbal, s_comment, ps_partkey, ps_suppkey, ps_availqty, ps_supplycost, p_partkey, p_name, p_mfgr, p_brand, p_type, p_size, p_container, l_orderkey, l_partkey, l_suppkey, l_quantity, l_extendedprice, l_discount, l_returnflag, l_shipdate, l_linestatus, l_commitdate, l_receiptdate, l_shipinstruct, l_shipmode, l_tax, o_orderkey, o_custkey, o_orderstatus, o_totalprice, o_orderdate, o_orderpriority, o_shippriority, o_comment, c_nationkey, c_custkey, c_name, c_mktsegment;\nset hive.map.aggr=true;\nselect --SPREAD_EVENLY--\ncount(*) from denorm_cached;\nselect --SPREAD_EVENLY--\ncount(*) from denorm_cached;\nset mapred.reduce.tasks={{reduce_tasks}};\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\n"
  },
  {
    "path": "deploy/ec2/template/tpch/tpch_workload_11",
    "content": "set mapred.reduce.tasks={{num_partitions}};\nset hive.map.aggr=false;\ndrop table if exists denorm_cached;\ncreate table denorm_cached as\nselect --SPREAD_EVENLY--\nr_regionkey, l_linenumber, r_name, n_nationkey, n_name, s_suppkey, s_name, s_address, s_nationkey, s_phone, s_acctbal, s_comment, ps_partkey, ps_suppkey, ps_availqty, ps_supplycost, p_partkey, p_name, p_mfgr, p_brand, p_type, p_size, p_container, l_orderkey, l_partkey, l_suppkey, l_quantity, l_extendedprice, l_discount, l_returnflag, l_shipdate, l_linestatus, l_commitdate, l_receiptdate, l_shipinstruct, l_shipmode, l_tax, o_orderkey, o_custkey, o_orderstatus, o_totalprice, o_orderdate, o_orderpriority, o_shippriority, o_comment, c_nationkey, c_custkey, c_name, c_mktsegment\nfrom denorm\ngroup by r_regionkey, l_linenumber, r_name, n_nationkey, n_name, s_suppkey, s_name, s_address, s_nationkey, s_phone, s_acctbal, s_comment, ps_partkey, ps_suppkey, ps_availqty, ps_supplycost, p_partkey, p_name, p_mfgr, p_brand, p_type, p_size, p_container, l_orderkey, l_partkey, l_suppkey, l_quantity, l_extendedprice, l_discount, l_returnflag, l_shipdate, l_linestatus, l_commitdate, l_receiptdate, l_shipinstruct, l_shipmode, l_tax, o_orderkey, o_custkey, o_orderstatus, o_totalprice, o_orderdate, o_orderpriority, o_shippriority, o_comment, c_nationkey, c_custkey, c_name, c_mktsegment;\nset hive.map.aggr=true;\nselect --SPREAD_EVENLY--\ncount(*) from denorm_cached;\nselect --SPREAD_EVENLY--\ncount(*) from denorm_cached;\nset mapred.reduce.tasks={{reduce_tasks}};\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\n"
  },
  {
    "path": "deploy/ec2/template/tpch/tpch_workload_12",
    "content": "set mapred.reduce.tasks={{num_partitions}};\nset hive.map.aggr=false;\ndrop table if exists denorm_cached;\ncreate table denorm_cached as\nselect --SPREAD_EVENLY--\nr_regionkey, l_linenumber, r_name, n_nationkey, n_name, s_suppkey, s_name, s_address, s_nationkey, s_phone, s_acctbal, s_comment, ps_partkey, ps_suppkey, ps_availqty, ps_supplycost, p_partkey, p_name, p_mfgr, p_brand, p_type, p_size, p_container, l_orderkey, l_partkey, l_suppkey, l_quantity, l_extendedprice, l_discount, l_returnflag, l_shipdate, l_linestatus, l_commitdate, l_receiptdate, l_shipinstruct, l_shipmode, l_tax, o_orderkey, o_custkey, o_orderstatus, o_totalprice, o_orderdate, o_orderpriority, o_shippriority, o_comment, c_nationkey, c_custkey, c_name, c_mktsegment\nfrom denorm\ngroup by r_regionkey, l_linenumber, r_name, n_nationkey, n_name, s_suppkey, s_name, s_address, s_nationkey, s_phone, s_acctbal, s_comment, ps_partkey, ps_suppkey, ps_availqty, ps_supplycost, p_partkey, p_name, p_mfgr, p_brand, p_type, p_size, p_container, l_orderkey, l_partkey, l_suppkey, l_quantity, l_extendedprice, l_discount, l_returnflag, l_shipdate, l_linestatus, l_commitdate, l_receiptdate, l_shipinstruct, l_shipmode, l_tax, o_orderkey, o_custkey, o_orderstatus, o_totalprice, o_orderdate, o_orderpriority, o_shippriority, o_comment, c_nationkey, c_custkey, c_name, c_mktsegment;\nset hive.map.aggr=true;\nselect --SPREAD_EVENLY--\ncount(*) from denorm_cached;\nselect --SPREAD_EVENLY--\ncount(*) from denorm_cached;\nset mapred.reduce.tasks={{reduce_tasks}};\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\n"
  },
  {
    "path": "deploy/ec2/template/tpch/tpch_workload_13",
    "content": "set mapred.reduce.tasks={{num_partitions}};\nset hive.map.aggr=false;\ndrop table if exists denorm_cached;\ncreate table denorm_cached as\nselect --SPREAD_EVENLY--\nr_regionkey, l_linenumber, r_name, n_nationkey, n_name, s_suppkey, s_name, s_address, s_nationkey, s_phone, s_acctbal, s_comment, ps_partkey, ps_suppkey, ps_availqty, ps_supplycost, p_partkey, p_name, p_mfgr, p_brand, p_type, p_size, p_container, l_orderkey, l_partkey, l_suppkey, l_quantity, l_extendedprice, l_discount, l_returnflag, l_shipdate, l_linestatus, l_commitdate, l_receiptdate, l_shipinstruct, l_shipmode, l_tax, o_orderkey, o_custkey, o_orderstatus, o_totalprice, o_orderdate, o_orderpriority, o_shippriority, o_comment, c_nationkey, c_custkey, c_name, c_mktsegment\nfrom denorm\ngroup by r_regionkey, l_linenumber, r_name, n_nationkey, n_name, s_suppkey, s_name, s_address, s_nationkey, s_phone, s_acctbal, s_comment, ps_partkey, ps_suppkey, ps_availqty, ps_supplycost, p_partkey, p_name, p_mfgr, p_brand, p_type, p_size, p_container, l_orderkey, l_partkey, l_suppkey, l_quantity, l_extendedprice, l_discount, l_returnflag, l_shipdate, l_linestatus, l_commitdate, l_receiptdate, l_shipinstruct, l_shipmode, l_tax, o_orderkey, o_custkey, o_orderstatus, o_totalprice, o_orderdate, o_orderpriority, o_shippriority, o_comment, c_nationkey, c_custkey, c_name, c_mktsegment;\nset hive.map.aggr=true;\nselect --SPREAD_EVENLY--\ncount(*) from denorm_cached;\nselect --SPREAD_EVENLY--\ncount(*) from denorm_cached;\nset mapred.reduce.tasks={{reduce_tasks}};\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\n"
  },
  {
    "path": "deploy/ec2/template/tpch/tpch_workload_14",
    "content": "set mapred.reduce.tasks={{num_partitions}};\nset hive.map.aggr=false;\ndrop table if exists denorm_cached;\ncreate table denorm_cached as\nselect --SPREAD_EVENLY--\nr_regionkey, l_linenumber, r_name, n_nationkey, n_name, s_suppkey, s_name, s_address, s_nationkey, s_phone, s_acctbal, s_comment, ps_partkey, ps_suppkey, ps_availqty, ps_supplycost, p_partkey, p_name, p_mfgr, p_brand, p_type, p_size, p_container, l_orderkey, l_partkey, l_suppkey, l_quantity, l_extendedprice, l_discount, l_returnflag, l_shipdate, l_linestatus, l_commitdate, l_receiptdate, l_shipinstruct, l_shipmode, l_tax, o_orderkey, o_custkey, o_orderstatus, o_totalprice, o_orderdate, o_orderpriority, o_shippriority, o_comment, c_nationkey, c_custkey, c_name, c_mktsegment\nfrom denorm\ngroup by r_regionkey, l_linenumber, r_name, n_nationkey, n_name, s_suppkey, s_name, s_address, s_nationkey, s_phone, s_acctbal, s_comment, ps_partkey, ps_suppkey, ps_availqty, ps_supplycost, p_partkey, p_name, p_mfgr, p_brand, p_type, p_size, p_container, l_orderkey, l_partkey, l_suppkey, l_quantity, l_extendedprice, l_discount, l_returnflag, l_shipdate, l_linestatus, l_commitdate, l_receiptdate, l_shipinstruct, l_shipmode, l_tax, o_orderkey, o_custkey, o_orderstatus, o_totalprice, o_orderdate, o_orderpriority, o_shippriority, o_comment, c_nationkey, c_custkey, c_name, c_mktsegment;\nset hive.map.aggr=true;\nselect --SPREAD_EVENLY--\ncount(*) from denorm_cached;\nselect --SPREAD_EVENLY--\ncount(*) from denorm_cached;\nset mapred.reduce.tasks={{reduce_tasks}};\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\n"
  },
  {
    "path": "deploy/ec2/template/tpch/tpch_workload_15",
    "content": "set mapred.reduce.tasks={{num_partitions}};\nset hive.map.aggr=false;\ndrop table if exists denorm_cached;\ncreate table denorm_cached as\nselect --SPREAD_EVENLY--\nr_regionkey, l_linenumber, r_name, n_nationkey, n_name, s_suppkey, s_name, s_address, s_nationkey, s_phone, s_acctbal, s_comment, ps_partkey, ps_suppkey, ps_availqty, ps_supplycost, p_partkey, p_name, p_mfgr, p_brand, p_type, p_size, p_container, l_orderkey, l_partkey, l_suppkey, l_quantity, l_extendedprice, l_discount, l_returnflag, l_shipdate, l_linestatus, l_commitdate, l_receiptdate, l_shipinstruct, l_shipmode, l_tax, o_orderkey, o_custkey, o_orderstatus, o_totalprice, o_orderdate, o_orderpriority, o_shippriority, o_comment, c_nationkey, c_custkey, c_name, c_mktsegment\nfrom denorm\ngroup by r_regionkey, l_linenumber, r_name, n_nationkey, n_name, s_suppkey, s_name, s_address, s_nationkey, s_phone, s_acctbal, s_comment, ps_partkey, ps_suppkey, ps_availqty, ps_supplycost, p_partkey, p_name, p_mfgr, p_brand, p_type, p_size, p_container, l_orderkey, l_partkey, l_suppkey, l_quantity, l_extendedprice, l_discount, l_returnflag, l_shipdate, l_linestatus, l_commitdate, l_receiptdate, l_shipinstruct, l_shipmode, l_tax, o_orderkey, o_custkey, o_orderstatus, o_totalprice, o_orderdate, o_orderpriority, o_shippriority, o_comment, c_nationkey, c_custkey, c_name, c_mktsegment;\nset hive.map.aggr=true;\nselect --SPREAD_EVENLY--\ncount(*) from denorm_cached;\nselect --SPREAD_EVENLY--\ncount(*) from denorm_cached;\nset mapred.reduce.tasks={{reduce_tasks}};\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\n"
  },
  {
    "path": "deploy/ec2/template/tpch/tpch_workload_2",
    "content": "set mapred.reduce.tasks={{num_partitions}};\nset hive.map.aggr=false;\ndrop table if exists denorm_cached;\ncreate table denorm_cached as\nselect --SPREAD_EVENLY--\nr_regionkey, l_linenumber, r_name, n_nationkey, n_name, s_suppkey, s_name, s_address, s_nationkey, s_phone, s_acctbal, s_comment, ps_partkey, ps_suppkey, ps_availqty, ps_supplycost, p_partkey, p_name, p_mfgr, p_brand, p_type, p_size, p_container, l_orderkey, l_partkey, l_suppkey, l_quantity, l_extendedprice, l_discount, l_returnflag, l_shipdate, l_linestatus, l_commitdate, l_receiptdate, l_shipinstruct, l_shipmode, l_tax, o_orderkey, o_custkey, o_orderstatus, o_totalprice, o_orderdate, o_orderpriority, o_shippriority, o_comment, c_nationkey, c_custkey, c_name, c_mktsegment\nfrom denorm\ngroup by r_regionkey, l_linenumber, r_name, n_nationkey, n_name, s_suppkey, s_name, s_address, s_nationkey, s_phone, s_acctbal, s_comment, ps_partkey, ps_suppkey, ps_availqty, ps_supplycost, p_partkey, p_name, p_mfgr, p_brand, p_type, p_size, p_container, l_orderkey, l_partkey, l_suppkey, l_quantity, l_extendedprice, l_discount, l_returnflag, l_shipdate, l_linestatus, l_commitdate, l_receiptdate, l_shipinstruct, l_shipmode, l_tax, o_orderkey, o_custkey, o_orderstatus, o_totalprice, o_orderdate, o_orderpriority, o_shippriority, o_comment, c_nationkey, c_custkey, c_name, c_mktsegment;\nset hive.map.aggr=true;\nselect --SPREAD_EVENLY--\ncount(*) from denorm_cached;\nselect --SPREAD_EVENLY--\ncount(*) from denorm_cached;\nset mapred.reduce.tasks={{reduce_tasks}};\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\n"
  },
  {
    "path": "deploy/ec2/template/tpch/tpch_workload_3",
    "content": "set mapred.reduce.tasks={{num_partitions}};\nset hive.map.aggr=false;\ndrop table if exists denorm_cached;\ncreate table denorm_cached as\nselect --SPREAD_EVENLY--\nr_regionkey, l_linenumber, r_name, n_nationkey, n_name, s_suppkey, s_name, s_address, s_nationkey, s_phone, s_acctbal, s_comment, ps_partkey, ps_suppkey, ps_availqty, ps_supplycost, p_partkey, p_name, p_mfgr, p_brand, p_type, p_size, p_container, l_orderkey, l_partkey, l_suppkey, l_quantity, l_extendedprice, l_discount, l_returnflag, l_shipdate, l_linestatus, l_commitdate, l_receiptdate, l_shipinstruct, l_shipmode, l_tax, o_orderkey, o_custkey, o_orderstatus, o_totalprice, o_orderdate, o_orderpriority, o_shippriority, o_comment, c_nationkey, c_custkey, c_name, c_mktsegment\nfrom denorm\ngroup by r_regionkey, l_linenumber, r_name, n_nationkey, n_name, s_suppkey, s_name, s_address, s_nationkey, s_phone, s_acctbal, s_comment, ps_partkey, ps_suppkey, ps_availqty, ps_supplycost, p_partkey, p_name, p_mfgr, p_brand, p_type, p_size, p_container, l_orderkey, l_partkey, l_suppkey, l_quantity, l_extendedprice, l_discount, l_returnflag, l_shipdate, l_linestatus, l_commitdate, l_receiptdate, l_shipinstruct, l_shipmode, l_tax, o_orderkey, o_custkey, o_orderstatus, o_totalprice, o_orderdate, o_orderpriority, o_shippriority, o_comment, c_nationkey, c_custkey, c_name, c_mktsegment;\nset hive.map.aggr=true;\nselect --SPREAD_EVENLY--\ncount(*) from denorm_cached;\nselect --SPREAD_EVENLY--\ncount(*) from denorm_cached;\nset mapred.reduce.tasks={{reduce_tasks}};\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\n"
  },
  {
    "path": "deploy/ec2/template/tpch/tpch_workload_4",
    "content": "set mapred.reduce.tasks={{num_partitions}};\nset hive.map.aggr=false;\ndrop table if exists denorm_cached;\ncreate table denorm_cached as\nselect --SPREAD_EVENLY--\nr_regionkey, l_linenumber, r_name, n_nationkey, n_name, s_suppkey, s_name, s_address, s_nationkey, s_phone, s_acctbal, s_comment, ps_partkey, ps_suppkey, ps_availqty, ps_supplycost, p_partkey, p_name, p_mfgr, p_brand, p_type, p_size, p_container, l_orderkey, l_partkey, l_suppkey, l_quantity, l_extendedprice, l_discount, l_returnflag, l_shipdate, l_linestatus, l_commitdate, l_receiptdate, l_shipinstruct, l_shipmode, l_tax, o_orderkey, o_custkey, o_orderstatus, o_totalprice, o_orderdate, o_orderpriority, o_shippriority, o_comment, c_nationkey, c_custkey, c_name, c_mktsegment\nfrom denorm\ngroup by r_regionkey, l_linenumber, r_name, n_nationkey, n_name, s_suppkey, s_name, s_address, s_nationkey, s_phone, s_acctbal, s_comment, ps_partkey, ps_suppkey, ps_availqty, ps_supplycost, p_partkey, p_name, p_mfgr, p_brand, p_type, p_size, p_container, l_orderkey, l_partkey, l_suppkey, l_quantity, l_extendedprice, l_discount, l_returnflag, l_shipdate, l_linestatus, l_commitdate, l_receiptdate, l_shipinstruct, l_shipmode, l_tax, o_orderkey, o_custkey, o_orderstatus, o_totalprice, o_orderdate, o_orderpriority, o_shippriority, o_comment, c_nationkey, c_custkey, c_name, c_mktsegment;\nset hive.map.aggr=true;\nselect --SPREAD_EVENLY--\ncount(*) from denorm_cached;\nselect --SPREAD_EVENLY--\ncount(*) from denorm_cached;\nset mapred.reduce.tasks={{reduce_tasks}};\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\n"
  },
  {
    "path": "deploy/ec2/template/tpch/tpch_workload_5",
    "content": "set mapred.reduce.tasks={{num_partitions}};\nset hive.map.aggr=false;\ndrop table if exists denorm_cached;\ncreate table denorm_cached as\nselect --SPREAD_EVENLY--\nr_regionkey, l_linenumber, r_name, n_nationkey, n_name, s_suppkey, s_name, s_address, s_nationkey, s_phone, s_acctbal, s_comment, ps_partkey, ps_suppkey, ps_availqty, ps_supplycost, p_partkey, p_name, p_mfgr, p_brand, p_type, p_size, p_container, l_orderkey, l_partkey, l_suppkey, l_quantity, l_extendedprice, l_discount, l_returnflag, l_shipdate, l_linestatus, l_commitdate, l_receiptdate, l_shipinstruct, l_shipmode, l_tax, o_orderkey, o_custkey, o_orderstatus, o_totalprice, o_orderdate, o_orderpriority, o_shippriority, o_comment, c_nationkey, c_custkey, c_name, c_mktsegment\nfrom denorm\ngroup by r_regionkey, l_linenumber, r_name, n_nationkey, n_name, s_suppkey, s_name, s_address, s_nationkey, s_phone, s_acctbal, s_comment, ps_partkey, ps_suppkey, ps_availqty, ps_supplycost, p_partkey, p_name, p_mfgr, p_brand, p_type, p_size, p_container, l_orderkey, l_partkey, l_suppkey, l_quantity, l_extendedprice, l_discount, l_returnflag, l_shipdate, l_linestatus, l_commitdate, l_receiptdate, l_shipinstruct, l_shipmode, l_tax, o_orderkey, o_custkey, o_orderstatus, o_totalprice, o_orderdate, o_orderpriority, o_shippriority, o_comment, c_nationkey, c_custkey, c_name, c_mktsegment;\nset hive.map.aggr=true;\nselect --SPREAD_EVENLY--\ncount(*) from denorm_cached;\nselect --SPREAD_EVENLY--\ncount(*) from denorm_cached;\nset mapred.reduce.tasks={{reduce_tasks}};\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\n"
  },
  {
    "path": "deploy/ec2/template/tpch/tpch_workload_6",
    "content": "set mapred.reduce.tasks={{num_partitions}};\nset hive.map.aggr=false;\ndrop table if exists denorm_cached;\ncreate table denorm_cached as\nselect --SPREAD_EVENLY--\nr_regionkey, l_linenumber, r_name, n_nationkey, n_name, s_suppkey, s_name, s_address, s_nationkey, s_phone, s_acctbal, s_comment, ps_partkey, ps_suppkey, ps_availqty, ps_supplycost, p_partkey, p_name, p_mfgr, p_brand, p_type, p_size, p_container, l_orderkey, l_partkey, l_suppkey, l_quantity, l_extendedprice, l_discount, l_returnflag, l_shipdate, l_linestatus, l_commitdate, l_receiptdate, l_shipinstruct, l_shipmode, l_tax, o_orderkey, o_custkey, o_orderstatus, o_totalprice, o_orderdate, o_orderpriority, o_shippriority, o_comment, c_nationkey, c_custkey, c_name, c_mktsegment\nfrom denorm\ngroup by r_regionkey, l_linenumber, r_name, n_nationkey, n_name, s_suppkey, s_name, s_address, s_nationkey, s_phone, s_acctbal, s_comment, ps_partkey, ps_suppkey, ps_availqty, ps_supplycost, p_partkey, p_name, p_mfgr, p_brand, p_type, p_size, p_container, l_orderkey, l_partkey, l_suppkey, l_quantity, l_extendedprice, l_discount, l_returnflag, l_shipdate, l_linestatus, l_commitdate, l_receiptdate, l_shipinstruct, l_shipmode, l_tax, o_orderkey, o_custkey, o_orderstatus, o_totalprice, o_orderdate, o_orderpriority, o_shippriority, o_comment, c_nationkey, c_custkey, c_name, c_mktsegment;\nset hive.map.aggr=true;\nselect --SPREAD_EVENLY--\ncount(*) from denorm_cached;\nselect --SPREAD_EVENLY--\ncount(*) from denorm_cached;\nset mapred.reduce.tasks={{reduce_tasks}};\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\n"
  },
  {
    "path": "deploy/ec2/template/tpch/tpch_workload_7",
    "content": "set mapred.reduce.tasks={{num_partitions}};\nset hive.map.aggr=false;\ndrop table if exists denorm_cached;\ncreate table denorm_cached as\nselect --SPREAD_EVENLY--\nr_regionkey, l_linenumber, r_name, n_nationkey, n_name, s_suppkey, s_name, s_address, s_nationkey, s_phone, s_acctbal, s_comment, ps_partkey, ps_suppkey, ps_availqty, ps_supplycost, p_partkey, p_name, p_mfgr, p_brand, p_type, p_size, p_container, l_orderkey, l_partkey, l_suppkey, l_quantity, l_extendedprice, l_discount, l_returnflag, l_shipdate, l_linestatus, l_commitdate, l_receiptdate, l_shipinstruct, l_shipmode, l_tax, o_orderkey, o_custkey, o_orderstatus, o_totalprice, o_orderdate, o_orderpriority, o_shippriority, o_comment, c_nationkey, c_custkey, c_name, c_mktsegment\nfrom denorm\ngroup by r_regionkey, l_linenumber, r_name, n_nationkey, n_name, s_suppkey, s_name, s_address, s_nationkey, s_phone, s_acctbal, s_comment, ps_partkey, ps_suppkey, ps_availqty, ps_supplycost, p_partkey, p_name, p_mfgr, p_brand, p_type, p_size, p_container, l_orderkey, l_partkey, l_suppkey, l_quantity, l_extendedprice, l_discount, l_returnflag, l_shipdate, l_linestatus, l_commitdate, l_receiptdate, l_shipinstruct, l_shipmode, l_tax, o_orderkey, o_custkey, o_orderstatus, o_totalprice, o_orderdate, o_orderpriority, o_shippriority, o_comment, c_nationkey, c_custkey, c_name, c_mktsegment;\nset hive.map.aggr=true;\nselect --SPREAD_EVENLY--\ncount(*) from denorm_cached;\nselect --SPREAD_EVENLY--\ncount(*) from denorm_cached;\nset mapred.reduce.tasks={{reduce_tasks}};\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\n"
  },
  {
    "path": "deploy/ec2/template/tpch/tpch_workload_8",
    "content": "set mapred.reduce.tasks={{num_partitions}};\nset hive.map.aggr=false;\ndrop table if exists denorm_cached;\ncreate table denorm_cached as\nselect --SPREAD_EVENLY--\nr_regionkey, l_linenumber, r_name, n_nationkey, n_name, s_suppkey, s_name, s_address, s_nationkey, s_phone, s_acctbal, s_comment, ps_partkey, ps_suppkey, ps_availqty, ps_supplycost, p_partkey, p_name, p_mfgr, p_brand, p_type, p_size, p_container, l_orderkey, l_partkey, l_suppkey, l_quantity, l_extendedprice, l_discount, l_returnflag, l_shipdate, l_linestatus, l_commitdate, l_receiptdate, l_shipinstruct, l_shipmode, l_tax, o_orderkey, o_custkey, o_orderstatus, o_totalprice, o_orderdate, o_orderpriority, o_shippriority, o_comment, c_nationkey, c_custkey, c_name, c_mktsegment\nfrom denorm\ngroup by r_regionkey, l_linenumber, r_name, n_nationkey, n_name, s_suppkey, s_name, s_address, s_nationkey, s_phone, s_acctbal, s_comment, ps_partkey, ps_suppkey, ps_availqty, ps_supplycost, p_partkey, p_name, p_mfgr, p_brand, p_type, p_size, p_container, l_orderkey, l_partkey, l_suppkey, l_quantity, l_extendedprice, l_discount, l_returnflag, l_shipdate, l_linestatus, l_commitdate, l_receiptdate, l_shipinstruct, l_shipmode, l_tax, o_orderkey, o_custkey, o_orderstatus, o_totalprice, o_orderdate, o_orderpriority, o_shippriority, o_comment, c_nationkey, c_custkey, c_name, c_mktsegment;\nset hive.map.aggr=true;\nselect --SPREAD_EVENLY--\ncount(*) from denorm_cached;\nselect --SPREAD_EVENLY--\ncount(*) from denorm_cached;\nset mapred.reduce.tasks={{reduce_tasks}};\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\n"
  },
  {
    "path": "deploy/ec2/template/tpch/tpch_workload_9",
    "content": "set mapred.reduce.tasks={{num_partitions}};\nset hive.map.aggr=false;\ndrop table if exists denorm_cached;\ncreate table denorm_cached as\nselect --SPREAD_EVENLY--\nr_regionkey, l_linenumber, r_name, n_nationkey, n_name, s_suppkey, s_name, s_address, s_nationkey, s_phone, s_acctbal, s_comment, ps_partkey, ps_suppkey, ps_availqty, ps_supplycost, p_partkey, p_name, p_mfgr, p_brand, p_type, p_size, p_container, l_orderkey, l_partkey, l_suppkey, l_quantity, l_extendedprice, l_discount, l_returnflag, l_shipdate, l_linestatus, l_commitdate, l_receiptdate, l_shipinstruct, l_shipmode, l_tax, o_orderkey, o_custkey, o_orderstatus, o_totalprice, o_orderdate, o_orderpriority, o_shippriority, o_comment, c_nationkey, c_custkey, c_name, c_mktsegment\nfrom denorm\ngroup by r_regionkey, l_linenumber, r_name, n_nationkey, n_name, s_suppkey, s_name, s_address, s_nationkey, s_phone, s_acctbal, s_comment, ps_partkey, ps_suppkey, ps_availqty, ps_supplycost, p_partkey, p_name, p_mfgr, p_brand, p_type, p_size, p_container, l_orderkey, l_partkey, l_suppkey, l_quantity, l_extendedprice, l_discount, l_returnflag, l_shipdate, l_linestatus, l_commitdate, l_receiptdate, l_shipinstruct, l_shipmode, l_tax, o_orderkey, o_custkey, o_orderstatus, o_totalprice, o_orderdate, o_orderpriority, o_shippriority, o_comment, c_nationkey, c_custkey, c_name, c_mktsegment;\nset hive.map.aggr=true;\nselect --SPREAD_EVENLY--\ncount(*) from denorm_cached;\nselect --SPREAD_EVENLY--\ncount(*) from denorm_cached;\nset mapred.reduce.tasks={{reduce_tasks}};\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --3-- \n  l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority \nfrom \n  denorm_cached\nwhere \n  o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING'\ngroup by l_orderkey, o_orderdate, o_shippriority \norder by revenue desc, o_orderdate \nlimit 10;\nselect --4--\n  count(1), o_orderpriority from \n  (select distinct l_orderkey, o_orderpriority from denorm_cached where\n    o_orderdate >= '1993-07-01' and \n    o_orderdate < '1993-10-01' and\n    l_commitdate < l_receiptdate) a\n  group by o_orderpriority;\nselect --6--\nsum(l_extendedprice*l_discount) as revenue\nfrom \n  denorm_cached\nwhere \n  l_shipdate >= '1994-01-01'\n  and l_shipdate < '1995-01-01'\n  and l_discount >= 0.05 and l_discount <= 0.07\n  and l_quantity < 24;\nselect --12--\n  l_shipmode,\n  sum(case\n    when o_orderpriority ='1-URGENT'\n         or o_orderpriority ='2-HIGH'\n    then 1\n    else 0\nend\n  ) as high_line_count,\n  sum(case\n    when o_orderpriority <> '1-URGENT'\n         and o_orderpriority <> '2-HIGH'\n    then 1\n    else 0\nend\n  ) as low_line_count\n\nfrom denorm_cached\nwhere \n  l_receiptdate < '1995-01-01' and\n  (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and\n  l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and\n  l_commitdate < l_receiptdate\ngroup by l_shipmode\norder by l_shipmode;\n"
  },
  {
    "path": "deploy/ec2/template/tpch_experiment.sh",
    "content": "FILES=/opt/tpch_hive/*\nOUT_DIR=/tmp\n\nfor f in $FILES\ndo\n  echo \"Processing $f\"\n  qname=`echo $f |  sed \"s/.*\\(q[0-9]*\\).*/\\1/\"`\n  results_file=$OUT_DIR/$qname.results\n  echo \"\" > $results_file\n  for t in {1..10}\n  do\n    /root/shark/bin/shark-withinfo -f $f 2>&1 #|grep wait >> $results_file\n  done\ndone\n"
  },
  {
    "path": "deploy/ec2/template/wipe_hdfs.sh",
    "content": "#!/bin/bash\nrm -rf /disk1/hdfs/data/*\n"
  },
  {
    "path": "deploy/ec2/tpch_experiments.py",
    "content": "#\n# Copyright 2013 The Regents of The University California\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#   http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n\nimport os\nimport subprocess\nimport time\n\nnum_nodes = 100\nwait_delay = 20 * 60\nresults_dirname = \"results_per_task\"\npartitions = 33\nreducers = 8\nratios = [(2, 2)] #-p (sample ratio unconstrianed), -q (sample ratio constrained)\nrates = [310]\nbackend_mem = \"5g\"\ncluster_name = \"tpch\"\nsparrow_branch = \"per_task_old_code\"\n#sparrow_branch = \"master\"\nkey_loc = \"patkey.pem\"\n\ndef run_cmd(cmd):\n  subprocess.check_call(cmd, shell=True)\n\nrestart_cmd = \"./ec2-exp.sh -i %s restart-spark-shark %s -m sparrow\" % (key_loc, cluster_name)\nstart_cmd = \"./ec2-exp.sh -i %s start-shark-tpch %s\" % (key_loc, cluster_name)\n\nfor rate in rates:\n  for (p, q) in ratios:\n    dep_cmd = \"./ec2-exp.sh deploy %s -g %s -i %s --reduce-tasks=%s -p %s -q %s -u %s -v %s --spark-backend-mem=%s\" % (\n      cluster_name, sparrow_branch, key_loc, reducers, p, q, partitions, rate, backend_mem)\n    run_cmd(dep_cmd)\n    run_cmd(restart_cmd)\n    run_cmd(start_cmd)\n    time.sleep(wait_delay)\n\n    collect_dir = \"%s\" % results_dirname\n    if not os.path.exists(collect_dir):\n      os.mkdir(collect_dir)\n    collect_cmd = \"./ec2-exp.sh -i %s collect-logs %s --log-dir=%s\" % (key_loc, cluster_name, collect_dir)\n    run_cmd(collect_cmd)\n\n    analysis_dir = \"%s/analysis\" % collect_dir\n    if not os.path.exists(analysis_dir):\n      os.mkdir(analysis_dir)\n\n    run_cmd(\"gunzip %s/*.log.gz\" % collect_dir)\n    run_cmd(\"python /home/ubuntu/sparrow/src/main/python/parse_tpch_logs.py 600 800 \" \\\n           \"/home/ubuntu/sparrow/deploy/ec2/%s/shark_* > /home/ubuntu/sparrow/deploy/ec2/%s/tpch_results\" % (collect_dir, analysis_dir))\n\n    run_cmd(\"/home/ubuntu/sparrow/src/main/python/parse_logs.sh start_sec=600 \" \\\n           \"end_sec=800 log_dir=/home/ubuntu/sparrow/deploy/ec2/%s/ output_dir=/home/ubuntu/sparrow/deploy/ec2/%s/ > /home/ubuntu/sparrow/deploy/ec2/%s/parse_results\" % (\n               collect_dir, analysis_dir, analysis_dir))\n    run_cmd(\"gzip %s/*.log\" % collect_dir)\n"
  },
  {
    "path": "deploy/example_sparrow_configuration.conf",
    "content": "# This file gives a basic Sparrow configuration. Refer to\n# daemon/SparrowConf.java for more configuration options (e.g., how\n# to specify various fairness policies).\ndeployment.mode = configbased\n# Change this line to have a comma-separated list of node monitors (the workers\n# where tasks will be run).  Each node monitor should be listed as\n# ipaddress:port (the default node monitor port is 20502).\nstatic.node_monitors = 128.32.37.33:20502\n# Name of the applicatoin using Sparrow. This can be anything -- as long as\n# it is consistent here and in the scheduling requests submitted. This does\n# not need to be changed if using the Prototype Frontend.\nstatic.app.name = testApp\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/PKG-INFO",
    "content": "Metadata-Version: 1.0\nName: boto\nVersion: 2.1.1\nSummary: Amazon Web Services Library\nHome-page: http://code.google.com/p/boto/\nAuthor: Mitch Garnaat\nAuthor-email: mitch@garnaat.com\nLicense: MIT\nDescription: Python interface to Amazon's Web Services.\nPlatform: Posix; MacOS X; Windows\nClassifier: Development Status :: 5 - Production/Stable\nClassifier: Intended Audience :: Developers\nClassifier: License :: OSI Approved :: MIT License\nClassifier: Operating System :: OS Independent\nClassifier: Topic :: Internet\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/bin/bundle_image",
    "content": "#!/usr/bin/env python\nfrom boto.manage.server import Server\nif __name__ == \"__main__\":\n    from optparse import OptionParser\n    parser = OptionParser(version=\"%prog 1.0\", usage=\"Usage: %prog [options] instance-id [instance-id-2]\")\n\n    # Commands\n    parser.add_option(\"-b\", \"--bucket\", help=\"Destination Bucket\", dest=\"bucket\", default=None)\n    parser.add_option(\"-p\", \"--prefix\", help=\"AMI Prefix\", dest=\"prefix\", default=None)\n    parser.add_option(\"-k\", \"--key\", help=\"Private Key File\", dest=\"key_file\", default=None)\n    parser.add_option(\"-c\", \"--cert\", help=\"Public Certificate File\", dest=\"cert_file\", default=None)\n    parser.add_option(\"-s\", \"--size\", help=\"AMI Size\", dest=\"size\", default=None)\n    parser.add_option(\"-i\", \"--ssh-key\", help=\"SSH Keyfile\", dest=\"ssh_key\", default=None)\n    parser.add_option(\"-u\", \"--user-name\", help=\"SSH Username\", dest=\"uname\", default=\"root\")\n    parser.add_option(\"-n\", \"--name\", help=\"Name of Image\", dest=\"name\")\n    (options, args) = parser.parse_args()\n\n    for instance_id in args:\n        try:\n            s = Server.find(instance_id=instance_id).next()\n            print \"Found old server object\"\n        except StopIteration:\n            print \"New Server Object Created\"\n            s = Server.create_from_instance_id(instance_id, options.name)\n        assert(s.hostname is not None)\n        b = s.get_bundler(uname=options.uname)\n        b.bundle(bucket=options.bucket,prefix=options.prefix,key_file=options.key_file,cert_file=options.cert_file,size=int(options.size),ssh_key=options.ssh_key)\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/bin/cfadmin",
    "content": "#!/usr/bin/env python\n# Author: Chris Moyer\n#\n# cfadmin is similar to sdbadmin for CloudFront, it's a simple\n# console utility to perform the most frequent tasks with CloudFront\n#\ndef _print_distributions(dists):\n    \"\"\"Internal function to print out all the distributions provided\"\"\"\n    print \"%-12s %-50s %s\" % (\"Status\", \"Domain Name\", \"Origin\")\n    print \"-\"*80\n    for d in dists:\n        print \"%-12s %-50s %-30s\" % (d.status, d.domain_name, d.origin)\n        for cname in d.cnames:\n            print \" \"*12, \"CNAME => %s\" % cname\n    print \"\"\n\ndef help(cf, fnc=None):\n    \"\"\"Print help message, optionally about a specific function\"\"\"\n    import inspect\n    self = sys.modules['__main__']\n    if fnc:\n        try:\n            cmd = getattr(self, fnc)\n        except:\n            cmd = None\n        if not inspect.isfunction(cmd):\n            print \"No function named: %s found\" % fnc\n            sys.exit(2)\n        (args, varargs, varkw, defaults) = inspect.getargspec(cmd)\n        print cmd.__doc__\n        print \"Usage: %s %s\" % (fnc, \" \".join([ \"[%s]\" % a for a in args[1:]]))\n    else:\n        print \"Usage: cfadmin [command]\"\n        for cname in dir(self):\n            if not cname.startswith(\"_\"):\n                cmd = getattr(self, cname)\n                if inspect.isfunction(cmd):\n                    doc = cmd.__doc__\n                    print \"\\t%s - %s\" % (cname, doc)\n    sys.exit(1)\n\ndef ls(cf):\n    \"\"\"List all distributions and streaming distributions\"\"\"\n    print \"Standard Distributions\"\n    _print_distributions(cf.get_all_distributions())\n    print \"Streaming Distributions\"\n    _print_distributions(cf.get_all_streaming_distributions())\n\ndef invalidate(cf, origin_or_id, *paths):\n    \"\"\"Create a cloudfront invalidation request\"\"\"\n    # Allow paths to be passed using stdin\n    if not paths:\n        paths = []\n        for path in sys.stdin.readlines():\n            path = path.strip()\n            if path:\n                paths.append(path)\n    dist = None\n    for d in cf.get_all_distributions():\n        if d.id == origin_or_id or d.origin.dns_name == origin_or_id:\n            dist = d\n            break\n    if not dist:\n        print \"Distribution not found: %s\" % origin_or_id\n        sys.exit(1)\n    cf.create_invalidation_request(dist.id, paths)\n\nif __name__ == \"__main__\":\n    import boto\n    import sys\n    cf = boto.connect_cloudfront()\n    self = sys.modules['__main__']\n    if len(sys.argv) >= 2:\n        try:\n            cmd = getattr(self, sys.argv[1])\n        except:\n            cmd = None\n        args = sys.argv[2:]\n    else:\n        cmd = help\n        args = []\n    if not cmd:\n        cmd = help\n    try:\n        cmd(cf, *args)\n    except TypeError, e:\n        print e\n        help(cf, cmd.__name__)\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/bin/cq",
    "content": "#!/usr/bin/env python\n# Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n#\nimport getopt, sys\nimport boto.sqs\nfrom boto.sqs.connection import SQSConnection\nfrom boto.exception import SQSError\n\ndef usage():\n    print 'cq [-c] [-q queue_name] [-o output_file] [-t timeout] [-r region]'\n  \ndef main():\n    try:\n        opts, args = getopt.getopt(sys.argv[1:], 'hcq:o:t:r:',\n                                   ['help', 'clear', 'queue',\n                                    'output', 'timeout', 'region'])\n    except:\n        usage()\n        sys.exit(2)\n    queue_name = ''\n    output_file = ''\n    timeout = 30\n    region = ''\n    clear = False\n    for o, a in opts:\n        if o in ('-h', '--help'):\n            usage()\n            sys.exit()\n        if o in ('-q', '--queue'):\n            queue_name = a\n        if o in ('-o', '--output'):\n            output_file = a\n        if o in ('-c', '--clear'):\n            clear = True\n        if o in ('-t', '--timeout'):\n            timeout = int(a)\n        if o in ('-r', '--region'):\n            region = a\n    if region:\n        c = boto.sqs.connect_to_region(region)\n    else:\n        c = SQSConnection()\n    if queue_name:\n        try:\n            rs = [c.create_queue(queue_name)]\n        except SQSError, e:\n            print 'An Error Occurred:'\n            print '%s: %s' % (e.status, e.reason)\n            print e.body\n            sys.exit()\n    else:\n        try:\n            rs = c.get_all_queues()\n        except SQSError, e:\n            print 'An Error Occurred:'\n            print '%s: %s' % (e.status, e.reason)\n            print e.body\n            sys.exit()\n    for q in rs:\n        if clear:\n            n = q.clear()\n            print 'clearing %d messages from %s' % (n, q.id)\n        elif output_file:\n            q.dump(output_file)\n        else:\n            print q.id, q.count(vtimeout=timeout)\n\nif __name__ == \"__main__\":\n    main()\n        \n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/bin/cwutil",
    "content": "#!/usr/bin/env python\n# Author: Chris Moyer <cmoyer@newstex.com>\n# Description: CloudWatch Utility\n# For listing stats, creating alarms, and managing \n# other CloudWatch aspects\n\nimport boto\ncw = boto.connect_cloudwatch()\n\nfrom datetime import datetime, timedelta\n\ndef _parse_time(time_string):\n    \"\"\"Internal function to parse a time string\"\"\"\n\ndef _parse_dict(d_string):\n    result = {}\n    if d_string:\n        for d in d_string.split(\",\"):\n            d = d.split(\":\")\n            result[d[0]] = d[1]\n    return result\n\ndef ls(namespace=None):\n    \"\"\"\n    List metrics, optionally filtering by a specific namespace\n        namespace: Optional Namespace to filter on\n    \"\"\"\n    print \"%-10s %-50s %s\" % (\"Namespace\", \"Metric Name\", \"Dimensions\")\n    print \"-\"*80\n    for m in cw.list_metrics():\n        if namespace is None or namespace.upper() in m.namespace:\n            print \"%-10s %-50s %s\" % (m.namespace, m.name, m.dimensions)\n\ndef stats(namespace, metric_name, dimensions=None, statistics=\"Average\", start_time=None, end_time=None, period=60, unit=None):\n    \"\"\"\n    Lists the statistics for a specific metric\n        namespace: The namespace to use, usually \"AWS/EC2\", \"AWS/SQS\", etc.\n        metric_name: The name of the metric to track, pulled from `ls`\n        dimensions: The dimensions to use, formatted as Name:Value (such as QueueName:myQueue)\n        statistics: The statistics to measure, defaults to \"Average\"\n             'Minimum', 'Maximum', 'Sum', 'Average', 'SampleCount'\n        start_time: Start time, default to now - 1 day\n        end_time: End time, default to now\n        period: Period/interval for counts, default to 60 minutes\n        unit: Unit to track, default depends on what metric is being tracked\n    \"\"\"\n\n    # Parse the dimensions\n    dimensions = _parse_dict(dimensions)\n\n    # Parse the times\n    if end_time:\n        end_time = _parse_time(end_time)\n    else:\n        end_time = datetime.utcnow()\n    if start_time:\n        start_time = _parse_time(start_time)\n    else:\n        start_time = datetime.utcnow() - timedelta(days=1)\n            \n    print \"%-30s %s\" % ('Timestamp', statistics)\n    print \"-\"*50\n    data = {}\n    for m in cw.get_metric_statistics(int(period), start_time, end_time, metric_name, namespace, statistics, dimensions, unit):\n        data[m['Timestamp']] = m[statistics]\n    keys = data.keys()\n    keys.sort()\n    for k in keys:\n        print \"%-30s %s\" % (k, data[k])\n\ndef put(namespace, metric_name, dimensions=None, value=None, unit=None, statistics=None, timestamp=None):\n    \"\"\"\n    Publish custom metrics\n        namespace: The namespace to use; values starting with \"AWS/\" are reserved\n        metric_name: The name of the metric to update\n        dimensions: The dimensions to use, formatted as Name:Value (such as QueueName:myQueue)\n        value: The value to store, mutually exclusive with `statistics`\n        statistics: The statistics to store, mutually exclusive with `value`\n            (must specify all of \"Minimum\", \"Maximum\", \"Sum\", \"SampleCount\")\n        timestamp: The timestamp of this measurement, default is current server time\n        unit: Unit to track, default depends on what metric is being tracked\n    \"\"\"\n    \n    def simplify(lst):\n        return lst[0] if len(lst) == 1 else lst\n\n    print cw.put_metric_data(namespace, simplify(metric_name.split(';')),\n        dimensions = simplify(map(_parse_dict, dimensions.split(';'))) if dimensions else None,\n        value = simplify(value.split(';')) if value else None,\n        statistics = simplify(map(_parse_dict, statistics.split(';'))) if statistics else None,\n        timestamp = simplify(timestamp.split(';')) if timestamp else None,\n        unit = simplify(unit.split(';')) if unit else None)\n\ndef help(fnc=None):\n    \"\"\"\n    Print help message, optionally about a specific function\n    \"\"\"\n    import inspect\n    self = sys.modules['__main__']\n    if fnc:\n        try:\n            cmd = getattr(self, fnc)\n        except:\n            cmd = None\n        if not inspect.isfunction(cmd):\n            print \"No function named: %s found\" % fnc\n            sys.exit(2)\n        (args, varargs, varkw, defaults) = inspect.getargspec(cmd)\n        print cmd.__doc__\n        print \"Usage: %s %s\" % (fnc, \" \".join([ \"[%s]\" % a for a in args]))\n    else:\n        print \"Usage: cwutil [command]\"\n        for cname in dir(self):\n            if not cname.startswith(\"_\") and not cname == \"cmd\":\n                cmd = getattr(self, cname)\n                if inspect.isfunction(cmd):\n                    doc = cmd.__doc__\n                    print \"\\t%s - %s\" % (cname, doc)\n    sys.exit(1)\n\n\nif __name__ == \"__main__\":\n    import sys\n    self = sys.modules['__main__']\n    if len(sys.argv) >= 2:\n        try:\n            cmd = getattr(self, sys.argv[1])\n        except:\n            cmd = None\n        args = sys.argv[2:]\n    else:\n        cmd = help\n        args = []\n    if not cmd:\n        cmd = help\n    try:\n        cmd(*args)\n    except TypeError, e:\n        print e\n        help(cmd.__name__)\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/bin/elbadmin",
    "content": "#!/usr/bin/env python\n# Copyright (c) 2009 Chris Moyer http://coredumped.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n\n#\n# Elastic Load Balancer Tool\n#\nVERSION=\"0.1\"\nusage = \"\"\"%prog [options] [command]\nCommands:\n    list|ls                           List all Elastic Load Balancers\n    delete    <name>                  Delete ELB <name>\n    get       <name>                  Get all instances associated with <name>\n    create    <name>                  Create an ELB\n    add       <name> <instance>       Add <instance> in ELB <name>\n    remove|rm <name> <instance>       Remove <instance> from ELB <name>\n    enable|en <name> <zone>           Enable Zone <zone> for ELB <name>\n    disable   <name> <zone>           Disable Zone <zone> for ELB <name>\n    addl      <name>                  Add listeners (specified by -l) to the ELB <name>\n    rml       <name> <port>           Remove Listener(s) specified by the port on the ELB\n\"\"\"\n\ndef list(elb):\n    \"\"\"List all ELBs\"\"\"\n    print \"%-20s %s\" %  (\"Name\", \"DNS Name\")\n    print \"-\"*80\n    for b in elb.get_all_load_balancers():\n        print \"%-20s %s\" % (b.name, b.dns_name)\n\ndef get(elb, name):\n    \"\"\"Get details about ELB <name>\"\"\"\n    elbs = elb.get_all_load_balancers(name)\n    if len(elbs) < 1:\n        print \"No load balancer by the name of %s found\" % name\n        return\n    for b in elbs:\n        if name in b.name:\n            print \"=\"*80\n            print \"Name: %s\" % b.name\n            print \"DNS Name: %s\" % b.dns_name\n\n            print\n\n            print \"Listeners\"\n            print \"---------\"\n            print \"%-8s %-8s %s\" % (\"IN\", \"OUT\", \"PROTO\")\n            for l in b.listeners:\n                print \"%-8s %-8s %s\" % (l[0], l[1], l[2])\n\n            print\n\n            print \"  Zones  \"\n            print \"---------\"\n            for z in b.availability_zones:\n                print z\n\n            print\n\n            print \"Instances\"\n            print \"---------\"\n            for i in b.instances:\n                print i.id\n\n            print\n\ndef create(elb, name, zones, listeners):\n    \"\"\"Create an ELB named <name>\"\"\"\n    l_list = []\n    for l in listeners:\n        l = l.split(\",\")\n        if l[2]=='HTTPS':\n            l_list.append((int(l[0]), int(l[1]), l[2], l[3]))\n        else : l_list.append((int(l[0]), int(l[1]), l[2]))\n    \n    b = elb.create_load_balancer(name, zones, l_list)\n    return get(elb, name)\n\ndef delete(elb, name):\n    \"\"\"Delete this ELB\"\"\"\n    b = elb.get_all_load_balancers(name)\n    if len(b) < 1:\n        print \"No load balancer by the name of %s found\" % name\n        return\n    for i in b:\n        if name in i.name:\n            i.delete()\n    print \"Load Balancer %s deleted\" % name\n\ndef add_instance(elb, name, instance):\n    \"\"\"Add <instance> to ELB <name>\"\"\"\n    b = elb.get_all_load_balancers(name)\n    if len(b) < 1:\n        print \"No load balancer by the name of %s found\" % name\n        return\n    for i in b:\n        if name in i.name:\n            i.register_instances([instance])\n    return get(elb, name)\n\n\ndef remove_instance(elb, name, instance):\n    \"\"\"Remove instance from elb <name>\"\"\"\n    b = elb.get_all_load_balancers(name)\n    if len(b) < 1:\n        print \"No load balancer by the name of %s found\" % name\n        return\n    for i in b:\n        if name in i.name:\n            i.deregister_instances([instance])\n    return get(elb, name)\n\ndef enable_zone(elb, name, zone):\n    \"\"\"Enable <zone> for elb\"\"\"\n    b = elb.get_all_load_balancers(name)\n    if len(b) < 1:\n        print \"No load balancer by the name of %s found\" % name\n        return\n    b = b[0]\n    b.enable_zones([zone])\n    return get(elb, name)\n\ndef disable_zone(elb, name, zone):\n    \"\"\"Disable <zone> for elb\"\"\"\n    b = elb.get_all_load_balancers(name)\n    if len(b) < 1:\n        print \"No load balancer by the name of %s found\" % name\n        return\n    b = b[0]\n    b.disable_zones([zone])\n    return get(elb, name)\n\ndef add_listener(elb, name, listeners):\n    \"\"\"Add listeners to a given load balancer\"\"\"\n    l_list = []\n    for l in listeners:\n        l = l.split(\",\")\n        l_list.append((int(l[0]), int(l[1]), l[2]))\n    b = elb.get_all_load_balancers(name)\n    if len(b) < 1:\n        print \"No load balancer by the name of %s found\" % name\n        return\n    b = b[0]\n    b.create_listeners(l_list)\n    return get(elb, name)\n\ndef rm_listener(elb, name, ports):\n    \"\"\"Remove listeners from a given load balancer\"\"\"\n    b = elb.get_all_load_balancers(name)\n    if len(b) < 1:\n        print \"No load balancer by the name of %s found\" % name\n        return\n    b = b[0]\n    b.delete_listeners(ports)\n    return get(elb, name)\n\n\n\n\nif __name__ == \"__main__\":\n    try:\n        import readline\n    except ImportError:\n        pass\n    import boto\n    import sys\n    from optparse import OptionParser\n    from boto.mashups.iobject import IObject\n    parser = OptionParser(version=VERSION, usage=usage)\n    parser.add_option(\"-z\", \"--zone\", help=\"Operate on zone\", action=\"append\", default=[], dest=\"zones\")\n    parser.add_option(\"-l\", \"--listener\", help=\"Specify Listener in,out,proto\", action=\"append\", default=[], dest=\"listeners\")\n\n    (options, args) = parser.parse_args()\n\n    if len(args) < 1:\n        parser.print_help()\n        sys.exit(1)\n\n    elb = boto.connect_elb()\n\n    print \"%s\" % (elb.region.endpoint)\n\n    command = args[0].lower()\n    if command in (\"ls\", \"list\"):\n        list(elb)\n    elif command == \"get\":\n        get(elb, args[1])\n    elif command == \"create\":\n        create(elb, args[1], options.zones, options.listeners)\n    elif command == \"delete\":\n        delete(elb, args[1])\n    elif command in (\"add\", \"put\"):\n        add_instance(elb, args[1], args[2])\n    elif command in (\"rm\", \"remove\"):\n        remove_instance(elb, args[1], args[2])\n    elif command in (\"en\", \"enable\"):\n        enable_zone(elb, args[1], args[2])\n    elif command == \"disable\":\n        disable_zone(elb, args[1], args[2])\n    elif command == \"addl\":\n        add_listener(elb, args[1], options.listeners)\n    elif command == \"rml\":\n        rm_listener(elb, args[1], args[2:])\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/bin/fetch_file",
    "content": "#!/usr/bin/env python\n# Copyright (c) 2009 Chris Moyer http://coredumped.org\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n#\nif __name__ == \"__main__\":\n\tfrom optparse import OptionParser\n\tparser = OptionParser(version=\"0.1\", usage=\"Usage: %prog [options] url\")\n\tparser.add_option(\"-o\", \"--out-file\", help=\"Output file\", dest=\"outfile\")\n\n\t(options, args) = parser.parse_args()\n\tif len(args) < 1:\n\t\tparser.print_help()\n\t\texit(1)\n\tfrom boto.utils import fetch_file\n\tf = fetch_file(args[0])\n\tif options.outfile:\n\t\topen(options.outfile, \"w\").write(f.read())\n\telse:\n\t\tprint f.read()\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/bin/kill_instance",
    "content": "#!/usr/bin/env python\n\nimport sys\nfrom optparse import OptionParser\n\nimport boto\nfrom boto.ec2 import regions\n\n\n\ndef kill_instance(region, ids):\n    \"\"\"Kill an instances given it's instance IDs\"\"\"\n    # Connect the region\n    ec2 = boto.connect_ec2(region=region)\n    for instance_id in ids:\n        print \"Stopping instance: %s\" % instance_id\n        ec2.terminate_instances([instance_id])\n\n\nif __name__ == \"__main__\":\n    parser = OptionParser(usage=\"kill_instance [-r] id [id ...]\")\n    parser.add_option(\"-r\", \"--region\", help=\"Region (default us-east-1)\", dest=\"region\", default=\"us-east-1\")\n    (options, args) = parser.parse_args()\n    if not args:\n        parser.print_help()\n        sys.exit(1)\n    for r in regions():\n        if r.name == options.region:\n            region = r\n            break\n    else:\n        print \"Region %s not found.\" % options.region\n        sys.exit(1)\n\n    kill_instance(region, args)\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/bin/launch_instance",
    "content": "#!/usr/bin/env python\n# Copyright (c) 2009 Chris Moyer http://coredumped.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n\n#\n# Utility to launch an EC2 Instance\n#\nVERSION=\"0.2\"\n\n\nCLOUD_INIT_SCRIPT = \"\"\"#!/usr/bin/env python\nf = open(\"/etc/boto.cfg\", \"w\")\nf.write(\\\"\\\"\\\"%s\\\"\\\"\\\")\nf.close()\n\"\"\"\nimport boto.pyami.config\nimport boto.utils\nimport re, os\nimport ConfigParser\n\nclass Config(boto.pyami.config.Config):\n    \"\"\"A special config class that also adds import abilities\n    Directly in the config file. To have a config file import\n    another config file, simply use \"#import <path>\" where <path>\n    is either a relative path or a full URL to another config\n    \"\"\"\n\n    def __init__(self):\n        ConfigParser.SafeConfigParser.__init__(self, {'working_dir' : '/mnt/pyami', 'debug' : '0'})\n\n    def add_config(self, file_url):\n        \"\"\"Add a config file to this configuration\n        :param file_url: URL for the file to add, or a local path\n        :type file_url: str\n        \"\"\"\n        if not re.match(\"^([a-zA-Z0-9]*:\\/\\/)(.*)\", file_url):\n            if not file_url.startswith(\"/\"):\n                file_url = os.path.join(os.getcwd(), file_url)\n            file_url = \"file://%s\" % file_url\n        (base_url, file_name) = file_url.rsplit(\"/\", 1)\n        base_config = boto.utils.fetch_file(file_url)\n        base_config.seek(0)\n        for line in base_config.readlines():\n            match = re.match(\"^#import[\\s\\t]*([^\\s^\\t]*)[\\s\\t]*$\", line)\n            if match:\n                self.add_config(\"%s/%s\" % (base_url, match.group(1)))\n        base_config.seek(0)\n        self.readfp(base_config)\n\n    def add_creds(self, ec2):\n        \"\"\"Add the credentials to this config if they don't already exist\"\"\"\n        if not self.has_section('Credentials'):\n            self.add_section('Credentials')\n            self.set('Credentials', 'aws_access_key_id', ec2.aws_access_key_id)\n            self.set('Credentials', 'aws_secret_access_key', ec2.aws_secret_access_key)\n\n\n    def __str__(self):\n        \"\"\"Get config as string\"\"\"\n        from StringIO import StringIO\n        s = StringIO()\n        self.write(s)\n        return s.getvalue()\n\nSCRIPTS = []\n\ndef scripts_callback(option, opt, value, parser):\n    arg = value.split(',')\n    if len(arg) == 1:\n        SCRIPTS.append(arg[0])\n    else:\n        SCRIPTS.extend(arg)\n    setattr(parser.values, option.dest, SCRIPTS)\n\ndef add_script(scr_url):\n    \"\"\"Read a script and any scripts that are added using #import\"\"\"\n    base_url = '/'.join(scr_url.split('/')[:-1]) + '/'\n    script_raw = boto.utils.fetch_file(scr_url)\n    script_content = ''\n    for line in script_raw.readlines():\n        match = re.match(\"^#import[\\s\\t]*([^\\s^\\t]*)[\\s\\t]*$\", line)\n        #if there is an import\n        if match:\n            #Read the other script and put it in that spot\n            script_content += add_script(\"%s/%s\" % (base_url, match.group(1)))\n        else:\n            #Otherwise, add the line and move on\n            script_content += line\n    return script_content\n\nif __name__ == \"__main__\":\n    try:\n        import readline\n    except ImportError:\n        pass\n    import sys\n    import time\n    import boto\n    from boto.ec2 import regions\n    from optparse import OptionParser\n    from boto.mashups.iobject import IObject\n    parser = OptionParser(version=VERSION, usage=\"%prog [options] config_url\")\n    parser.add_option(\"-c\", \"--max-count\", help=\"Maximum number of this type of instance to launch\", dest=\"max_count\", default=\"1\")\n    parser.add_option(\"--min-count\", help=\"Minimum number of this type of instance to launch\", dest=\"min_count\", default=\"1\")\n    parser.add_option(\"--cloud-init\", help=\"Indicates that this is an instance that uses 'CloudInit', Ubuntu's cloud bootstrap process. This wraps the config in a shell script command instead of just passing it in directly\", dest=\"cloud_init\", default=False, action=\"store_true\")\n    parser.add_option(\"-g\", \"--groups\", help=\"Security Groups to add this instance to\",  action=\"append\", dest=\"groups\")\n    parser.add_option(\"-a\", \"--ami\", help=\"AMI to launch\", dest=\"ami_id\")\n    parser.add_option(\"-t\", \"--type\", help=\"Type of Instance (default m1.small)\", dest=\"type\", default=\"m1.small\")\n    parser.add_option(\"-k\", \"--key\", help=\"Keypair\", dest=\"key_name\")\n    parser.add_option(\"-z\", \"--zone\", help=\"Zone (default us-east-1a)\", dest=\"zone\", default=\"us-east-1a\")\n    parser.add_option(\"-r\", \"--region\", help=\"Region (default us-east-1)\", dest=\"region\", default=\"us-east-1\")\n    parser.add_option(\"-i\", \"--ip\", help=\"Elastic IP\", dest=\"elastic_ip\")\n    parser.add_option(\"-n\", \"--no-add-cred\", help=\"Don't add a credentials section\", default=False, action=\"store_true\", dest=\"nocred\")\n    parser.add_option(\"--save-ebs\", help=\"Save the EBS volume on shutdown, instead of deleting it\", default=False, action=\"store_true\", dest=\"save_ebs\")\n    parser.add_option(\"-w\", \"--wait\", help=\"Wait until instance is running\", default=False, action=\"store_true\", dest=\"wait\")\n    parser.add_option(\"-d\", \"--dns\", help=\"Returns public and private DNS (implicates --wait)\", default=False, action=\"store_true\", dest=\"dns\")\n    parser.add_option(\"-T\", \"--tag\", help=\"Set tag\", default=None, action=\"append\", dest=\"tags\", metavar=\"key:value\")\n    parser.add_option(\"-s\", \"--scripts\", help=\"Pass in a script or a folder containing scripts to be run when the instance starts up, assumes cloud-init. Specify scripts in a list specified by commas. If multiple scripts are specified, they are run lexically (A good way to ensure they run in the order is to prefix filenames with numbers)\", type='string', action=\"callback\", callback=scripts_callback)\n\n    (options, args) = parser.parse_args()\n\n    if len(args) < 1:\n        parser.print_help()\n        sys.exit(1)\n    file_url = os.path.expanduser(args[0])\n\n    cfg = Config()\n    cfg.add_config(file_url)\n\n    for r in regions():\n        if r.name == options.region:\n            region = r\n            break\n    else:\n        print \"Region %s not found.\" % options.region\n        sys.exit(1)\n    ec2 = boto.connect_ec2(region=region)\n    if not options.nocred:\n        cfg.add_creds(ec2)\n\n    iobj = IObject()\n    if options.ami_id:\n        ami = ec2.get_image(options.ami_id)\n    else:\n        ami_id = options.ami_id\n        l = [(a, a.id, a.location) for a in ec2.get_all_images()]\n        ami = iobj.choose_from_list(l, prompt='Choose AMI')\n\n    if options.key_name:\n        key_name = options.key_name\n    else:\n        l = [(k, k.name, '') for k in ec2.get_all_key_pairs()]\n        key_name = iobj.choose_from_list(l, prompt='Choose Keypair').name\n\n    if options.groups:\n        groups = options.groups\n    else:\n        groups = []\n        l = [(g, g.name, g.description) for g in ec2.get_all_security_groups()]\n        g = iobj.choose_from_list(l, prompt='Choose Primary Security Group')\n        while g != None:\n            groups.append(g)\n            l.remove((g, g.name, g.description))\n            g = iobj.choose_from_list(l, prompt='Choose Additional Security Group (0 to quit)')\n\n    user_data = str(cfg)\n    # If it's a cloud init AMI,\n    # then we need to wrap the config in our\n    # little wrapper shell script\n\n    if options.cloud_init:\n        user_data = CLOUD_INIT_SCRIPT % user_data\n        scriptuples = []\n        if options.scripts:\n            scripts = options.scripts\n            scriptuples.append(('user_data', user_data))\n            for scr in scripts:\n                scr_url = scr\n                if not re.match(\"^([a-zA-Z0-9]*:\\/\\/)(.*)\", scr_url):\n                    if not scr_url.startswith(\"/\"):\n                        scr_url = os.path.join(os.getcwd(), scr_url)\n                    try:\n                        newfiles = os.listdir(scr_url)\n                        for f in newfiles:\n                            #put the scripts in the folder in the array such that they run in the correct order\n                            scripts.insert(scripts.index(scr) + 1, scr.split(\"/\")[-1] + \"/\" + f)\n                    except OSError:\n                        scr_url = \"file://%s\" % scr_url\n                try:\n                    scriptuples.append((scr, add_script(scr_url)))\n                except Exception, e:\n                    pass\n\n            user_data = boto.utils.write_mime_multipart(scriptuples, compress=True)\n\n    shutdown_proc = \"terminate\"\n    if options.save_ebs:\n        shutdown_proc = \"save\"\n\n    r = ami.run(min_count=int(options.min_count), max_count=int(options.max_count),\n            key_name=key_name, user_data=user_data,\n            security_groups=groups, instance_type=options.type,\n            placement=options.zone, instance_initiated_shutdown_behavior=shutdown_proc)\n\n    instance = r.instances[0]\n\n    if options.tags:\n        for tag_pair in options.tags:\n            name = tag_pair\n            value = ''\n            if ':' in tag_pair:\n                name, value = tag_pair.split(':', 1)\n            instance.add_tag(name, value)\n\n    if options.dns:\n        options.wait = True\n\n    if not options.wait:\n        sys.exit(0)\n\n    while True:\n        instance.update()\n        if instance.state == 'running':\n            break\n        time.sleep(3)\n\n    if options.dns:\n        print \"Public DNS name: %s\" % instance.public_dns_name\n        print \"Private DNS name: %s\" % instance.private_dns_name\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/bin/list_instances",
    "content": "#!/usr/bin/env python\n\nimport sys\nfrom operator import attrgetter\nfrom optparse import OptionParser\n\nimport boto\nfrom boto.ec2 import regions\n\n\nHEADERS = {\n    'ID': {'get': attrgetter('id'), 'length':15},\n    'Zone': {'get': attrgetter('placement'), 'length':15},\n    'Groups': {'get': attrgetter('groups'), 'length':30},\n    'Hostname': {'get': attrgetter('public_dns_name'), 'length':50},\n    'State': {'get': attrgetter('state'), 'length':15},\n    'Image': {'get': attrgetter('image_id'), 'length':15},\n    'Type': {'get': attrgetter('instance_type'), 'length':15},\n    'IP': {'get': attrgetter('ip_address'), 'length':16},\n    'PrivateIP': {'get': attrgetter('private_ip_address'), 'length':16},\n    'Key': {'get': attrgetter('key_name'), 'length':25},\n    'T:': {'length': 30},\n}\n\ndef get_column(name, instance=None):\n    if name.startswith('T:'):\n        _, tag = name.split(':', 1)\n        return instance.tags.get(tag, '')\n    return HEADERS[name]['get'](instance)\n\n\ndef main():\n    parser = OptionParser()\n    parser.add_option(\"-r\", \"--region\", help=\"Region (default us-east-1)\", dest=\"region\", default=\"us-east-1\")\n    parser.add_option(\"-H\", \"--headers\", help=\"Set headers (use 'T:tagname' for including tags)\", default=None, action=\"store\", dest=\"headers\", metavar=\"ID,Zone,Groups,Hostname,State,T:Name\")\n    (options, args) = parser.parse_args()\n\n    # Connect the region\n    for r in regions():\n        if r.name == options.region:\n            region = r\n            break\n    else:\n        print \"Region %s not found.\" % options.region\n        sys.exit(1)\n    ec2 = boto.connect_ec2(region=region)\n\n    # Read headers\n    if options.headers:\n        headers = tuple(options.headers.split(','))\n    else:\n        headers = (\"ID\", 'Zone', \"Groups\", \"Hostname\")\n\n    # Create format string\n    format_string = \"\"\n    for h in headers:\n        if h.startswith('T:'):\n            format_string += \"%%-%ds\" % HEADERS['T:']['length']\n        else:\n            format_string += \"%%-%ds\" % HEADERS[h]['length']\n\n\n    # List and print\n    print format_string % headers\n    print \"-\" * len(format_string % headers)\n    for r in ec2.get_all_instances():\n        groups = [g.id for g in r.groups]\n        for i in r.instances:\n            i.groups = ','.join(groups)\n            print format_string % tuple(get_column(h, i) for h in headers)\n\nif __name__ == \"__main__\":\n    main()\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/bin/lss3",
    "content": "#!/usr/bin/env python\nimport boto\nfrom boto.s3.connection import OrdinaryCallingFormat\n\ndef sizeof_fmt(num):\n    for x in ['b ','KB','MB','GB','TB', 'XB']:\n        if num < 1024.0:\n            return \"%3.1f %s\" % (num, x)\n        num /= 1024.0\n    return \"%3.1f %s\" % (num, x)\n\ndef list_bucket(b, prefix=None):\n    \"\"\"List everything in a bucket\"\"\"\n    from boto.s3.prefix import Prefix\n    from boto.s3.key import Key\n    total = 0\n    query = b\n    if prefix:\n        if not prefix.endswith(\"/\"):\n            prefix = prefix + \"/\"\n        query = b.list(prefix=prefix, delimiter=\"/\")\n        print \"%s\" % prefix\n    num = 0\n    for k in query:\n        num += 1\n        mode = \"-rwx---\"\n        if isinstance(k, Prefix):\n            mode = \"drwxr--\"\n            size = 0\n        else:\n            size = k.size\n            for g in k.get_acl().acl.grants:\n                if g.id == None:\n                    if g.permission == \"READ\":\n                        mode = \"-rwxr--\"\n                    elif g.permission == \"FULL_CONTROL\":\n                        mode = \"-rwxrwx\"\n        if isinstance(k, Key):\n           print \"%s\\t%s\\t%010s\\t%s\" % (mode, k.last_modified,\n                 sizeof_fmt(size), k.name)\n        else:\n           #If it's not a Key object, it doesn't have a last_modified time, so\n           #print nothing instead\n           print \"%s\\t%s\\t%010s\\t%s\" % (mode, ' '*24,\n              sizeof_fmt(size), k.name)\n        total += size\n    print \"=\"*80\n    print \"\\t\\tTOTAL:  \\t%010s \\t%i Files\" % (sizeof_fmt(total), num)\n\ndef list_buckets(s3):\n    \"\"\"List all the buckets\"\"\"\n    for b in s3.get_all_buckets():\n        print b.name\n\nif __name__ == \"__main__\":\n    import sys\n\n    pairs = []\n    mixedCase = False\n    for name in sys.argv[1:]:\n            if \"/\" in name:\n                pairs.append(name.split(\"/\",1))\n            else:\n                pairs.append([name, None])\n            if pairs[-1][0].lower() != pairs[-1][0]:\n                mixedCase = True\n\n    if mixedCase:\n        s3 = boto.connect_s3(calling_format=OrdinaryCallingFormat())\n    else:\n        s3 = boto.connect_s3()\n\n    if len(sys.argv) < 2:\n        list_buckets(s3)\n    else:\n        for name, prefix in pairs:\n            list_bucket(s3.get_bucket(name), prefix)\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/bin/pyami_sendmail",
    "content": "#!/usr/bin/env python\n# Copyright (c) 2010 Chris Moyer http://coredumped.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n\n#\n# Send Mail from a PYAMI instance, or anything that has a boto.cfg\n# properly set up\n#\nVERSION=\"0.1\"\nusage = \"\"\"%prog [options]\nSends whatever is on stdin to the recipient specified by your boto.cfg\nor whoevery you specify in the options here.\n\"\"\"\n\nif __name__ == \"__main__\":\n    from boto.utils import notify\n    import sys\n    from optparse import OptionParser\n    parser = OptionParser(version=VERSION, usage=usage)\n    parser.add_option(\"-t\", \"--to\", help=\"Optional to address to send to (default from your boto.cfg)\", action=\"store\", default=None, dest=\"to\")\n    parser.add_option(\"-s\", \"--subject\", help=\"Optional Subject to send this report as\", action=\"store\", default=\"Report\", dest=\"subject\")\n    parser.add_option(\"-f\", \"--file\", help=\"Optionally, read from a file instead of STDIN\", action=\"store\", default=None, dest=\"file\")\n    parser.add_option(\"--html\", help=\"HTML Format the email\", action=\"store_true\", default=False, dest=\"html\")\n    parser.add_option(\"--no-instance-id\", help=\"If set, don't append the instance id\", action=\"store_false\", default=True, dest=\"append_instance_id\")\n\n    (options, args) = parser.parse_args()\n    if options.file:\n        body = open(options.file, 'r').read()\n    else:\n        body = sys.stdin.read()\n\n    if options.html:\n        notify(options.subject, html_body=body, to_string=options.to, append_instance_id=options.append_instance_id)\n    else:\n        notify(options.subject, body=body, to_string=options.to, append_instance_id=options.append_instance_id)\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/bin/route53",
    "content": "#!/usr/bin/env python\n# Author: Chris Moyer\n#\n# route53 is similar to sdbadmin for Route53, it's a simple\n# console utility to perform the most frequent tasks with Route53\n\ndef _print_zone_info(zoneinfo):\n    print \"=\"*80\n    print \"| ID:   %s\" % zoneinfo['Id'].split(\"/\")[-1]\n    print \"| Name: %s\" % zoneinfo['Name']\n    print \"| Ref:  %s\" % zoneinfo['CallerReference']\n    print \"=\"*80\n    print zoneinfo['Config']\n    print\n    \n\ndef create(conn, hostname, caller_reference=None, comment=''):\n    \"\"\"Create a hosted zone, returning the nameservers\"\"\"\n    response = conn.create_hosted_zone(hostname, caller_reference, comment)\n    print \"Pending, please add the following Name Servers:\"\n    for ns in response.NameServers:\n        print \"\\t\", ns\n\ndef delete_zone(conn, hosted_zone_id):\n    \"\"\"Delete a hosted zone by ID\"\"\"\n    response = conn.delete_hosted_zone(hosted_zone_id)\n    print response\n\ndef ls(conn):\n    \"\"\"List all hosted zones\"\"\"\n    response = conn.get_all_hosted_zones()\n    for zoneinfo in response['ListHostedZonesResponse']['HostedZones']:\n        _print_zone_info(zoneinfo)\n\ndef get(conn, hosted_zone_id, type=None, name=None, maxitems=None):\n    \"\"\"Get all the records for a single zone\"\"\"\n    response = conn.get_all_rrsets(hosted_zone_id, type, name, maxitems=maxitems)\n    # If a maximum number of items was set, we limit to that number\n    # by turning the response into an actual list (copying it)\n    # instead of allowing it to page\n    if maxitems:\n        response = response[:]\n    print '%-40s %-5s %-20s %s' % (\"Name\", \"Type\", \"TTL\", \"Value(s)\")\n    for record in response:\n        print '%-40s %-5s %-20s %s' % (record.name, record.type, record.ttl, record.to_print())\n\n\ndef add_record(conn, hosted_zone_id, name, type, values, ttl=600, comment=\"\"):\n    \"\"\"Add a new record to a zone\"\"\"\n    from boto.route53.record import ResourceRecordSets\n    changes = ResourceRecordSets(conn, hosted_zone_id, comment)\n    change = changes.add_change(\"CREATE\", name, type, ttl)\n    for value in values.split(','):\n        change.add_value(value)\n    print changes.commit()\n\ndef del_record(conn, hosted_zone_id, name, type, values, ttl=600, comment=\"\"):\n    \"\"\"Delete a record from a zone\"\"\"\n    from boto.route53.record import ResourceRecordSets\n    changes = ResourceRecordSets(conn, hosted_zone_id, comment)\n    change = changes.add_change(\"DELETE\", name, type, ttl)\n    for value in values.split(','):\n        change.add_value(value)\n    print changes.commit()\n\ndef add_alias(conn, hosted_zone_id, name, type, alias_hosted_zone_id, alias_dns_name, comment=\"\"):\n    \"\"\"Add a new alias to a zone\"\"\"\n    from boto.route53.record import ResourceRecordSets\n    changes = ResourceRecordSets(conn, hosted_zone_id, comment)\n    change = changes.add_change(\"CREATE\", name, type)\n    change.set_alias(alias_hosted_zone_id, alias_dns_name)\n    print changes.commit()\n\ndef del_alias(conn, hosted_zone_id, name, type, alias_hosted_zone_id, alias_dns_name, comment=\"\"):\n    \"\"\"Delete an alias from a zone\"\"\"\n    from boto.route53.record import ResourceRecordSets\n    changes = ResourceRecordSets(conn, hosted_zone_id, comment)\n    change = changes.add_change(\"DELETE\", name, type)\n    change.set_alias(alias_hosted_zone_id, alias_dns_name)\n    print changes.commit()\n\ndef change_record(conn, hosted_zone_id, name, type, values, ttl=600, comment=\"\"):\n    \"\"\"Delete and then add a record to a zone\"\"\"\n    from boto.route53.record import ResourceRecordSets\n    changes = ResourceRecordSets(conn, hosted_zone_id, comment)\n    response = conn.get_all_rrsets(hosted_zone_id, type, name, maxitems=1)[0]\n    change1 = changes.add_change(\"DELETE\", name, type, response.ttl)\n    for old_value in response.resource_records:\n        change1.add_value(old_value)\n    change2 = changes.add_change(\"CREATE\", name, type, ttl)\n    for new_value in values.split(','):\n        change2.add_value(new_value)\n    print changes.commit()\n\ndef help(conn, fnc=None):\n    \"\"\"Prints this help message\"\"\"\n    import inspect\n    self = sys.modules['__main__']\n    if fnc:\n        try:\n            cmd = getattr(self, fnc)\n        except:\n            cmd = None\n        if not inspect.isfunction(cmd):\n            print \"No function named: %s found\" % fnc\n            sys.exit(2)\n        (args, varargs, varkw, defaults) = inspect.getargspec(cmd)\n        print cmd.__doc__\n        print \"Usage: %s %s\" % (fnc, \" \".join([ \"[%s]\" % a for a in args[1:]]))\n    else:\n        print \"Usage: route53 [command]\"\n        for cname in dir(self):\n            if not cname.startswith(\"_\"):\n                cmd = getattr(self, cname)\n                if inspect.isfunction(cmd):\n                    doc = cmd.__doc__\n                    print \"\\t%-20s  %s\" % (cname, doc)\n    sys.exit(1)\n\n\nif __name__ == \"__main__\":\n    import boto\n    import sys\n    conn = boto.connect_route53()\n    self = sys.modules['__main__']\n    if len(sys.argv) >= 2:\n        try:\n            cmd = getattr(self, sys.argv[1])\n        except:\n            cmd = None\n        args = sys.argv[2:]\n    else:\n        cmd = help\n        args = []\n    if not cmd:\n        cmd = help\n    try:\n        cmd(conn, *args)\n    except TypeError, e:\n        print e\n        help(conn, cmd.__name__)\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/bin/s3multiput",
    "content": "#!/usr/bin/env python\n# Copyright (c) 2006,2007,2008 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n#\n\n# multipart portions copyright Fabian Topfstedt\n# https://gist.github.com/924094\n\n\nimport math\nimport mimetypes\nfrom multiprocessing import Pool\nimport getopt, sys, os\n\nimport boto\nfrom boto.exception import S3ResponseError\n\nfrom boto.s3.connection import S3Connection\nfrom filechunkio import FileChunkIO\n\nusage_string = \"\"\"\nSYNOPSIS\n    s3put [-a/--access_key <access_key>] [-s/--secret_key <secret_key>]\n          -b/--bucket <bucket_name> [-c/--callback <num_cb>]\n          [-d/--debug <debug_level>] [-i/--ignore <ignore_dirs>]\n          [-n/--no_op] [-p/--prefix <prefix>] [-q/--quiet]\n          [-g/--grant grant] [-w/--no_overwrite] [-r/--reduced] path\n\n    Where\n        access_key - Your AWS Access Key ID.  If not supplied, boto will\n                     use the value of the environment variable\n                     AWS_ACCESS_KEY_ID\n        secret_key - Your AWS Secret Access Key.  If not supplied, boto\n                     will use the value of the environment variable\n                     AWS_SECRET_ACCESS_KEY\n        bucket_name - The name of the S3 bucket the file(s) should be\n                      copied to.\n        path - A path to a directory or file that represents the items\n               to be uploaded.  If the path points to an individual file,\n               that file will be uploaded to the specified bucket.  If the\n               path points to a directory, s3_it will recursively traverse\n               the directory and upload all files to the specified bucket.\n        debug_level - 0 means no debug output (default), 1 means normal\n                      debug output from boto, and 2 means boto debug output\n                      plus request/response output from httplib\n        ignore_dirs - a comma-separated list of directory names that will\n                      be ignored and not uploaded to S3.\n        num_cb - The number of progress callbacks to display.  The default\n                 is zero which means no callbacks.  If you supplied a value\n                 of \"-c 10\" for example, the progress callback would be\n                 called 10 times for each file transferred.\n        prefix - A file path prefix that will be stripped from the full\n                 path of the file when determining the key name in S3.\n                 For example, if the full path of a file is:\n                     /home/foo/bar/fie.baz\n                 and the prefix is specified as \"-p /home/foo/\" the\n                 resulting key name in S3 will be:\n                     /bar/fie.baz\n                 The prefix must end in a trailing separator and if it\n                 does not then one will be added.\n        reduced - Use Reduced Redundancy storage\n        grant - A canned ACL policy that will be granted on each file\n                transferred to S3.  The value of provided must be one\n                of the \"canned\" ACL policies supported by S3:\n                private|public-read|public-read-write|authenticated-read\n        no_overwrite - No files will be overwritten on S3, if the file/key\n                       exists on s3 it will be kept. This is useful for\n                       resuming interrupted transfers. Note this is not a\n                       sync, even if the file has been updated locally if\n                       the key exists on s3 the file on s3 will not be\n                       updated.\n\n     If the -n option is provided, no files will be transferred to S3 but\n     informational messages will be printed about what would happen.\n\"\"\"\ndef usage():\n    print usage_string\n    sys.exit()\n\ndef submit_cb(bytes_so_far, total_bytes):\n    print '%d bytes transferred / %d bytes total' % (bytes_so_far, total_bytes)\n\ndef get_key_name(fullpath, prefix):\n    key_name = fullpath[len(prefix):]\n    l = key_name.split(os.sep)\n    return '/'.join(l)\n\ndef _upload_part(bucketname, aws_key, aws_secret, multipart_id, part_num,\n    source_path, offset, bytes, debug, cb, num_cb, amount_of_retries=10):\n    if debug == 1:\n        print \"_upload_part(%s, %s, %s)\" % (source_path, offset, bytes)\n    \"\"\"\n    Uploads a part with retries.\n    \"\"\"\n    def _upload(retries_left=amount_of_retries):\n        try:\n            if debug == 1:\n                print 'Start uploading part #%d ...' % part_num\n            conn = S3Connection(aws_key, aws_secret)\n            conn.debug = debug\n            bucket = conn.get_bucket(bucketname)\n            for mp in bucket.get_all_multipart_uploads():\n                if mp.id == multipart_id:\n                    with FileChunkIO(source_path, 'r', offset=offset,\n                        bytes=bytes) as fp:\n                        mp.upload_part_from_file(fp=fp, part_num=part_num, cb=cb, num_cb=num_cb)\n                    break\n        except Exception, exc:\n            if retries_left:\n                _upload(retries_left=retries_left - 1)\n            else:\n                print 'Failed uploading part #%d' % part_num\n                raise exc\n        else:\n            if debug == 1:\n                print '... Uploaded part #%d' % part_num\n\n    _upload()\n\ndef upload(bucketname, aws_key, aws_secret, source_path, keyname,\n    reduced, debug, cb, num_cb,\n    acl='private', headers={}, guess_mimetype=True, parallel_processes=4):\n    \"\"\"\n    Parallel multipart upload.\n    \"\"\"\n    conn = S3Connection(aws_key, aws_secret)\n    conn.debug = debug\n    bucket = conn.get_bucket(bucketname)\n\n    if guess_mimetype:\n        mtype = mimetypes.guess_type(keyname)[0] or 'application/octet-stream'\n        headers.update({'Content-Type': mtype})\n\n    mp = bucket.initiate_multipart_upload(keyname, headers=headers, reduced_redundancy=reduced)\n\n    source_size = os.stat(source_path).st_size\n    bytes_per_chunk = max(int(math.sqrt(5242880) * math.sqrt(source_size)),\n        5242880)\n    chunk_amount = int(math.ceil(source_size / float(bytes_per_chunk)))\n\n    pool = Pool(processes=parallel_processes)\n    for i in range(chunk_amount):\n        offset = i * bytes_per_chunk\n        remaining_bytes = source_size - offset\n        bytes = min([bytes_per_chunk, remaining_bytes])\n        part_num = i + 1\n        pool.apply_async(_upload_part, [bucketname, aws_key, aws_secret, mp.id,\n            part_num, source_path, offset, bytes, debug, cb, num_cb])\n    pool.close()\n    pool.join()\n\n    if len(mp.get_all_parts()) == chunk_amount:\n        mp.complete_upload()\n        key = bucket.get_key(keyname)\n        key.set_acl(acl)\n    else:\n        mp.cancel_upload()\n\n\ndef main():\n\n    # default values\n    aws_access_key_id     = None\n    aws_secret_access_key = None\n    bucket_name = ''\n    ignore_dirs = []\n    total  = 0\n    debug  = 0\n    cb     = None\n    num_cb = 0\n    quiet  = False\n    no_op  = False\n    prefix = '/'\n    grant  = None\n    no_overwrite = False\n    reduced = False\n\n    try:\n        opts, args = getopt.getopt(sys.argv[1:], 'a:b:c::d:g:hi:np:qs:wr',\n                                   ['access_key', 'bucket', 'callback', 'debug', 'help', 'grant',\n                                    'ignore', 'no_op', 'prefix', 'quiet', 'secret_key', 'no_overwrite',\n                                    'reduced'])\n    except:\n        usage()\n\n    # parse opts\n    for o, a in opts:\n        if o in ('-h', '--help'):\n            usage()\n        if o in ('-a', '--access_key'):\n            aws_access_key_id = a\n        if o in ('-b', '--bucket'):\n            bucket_name = a\n        if o in ('-c', '--callback'):\n            num_cb = int(a)\n            cb = submit_cb\n        if o in ('-d', '--debug'):\n            debug = int(a)\n        if o in ('-g', '--grant'):\n            grant = a\n        if o in ('-i', '--ignore'):\n            ignore_dirs = a.split(',')\n        if o in ('-n', '--no_op'):\n            no_op = True\n        if o in ('w', '--no_overwrite'):\n            no_overwrite = True\n        if o in ('-p', '--prefix'):\n            prefix = a\n            if prefix[-1] != os.sep:\n                prefix = prefix + os.sep\n        if o in ('-q', '--quiet'):\n            quiet = True\n        if o in ('-s', '--secret_key'):\n            aws_secret_access_key = a\n        if o in ('-r', '--reduced'):\n            reduced = True\n\n    if len(args) != 1:\n        usage()\n\n\n    path = os.path.expanduser(args[0])\n    path = os.path.expandvars(path)\n    path = os.path.abspath(path)\n\n    if not bucket_name:\n        print \"bucket name is required!\"\n        usage()\n\n    c = boto.connect_s3(aws_access_key_id=aws_access_key_id,\n                        aws_secret_access_key=aws_secret_access_key)\n    c.debug = debug\n    b = c.get_bucket(bucket_name)\n\n    # upload a directory of files recursively\n    if os.path.isdir(path):\n        if no_overwrite:\n            if not quiet:\n                print 'Getting list of existing keys to check against'\n            keys = []\n            for key in b.list():\n                keys.append(key.name)\n        for root, dirs, files in os.walk(path):\n            for ignore in ignore_dirs:\n                if ignore in dirs:\n                    dirs.remove(ignore)\n            for file in files:\n                fullpath = os.path.join(root, file)\n                key_name = get_key_name(fullpath, prefix)\n                copy_file = True\n                if no_overwrite:\n                    if key_name in keys:\n                        copy_file = False\n                        if not quiet:\n                            print 'Skipping %s as it exists in s3' % file\n\n                if copy_file:\n                    if not quiet:\n                        print 'Copying %s to %s/%s' % (file, bucket_name, key_name)\n\n                    if not no_op:\n                        if os.stat(fullpath).st_size == 0:\n                            # 0-byte files don't work and also don't need multipart upload\n                            k = b.new_key(key_name)\n                            k.set_contents_from_filename(fullpath, cb=cb, num_cb=num_cb,\n                                                         policy=grant, reduced_redundancy=reduced)\n                        else:\n                            upload(bucket_name, aws_access_key_id,\n                                   aws_secret_access_key, fullpath, key_name,\n                                   reduced, debug, cb, num_cb)\n                total += 1\n\n    # upload a single file\n    elif os.path.isfile(path):\n        key_name = get_key_name(os.path.abspath(path), prefix)\n        copy_file = True\n        if no_overwrite:\n            if b.get_key(key_name):\n                copy_file = False\n                if not quiet:\n                    print 'Skipping %s as it exists in s3' % path\n\n        if copy_file:\n            if not quiet:\n                print 'Copying %s to %s/%s' % (path, bucket_name, key_name)\n\n            if not no_op:\n                if os.stat(path).st_size == 0:\n                    # 0-byte files don't work and also don't need multipart upload\n                    k = b.new_key(key_name)\n                    k.set_contents_from_filename(path, cb=cb, num_cb=num_cb, policy=grant,\n                                                 reduced_redundancy=reduced)\n                else:\n                    upload(bucket_name, aws_access_key_id,\n                           aws_secret_access_key, path, key_name,\n                           reduced, debug, cb, num_cb)\n\nif __name__ == \"__main__\":\n    main()\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/bin/s3put",
    "content": "#!/usr/bin/env python\n# Copyright (c) 2006,2007,2008 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n#\nimport getopt, sys, os\nimport boto\nfrom boto.exception import S3ResponseError\n\nusage_string = \"\"\"\nSYNOPSIS\n    s3put [-a/--access_key <access_key>] [-s/--secret_key <secret_key>]\n          -b/--bucket <bucket_name> [-c/--callback <num_cb>]\n          [-d/--debug <debug_level>] [-i/--ignore <ignore_dirs>]\n          [-n/--no_op] [-p/--prefix <prefix>] [-q/--quiet]\n          [-g/--grant grant] [-w/--no_overwrite] [-r/--reduced] path\n\n    Where\n        access_key - Your AWS Access Key ID.  If not supplied, boto will\n                     use the value of the environment variable\n                     AWS_ACCESS_KEY_ID\n        secret_key - Your AWS Secret Access Key.  If not supplied, boto\n                     will use the value of the environment variable\n                     AWS_SECRET_ACCESS_KEY\n        bucket_name - The name of the S3 bucket the file(s) should be\n                      copied to.\n        path - A path to a directory or file that represents the items\n               to be uploaded.  If the path points to an individual file,\n               that file will be uploaded to the specified bucket.  If the\n               path points to a directory, s3_it will recursively traverse\n               the directory and upload all files to the specified bucket.\n        debug_level - 0 means no debug output (default), 1 means normal\n                      debug output from boto, and 2 means boto debug output\n                      plus request/response output from httplib\n        ignore_dirs - a comma-separated list of directory names that will\n                      be ignored and not uploaded to S3.\n        num_cb - The number of progress callbacks to display.  The default\n                 is zero which means no callbacks.  If you supplied a value\n                 of \"-c 10\" for example, the progress callback would be\n                 called 10 times for each file transferred.\n        prefix - A file path prefix that will be stripped from the full\n                 path of the file when determining the key name in S3.\n                 For example, if the full path of a file is:\n                     /home/foo/bar/fie.baz\n                 and the prefix is specified as \"-p /home/foo/\" the\n                 resulting key name in S3 will be:\n                     /bar/fie.baz\n                 The prefix must end in a trailing separator and if it\n                 does not then one will be added.\n        grant - A canned ACL policy that will be granted on each file\n                transferred to S3.  The value of provided must be one\n                of the \"canned\" ACL policies supported by S3:\n                private|public-read|public-read-write|authenticated-read\n        no_overwrite - No files will be overwritten on S3, if the file/key \n                       exists on s3 it will be kept. This is useful for \n                       resuming interrupted transfers. Note this is not a \n                       sync, even if the file has been updated locally if \n                       the key exists on s3 the file on s3 will not be \n                       updated.\n        reduced - Use Reduced Redundancy storage\n\n\n     If the -n option is provided, no files will be transferred to S3 but\n     informational messages will be printed about what would happen.\n\"\"\"\ndef usage():\n    print usage_string\n    sys.exit()\n  \ndef submit_cb(bytes_so_far, total_bytes):\n    print '%d bytes transferred / %d bytes total' % (bytes_so_far, total_bytes)\n\ndef get_key_name(fullpath, prefix):\n    key_name = fullpath[len(prefix):]\n    l = key_name.split(os.sep)\n    return '/'.join(l)\n\ndef main():\n    try:\n        opts, args = getopt.getopt(\n                sys.argv[1:], 'a:b:c::d:g:hi:np:qs:vwr',\n                ['access_key', 'bucket', 'callback', 'debug', 'help', 'grant',\n                 'ignore', 'no_op', 'prefix', 'quiet', 'secret_key',\n                 'no_overwrite', 'reduced']\n                )\n    except:\n        usage()\n    ignore_dirs = []\n    aws_access_key_id = None\n    aws_secret_access_key = None\n    bucket_name = ''\n    total = 0\n    debug = 0\n    cb = None\n    num_cb = 0\n    quiet = False\n    no_op = False\n    prefix = '/'\n    grant = None\n    no_overwrite = False\n    reduced = False\n    for o, a in opts:\n        if o in ('-h', '--help'):\n            usage()\n            sys.exit()\n        if o in ('-a', '--access_key'):\n            aws_access_key_id = a\n        if o in ('-b', '--bucket'):\n            bucket_name = a\n        if o in ('-c', '--callback'):\n            num_cb = int(a)\n            cb = submit_cb\n        if o in ('-d', '--debug'):\n            debug = int(a)\n        if o in ('-g', '--grant'):\n            grant = a\n        if o in ('-i', '--ignore'):\n            ignore_dirs = a.split(',')\n        if o in ('-n', '--no_op'):\n            no_op = True\n        if o in ('-w', '--no_overwrite'):\n            no_overwrite = True\n        if o in ('-r', '--reduced'):\n            reduced = True\n        if o in ('-p', '--prefix'):\n            prefix = a\n            if prefix[-1] != os.sep:\n                prefix = prefix + os.sep\n        if o in ('-q', '--quiet'):\n            quiet = True\n        if o in ('-s', '--secret_key'):\n            aws_secret_access_key = a\n    if len(args) != 1:\n        print usage()\n    path = os.path.expanduser(args[0])\n    path = os.path.expandvars(path)\n    path = os.path.abspath(path)\n    if bucket_name:\n        c = boto.connect_s3(aws_access_key_id=aws_access_key_id,\n                            aws_secret_access_key=aws_secret_access_key)\n        c.debug = debug\n        b = c.get_bucket(bucket_name)\n        if os.path.isdir(path):\n            if no_overwrite:\n                if not quiet:\n                    print 'Getting list of existing keys to check against'\n                keys = []\n                for key in b.list():\n                    keys.append(key.name)\n            for root, dirs, files in os.walk(path):\n                for ignore in ignore_dirs:\n                    if ignore in dirs:\n                        dirs.remove(ignore)\n                for file in files:\n                    fullpath = os.path.join(root, file)\n                    key_name = get_key_name(fullpath, prefix)\n                    copy_file = True\n                    if no_overwrite:\n                        if key_name in keys:\n                            copy_file = False\n                            if not quiet:\n                                print 'Skipping %s as it exists in s3' % file\n                    if copy_file:\n                        if not quiet:\n                            print 'Copying %s to %s/%s' % (file, bucket_name, key_name)\n                        if not no_op:\n                            k = b.new_key(key_name)\n                            k.set_contents_from_filename(\n                                    fullpath, cb=cb, num_cb=num_cb,\n                                    policy=grant, reduced_redundancy=reduced,\n                                    )\n                    total += 1\n        elif os.path.isfile(path):\n            key_name = os.path.split(path)[1]\n            copy_file = True\n            if no_overwrite:\n                if b.get_key(key_name):\n                    copy_file = False\n                    if not quiet:\n                        print 'Skipping %s as it exists in s3' % path\n            if copy_file:\n                k = b.new_key(key_name)\n                k.set_contents_from_filename(path, cb=cb, num_cb=num_cb,\n                                             policy=grant,\n                                             reduced_redundancy=reduced)\n    else:\n        print usage()\n\nif __name__ == \"__main__\":\n    main()\n\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/bin/sdbadmin",
    "content": "#!/usr/bin/env python\n# Copyright (c) 2009 Chris Moyer http://kopertop.blogspot.com/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n\n#\n# Tools to dump and recover an SDB domain\n#\nVERSION = \"%prog version 1.0\"\nimport boto\nimport time\nfrom boto import sdb\n\ndef choice_input(options, default=None, title=None):\n    \"\"\"\n    Choice input\n    \"\"\"\n    if title == None:\n        title = \"Please choose\"\n    print title\n    objects = []\n    for n, obj in enumerate(options):\n        print \"%s: %s\" % (n, obj)\n        objects.append(obj)\n    choice = int(raw_input(\">>> \"))\n    try:\n        choice = objects[choice]\n    except:\n        choice = default\n    return choice\n\ndef confirm(message=\"Are you sure?\"):\n    choice = raw_input(\"%s [yN] \" % message)\n    return choice and len(choice) > 0 and choice[0].lower() == \"y\"\n\n\ndef dump_db(domain, file_name):\n    \"\"\"\n    Dump SDB domain to file\n    \"\"\"\n    doc = domain.to_xml(open(file_name, \"w\"))\n\ndef empty_db(domain):\n    \"\"\"\n    Remove all entries from domain\n    \"\"\"\n    for item in domain:\n        item.delete()\n\ndef load_db(domain, file):\n    \"\"\"\n    Load a domain from a file, this doesn't overwrite any existing\n    data in the file so if you want to do a full recovery and restore\n    you need to call empty_db before calling this\n\n    :param domain: The SDB Domain object to load to\n    :param file: The File to load the DB from\n    \"\"\"\n    domain.from_xml(file)\n\ndef create_db(domain_name, region_name):\n    \"\"\"Create a new DB\n\n    :param domain: Name of the domain to create\n    :type domain: str\n    \"\"\"\n    sdb = boto.sdb.connect_to_region(region_name)\n    return sdb.create_domain(domain_name)\n\nif __name__ == \"__main__\":\n    from optparse import OptionParser\n    parser = OptionParser(version=VERSION, usage=\"Usage: %prog [--dump|--load|--empty|--list|-l] [options]\")\n\n    # Commands\n    parser.add_option(\"--dump\", help=\"Dump domain to file\", dest=\"dump\", default=False, action=\"store_true\")\n    parser.add_option(\"--load\", help=\"Load domain contents from file\", dest=\"load\", default=False, action=\"store_true\")\n    parser.add_option(\"--empty\", help=\"Empty all contents of domain\", dest=\"empty\", default=False, action=\"store_true\")\n    parser.add_option(\"-l\", \"--list\", help=\"List All domains\", dest=\"list\", default=False, action=\"store_true\")\n    parser.add_option(\"-c\", \"--create\", help=\"Create domain\", dest=\"create\", default=False, action=\"store_true\")\n\n    parser.add_option(\"-a\", \"--all-domains\", help=\"Operate on all domains\", action=\"store_true\", default=False, dest=\"all_domains\")\n    parser.add_option(\"-d\", \"--domain\", help=\"Do functions on domain (may be more then one)\", action=\"append\", dest=\"domains\")\n    parser.add_option(\"-f\", \"--file\", help=\"Input/Output file we're operating on\", dest=\"file_name\")\n    parser.add_option(\"-r\", \"--region\", help=\"Region (e.g. us-east-1[default] or eu-west-1)\", default=\"us-east-1\", dest=\"region_name\")\n    (options, args) = parser.parse_args()\n\n    if options.create:\n        for domain_name in options.domains:\n            create_db(domain_name, options.region_name)\n        exit()\n\n    sdb = boto.sdb.connect_to_region(options.region_name)\n    if options.list:\n        for db in sdb.get_all_domains():\n            print db\n        exit()\n\n    if not options.dump and not options.load and not options.empty:\n            parser.print_help()\n            exit()\n\n\n\n\n    #\n    # Setup\n    #\n    if options.domains:\n        domains = []\n        for domain_name in options.domains:\n            domains.append(sdb.get_domain(domain_name))\n    elif options.all_domains:\n        domains = sdb.get_all_domains()\n    else:\n        domains = [choice_input(options=sdb.get_all_domains(), title=\"No domain specified, please choose one\")]\n\n\n    #\n    # Execute the commands\n    #\n    stime = time.time()\n    if options.empty:\n        if confirm(\"WARNING!!! Are you sure you want to empty the following domains?: %s\" % domains):\n            stime = time.time()\n            for domain in domains:\n                print \"--------> Emptying %s <--------\" % domain.name\n                empty_db(domain)\n        else:\n            print \"Canceling operations\"\n            exit()\n\n    if options.dump:\n        for domain in domains:\n            print \"--------> Dumping %s <---------\" % domain.name\n            if options.file_name:\n                file_name = options.file_name\n            else:\n                file_name = \"%s.db\" % domain.name\n            dump_db(domain, file_name)\n\n    if options.load:\n        for domain in domains:\n            print \"---------> Loading %s <----------\" % domain.name\n            if options.file_name:\n                file_name = options.file_name\n            else:\n                file_name = \"%s.db\" % domain.name\n            load_db(domain, open(file_name, \"rb\"))\n\n\n    total_time = round(time.time() - stime, 2)\n    print \"--------> Finished in %s <--------\" % total_time\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/bin/taskadmin",
    "content": "#!/usr/bin/env python\n# Copyright (c) 2009 Chris Moyer http://coredumped.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n\n#\n# Task/Job Administration utility\n#\nVERSION=\"0.1\"\n__version__ = VERSION\nusage = \"\"\"%prog [options] [command]\nCommands:\n    list|ls                                List all Tasks in SDB\n    delete      <id>                       Delete Task with id <id>\n    get         <name>                     Get Task <name>\n    create|mk   <name> <hour> <command>    Create a new Task <name> with command <command> running every <hour>\n\"\"\"\n\ndef list():\n    \"\"\"List all Tasks in SDB\"\"\"\n    from boto.manage.task import Task\n    print \"%-8s %-40s %s\" %  (\"Hour\", \"Name\", \"Command\")\n    print \"-\"*100\n    for t in Task.all():\n        print \"%-8s %-40s %s\" % (t.hour, t.name, t.command)\n\ndef get(name):\n    \"\"\"Get a task\n    :param name: The name of the task to fetch\n    :type name: str\n    \"\"\"\n    from boto.manage.task import Task\n    q = Task.find()\n    q.filter(\"name like\", \"%s%%\" % name)\n    for t in q:\n        print \"=\"*80\n        print \"|               \", t.id\n        print \"|%s\" %  (\"-\"*79)\n        print \"| Name:         \", t.name\n        print \"| Hour:         \", t.hour\n        print \"| Command:      \", t.command\n        if t.last_executed:\n            print \"| Last Run:     \", t.last_executed.ctime()\n            print \"| Last Status:  \", t.last_status\n            print \"| Last Run Log: \", t.last_output\n        print \"=\"*80\n\ndef delete(id):\n    from boto.manage.task import Task\n    t = Task.get_by_id(id)\n    print \"Deleting task: %s\" % t.name\n    if raw_input(\"Are you sure? \").lower() in [\"y\", \"yes\"]:\n        t.delete()\n        print \"Deleted\"\n    else:\n        print \"Canceled\"\n\ndef create(name, hour, command):\n    \"\"\"Create a new task\n    :param name: Name of the task to create\n    :type name: str\n    :param hour: What hour to run it at, \"*\" for every hour\n    :type hour: str\n    :param command: The command to execute\n    :type command: str\n    \"\"\"\n    from boto.manage.task import Task\n    t = Task()\n    t.name = name\n    t.hour = hour\n    t.command = command\n    t.put()\n    print \"Created task: %s\" % t.id\n\nif __name__ == \"__main__\":\n    try:\n        import readline\n    except ImportError:\n        pass\n    import boto\n    import sys\n    from optparse import OptionParser\n    from boto.mashups.iobject import IObject\n    parser = OptionParser(version=__version__, usage=usage)\n\n    (options, args) = parser.parse_args()\n\n    if len(args) < 1:\n        parser.print_help()\n        sys.exit(1)\n\n    command = args[0].lower()\n    if command in (\"ls\", \"list\"):\n        list()\n    elif command == \"get\":\n        get(args[1])\n    elif command == \"create\":\n        create(args[1], args[2], args[3])\n    elif command == \"delete\":\n        delete(args[1])\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/__init__.py",
    "content": "# Copyright (c) 2006-2011 Mitch Garnaat http://garnaat.org/\n# Copyright (c) 2010-2011, Eucalyptus Systems, Inc.\n# Copyright (c) 2011, Nexenta Systems Inc.\n# All rights reserved.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n#\nfrom boto.pyami.config import Config, BotoConfigLocations\nfrom boto.storage_uri import BucketStorageUri, FileStorageUri\nimport boto.plugin\nimport os, re, sys\nimport logging\nimport logging.config\nfrom boto.exception import InvalidUriError\n\n__version__ = '2.1.1'\nVersion = __version__ # for backware compatibility\n\nUserAgent = 'Boto/%s (%s)' % (__version__, sys.platform)\nconfig = Config()\n\ndef init_logging():\n    for file in BotoConfigLocations:\n        try:\n            logging.config.fileConfig(os.path.expanduser(file))\n        except:\n            pass\n\nclass NullHandler(logging.Handler):\n    def emit(self, record):\n        pass\n\nlog = logging.getLogger('boto')\nlog.addHandler(NullHandler())\ninit_logging()\n\n# convenience function to set logging to a particular file\ndef set_file_logger(name, filepath, level=logging.INFO, format_string=None):\n    global log\n    if not format_string:\n        format_string = \"%(asctime)s %(name)s [%(levelname)s]:%(message)s\"\n    logger = logging.getLogger(name)\n    logger.setLevel(level)\n    fh = logging.FileHandler(filepath)\n    fh.setLevel(level)\n    formatter = logging.Formatter(format_string)\n    fh.setFormatter(formatter)\n    logger.addHandler(fh)\n    log = logger\n\ndef set_stream_logger(name, level=logging.DEBUG, format_string=None):\n    global log\n    if not format_string:\n        format_string = \"%(asctime)s %(name)s [%(levelname)s]:%(message)s\"\n    logger = logging.getLogger(name)\n    logger.setLevel(level)\n    fh = logging.StreamHandler()\n    fh.setLevel(level)\n    formatter = logging.Formatter(format_string)\n    fh.setFormatter(formatter)\n    logger.addHandler(fh)\n    log = logger\n\ndef connect_sqs(aws_access_key_id=None, aws_secret_access_key=None, **kwargs):\n    \"\"\"\n    :type aws_access_key_id: string\n    :param aws_access_key_id: Your AWS Access Key ID\n\n    :type aws_secret_access_key: string\n    :param aws_secret_access_key: Your AWS Secret Access Key\n\n    :rtype: :class:`boto.sqs.connection.SQSConnection`\n    :return: A connection to Amazon's SQS\n    \"\"\"\n    from boto.sqs.connection import SQSConnection\n    return SQSConnection(aws_access_key_id, aws_secret_access_key, **kwargs)\n\ndef connect_s3(aws_access_key_id=None, aws_secret_access_key=None, **kwargs):\n    \"\"\"\n    :type aws_access_key_id: string\n    :param aws_access_key_id: Your AWS Access Key ID\n\n    :type aws_secret_access_key: string\n    :param aws_secret_access_key: Your AWS Secret Access Key\n\n    :rtype: :class:`boto.s3.connection.S3Connection`\n    :return: A connection to Amazon's S3\n    \"\"\"\n    from boto.s3.connection import S3Connection\n    return S3Connection(aws_access_key_id, aws_secret_access_key, **kwargs)\n\ndef connect_gs(gs_access_key_id=None, gs_secret_access_key=None, **kwargs):\n    \"\"\"\n    @type gs_access_key_id: string\n    @param gs_access_key_id: Your Google Cloud Storage Access Key ID\n\n    @type gs_secret_access_key: string\n    @param gs_secret_access_key: Your Google Cloud Storage Secret Access Key\n\n    @rtype: L{GSConnection<boto.gs.connection.GSConnection>}\n    @return: A connection to Google's Storage service\n    \"\"\"\n    from boto.gs.connection import GSConnection\n    return GSConnection(gs_access_key_id, gs_secret_access_key, **kwargs)\n\ndef connect_ec2(aws_access_key_id=None, aws_secret_access_key=None, **kwargs):\n    \"\"\"\n    :type aws_access_key_id: string\n    :param aws_access_key_id: Your AWS Access Key ID\n\n    :type aws_secret_access_key: string\n    :param aws_secret_access_key: Your AWS Secret Access Key\n\n    :rtype: :class:`boto.ec2.connection.EC2Connection`\n    :return: A connection to Amazon's EC2\n    \"\"\"\n    from boto.ec2.connection import EC2Connection\n    return EC2Connection(aws_access_key_id, aws_secret_access_key, **kwargs)\n\ndef connect_elb(aws_access_key_id=None, aws_secret_access_key=None, **kwargs):\n    \"\"\"\n    :type aws_access_key_id: string\n    :param aws_access_key_id: Your AWS Access Key ID\n\n    :type aws_secret_access_key: string\n    :param aws_secret_access_key: Your AWS Secret Access Key\n\n    :rtype: :class:`boto.ec2.elb.ELBConnection`\n    :return: A connection to Amazon's Load Balancing Service\n    \"\"\"\n    from boto.ec2.elb import ELBConnection\n    return ELBConnection(aws_access_key_id, aws_secret_access_key, **kwargs)\n\ndef connect_autoscale(aws_access_key_id=None, aws_secret_access_key=None, **kwargs):\n    \"\"\"\n    :type aws_access_key_id: string\n    :param aws_access_key_id: Your AWS Access Key ID\n\n    :type aws_secret_access_key: string\n    :param aws_secret_access_key: Your AWS Secret Access Key\n\n    :rtype: :class:`boto.ec2.autoscale.AutoScaleConnection`\n    :return: A connection to Amazon's Auto Scaling Service\n    \"\"\"\n    from boto.ec2.autoscale import AutoScaleConnection\n    return AutoScaleConnection(aws_access_key_id, aws_secret_access_key, **kwargs)\n\ndef connect_cloudwatch(aws_access_key_id=None, aws_secret_access_key=None, **kwargs):\n    \"\"\"\n    :type aws_access_key_id: string\n    :param aws_access_key_id: Your AWS Access Key ID\n\n    :type aws_secret_access_key: string\n    :param aws_secret_access_key: Your AWS Secret Access Key\n\n    :rtype: :class:`boto.ec2.cloudwatch.CloudWatchConnection`\n    :return: A connection to Amazon's EC2 Monitoring service\n    \"\"\"\n    from boto.ec2.cloudwatch import CloudWatchConnection\n    return CloudWatchConnection(aws_access_key_id, aws_secret_access_key, **kwargs)\n\ndef connect_sdb(aws_access_key_id=None, aws_secret_access_key=None, **kwargs):\n    \"\"\"\n    :type aws_access_key_id: string\n    :param aws_access_key_id: Your AWS Access Key ID\n\n    :type aws_secret_access_key: string\n    :param aws_secret_access_key: Your AWS Secret Access Key\n\n    :rtype: :class:`boto.sdb.connection.SDBConnection`\n    :return: A connection to Amazon's SDB\n    \"\"\"\n    from boto.sdb.connection import SDBConnection\n    return SDBConnection(aws_access_key_id, aws_secret_access_key, **kwargs)\n\ndef connect_fps(aws_access_key_id=None, aws_secret_access_key=None, **kwargs):\n    \"\"\"\n    :type aws_access_key_id: string\n    :param aws_access_key_id: Your AWS Access Key ID\n\n    :type aws_secret_access_key: string\n    :param aws_secret_access_key: Your AWS Secret Access Key\n\n    :rtype: :class:`boto.fps.connection.FPSConnection`\n    :return: A connection to FPS\n    \"\"\"\n    from boto.fps.connection import FPSConnection\n    return FPSConnection(aws_access_key_id, aws_secret_access_key, **kwargs)\n\ndef connect_mturk(aws_access_key_id=None, aws_secret_access_key=None, **kwargs):\n    \"\"\"\n    :type aws_access_key_id: string\n    :param aws_access_key_id: Your AWS Access Key ID\n\n    :type aws_secret_access_key: string\n    :param aws_secret_access_key: Your AWS Secret Access Key\n\n    :rtype: :class:`boto.mturk.connection.MTurkConnection`\n    :return: A connection to MTurk\n    \"\"\"\n    from boto.mturk.connection import MTurkConnection\n    return MTurkConnection(aws_access_key_id, aws_secret_access_key, **kwargs)\n\ndef connect_cloudfront(aws_access_key_id=None, aws_secret_access_key=None, **kwargs):\n    \"\"\"\n    :type aws_access_key_id: string\n    :param aws_access_key_id: Your AWS Access Key ID\n\n    :type aws_secret_access_key: string\n    :param aws_secret_access_key: Your AWS Secret Access Key\n\n    :rtype: :class:`boto.fps.connection.FPSConnection`\n    :return: A connection to FPS\n    \"\"\"\n    from boto.cloudfront import CloudFrontConnection\n    return CloudFrontConnection(aws_access_key_id, aws_secret_access_key, **kwargs)\n\ndef connect_vpc(aws_access_key_id=None, aws_secret_access_key=None, **kwargs):\n    \"\"\"\n    :type aws_access_key_id: string\n    :param aws_access_key_id: Your AWS Access Key ID\n\n    :type aws_secret_access_key: string\n    :param aws_secret_access_key: Your AWS Secret Access Key\n\n    :rtype: :class:`boto.vpc.VPCConnection`\n    :return: A connection to VPC\n    \"\"\"\n    from boto.vpc import VPCConnection\n    return VPCConnection(aws_access_key_id, aws_secret_access_key, **kwargs)\n\ndef connect_rds(aws_access_key_id=None, aws_secret_access_key=None, **kwargs):\n    \"\"\"\n    :type aws_access_key_id: string\n    :param aws_access_key_id: Your AWS Access Key ID\n\n    :type aws_secret_access_key: string\n    :param aws_secret_access_key: Your AWS Secret Access Key\n\n    :rtype: :class:`boto.rds.RDSConnection`\n    :return: A connection to RDS\n    \"\"\"\n    from boto.rds import RDSConnection\n    return RDSConnection(aws_access_key_id, aws_secret_access_key, **kwargs)\n\ndef connect_emr(aws_access_key_id=None, aws_secret_access_key=None, **kwargs):\n    \"\"\"\n    :type aws_access_key_id: string\n    :param aws_access_key_id: Your AWS Access Key ID\n\n    :type aws_secret_access_key: string\n    :param aws_secret_access_key: Your AWS Secret Access Key\n\n    :rtype: :class:`boto.emr.EmrConnection`\n    :return: A connection to Elastic mapreduce\n    \"\"\"\n    from boto.emr import EmrConnection\n    return EmrConnection(aws_access_key_id, aws_secret_access_key, **kwargs)\n\ndef connect_sns(aws_access_key_id=None, aws_secret_access_key=None, **kwargs):\n    \"\"\"\n    :type aws_access_key_id: string\n    :param aws_access_key_id: Your AWS Access Key ID\n\n    :type aws_secret_access_key: string\n    :param aws_secret_access_key: Your AWS Secret Access Key\n\n    :rtype: :class:`boto.sns.SNSConnection`\n    :return: A connection to Amazon's SNS\n    \"\"\"\n    from boto.sns import SNSConnection\n    return SNSConnection(aws_access_key_id, aws_secret_access_key, **kwargs)\n\n\ndef connect_iam(aws_access_key_id=None, aws_secret_access_key=None, **kwargs):\n    \"\"\"\n    :type aws_access_key_id: string\n    :param aws_access_key_id: Your AWS Access Key ID\n\n    :type aws_secret_access_key: string\n    :param aws_secret_access_key: Your AWS Secret Access Key\n\n    :rtype: :class:`boto.iam.IAMConnection`\n    :return: A connection to Amazon's IAM\n    \"\"\"\n    from boto.iam import IAMConnection\n    return IAMConnection(aws_access_key_id, aws_secret_access_key, **kwargs)\n\ndef connect_route53(aws_access_key_id=None, aws_secret_access_key=None, **kwargs):\n    \"\"\"\n    :type aws_access_key_id: string\n    :param aws_access_key_id: Your AWS Access Key ID\n\n    :type aws_secret_access_key: string\n    :param aws_secret_access_key: Your AWS Secret Access Key\n\n    :rtype: :class:`boto.dns.Route53Connection`\n    :return: A connection to Amazon's Route53 DNS Service\n    \"\"\"\n    from boto.route53 import Route53Connection\n    return Route53Connection(aws_access_key_id, aws_secret_access_key, **kwargs)\n\ndef connect_euca(host=None, aws_access_key_id=None, aws_secret_access_key=None,\n                 port=8773, path='/services/Eucalyptus', is_secure=False,\n                 **kwargs):\n    \"\"\"\n    Connect to a Eucalyptus service.\n\n    :type host: string\n    :param host: the host name or ip address of the Eucalyptus server\n\n    :type aws_access_key_id: string\n    :param aws_access_key_id: Your AWS Access Key ID\n\n    :type aws_secret_access_key: string\n    :param aws_secret_access_key: Your AWS Secret Access Key\n\n    :rtype: :class:`boto.ec2.connection.EC2Connection`\n    :return: A connection to Eucalyptus server\n    \"\"\"\n    from boto.ec2 import EC2Connection\n    from boto.ec2.regioninfo import RegionInfo\n\n    # Check for values in boto config, if not supplied as args\n    if not aws_access_key_id:\n        aws_access_key_id = config.get('Credentials',\n                                       'euca_access_key_id',\n                                       None)\n    if not aws_secret_access_key:\n        aws_secret_access_key = config.get('Credentials',\n                                           'euca_secret_access_key',\n                                           None)\n    if not host:\n        host = config.get('Boto', 'eucalyptus_host', None)\n\n    reg = RegionInfo(name='eucalyptus', endpoint=host)\n    return EC2Connection(aws_access_key_id, aws_secret_access_key,\n                         region=reg, port=port, path=path,\n                         is_secure=is_secure, **kwargs)\n\ndef connect_walrus(host=None, aws_access_key_id=None, aws_secret_access_key=None,\n                   port=8773, path='/services/Walrus', is_secure=False,\n                   **kwargs):\n    \"\"\"\n    Connect to a Walrus service.\n\n    :type host: string\n    :param host: the host name or ip address of the Walrus server\n\n    :type aws_access_key_id: string\n    :param aws_access_key_id: Your AWS Access Key ID\n\n    :type aws_secret_access_key: string\n    :param aws_secret_access_key: Your AWS Secret Access Key\n\n    :rtype: :class:`boto.s3.connection.S3Connection`\n    :return: A connection to Walrus\n    \"\"\"\n    from boto.s3.connection import S3Connection\n    from boto.s3.connection import OrdinaryCallingFormat\n\n    # Check for values in boto config, if not supplied as args\n    if not aws_access_key_id:\n        aws_access_key_id = config.get('Credentials',\n                                       'euca_access_key_id',\n                                       None)\n    if not aws_secret_access_key:\n        aws_secret_access_key = config.get('Credentials',\n                                           'euca_secret_access_key',\n                                           None)\n    if not host:\n        host = config.get('Boto', 'walrus_host', None)\n        \n    return S3Connection(aws_access_key_id, aws_secret_access_key,\n                        host=host, port=port, path=path,\n                        calling_format=OrdinaryCallingFormat(),\n                        is_secure=is_secure, **kwargs)\n\ndef connect_ses(aws_access_key_id=None, aws_secret_access_key=None, **kwargs):\n    \"\"\"\n    :type aws_access_key_id: string\n    :param aws_access_key_id: Your AWS Access Key ID\n\n    :type aws_secret_access_key: string\n    :param aws_secret_access_key: Your AWS Secret Access Key\n\n    :rtype: :class:`boto.ses.SESConnection`\n    :return: A connection to Amazon's SES\n    \"\"\"\n    from boto.ses import SESConnection\n    return SESConnection(aws_access_key_id, aws_secret_access_key, **kwargs)\n\ndef connect_sts(aws_access_key_id=None, aws_secret_access_key=None, **kwargs):\n    \"\"\"\n    :type aws_access_key_id: string\n    :param aws_access_key_id: Your AWS Access Key ID\n\n    :type aws_secret_access_key: string\n    :param aws_secret_access_key: Your AWS Secret Access Key\n\n    :rtype: :class:`boto.sts.STSConnection`\n    :return: A connection to Amazon's STS\n    \"\"\"\n    from boto.sts import STSConnection\n    return STSConnection(aws_access_key_id, aws_secret_access_key, **kwargs)\n\ndef connect_ia(ia_access_key_id=None, ia_secret_access_key=None,\n               is_secure=False, **kwargs):\n    \"\"\"\n    Connect to the Internet Archive via their S3-like API.\n\n    :type ia_access_key_id: string\n    :param ia_access_key_id: Your IA Access Key ID.  This will also look in your\n                             boto config file for an entry in the Credentials\n                             section called \"ia_access_key_id\"\n\n    :type ia_secret_access_key: string\n    :param ia_secret_access_key: Your IA Secret Access Key.  This will also\n                                 look in your boto config file for an entry\n                                 in the Credentials section called\n                                 \"ia_secret_access_key\"\n\n    :rtype: :class:`boto.s3.connection.S3Connection`\n    :return: A connection to the Internet Archive\n    \"\"\"\n    from boto.s3.connection import S3Connection\n    from boto.s3.connection import OrdinaryCallingFormat\n\n    access_key = config.get('Credentials', 'ia_access_key_id',\n                            ia_access_key_id)\n    secret_key = config.get('Credentials', 'ia_secret_access_key',\n                            ia_secret_access_key)\n\n    return S3Connection(access_key, secret_key,\n                        host='s3.us.archive.org',\n                        calling_format=OrdinaryCallingFormat(),\n                        is_secure=is_secure, **kwargs)\n\ndef check_extensions(module_name, module_path):\n    \"\"\"\n    This function checks for extensions to boto modules.  It should be called in the\n    __init__.py file of all boto modules.  See:\n    http://code.google.com/p/boto/wiki/ExtendModules\n\n    for details.\n    \"\"\"\n    option_name = '%s_extend' % module_name\n    version = config.get('Boto', option_name, None)\n    if version:\n        dirname = module_path[0]\n        path = os.path.join(dirname, version)\n        if os.path.isdir(path):\n            log.info('extending module %s with: %s' % (module_name, path))\n            module_path.insert(0, path)\n\n_aws_cache = {}\n\ndef _get_aws_conn(service):\n    global _aws_cache\n    conn = _aws_cache.get(service)\n    if not conn:\n        meth = getattr(sys.modules[__name__], 'connect_' + service)\n        conn = meth()\n        _aws_cache[service] = conn\n    return conn\n\ndef lookup(service, name):\n    global _aws_cache\n    conn = _get_aws_conn(service)\n    obj = _aws_cache.get('.'.join((service, name)), None)\n    if not obj:\n        obj = conn.lookup(name)\n        _aws_cache['.'.join((service, name))] = obj\n    return obj\n\ndef storage_uri(uri_str, default_scheme='file', debug=0, validate=True,\n                bucket_storage_uri_class=BucketStorageUri):\n    \"\"\"\n    Instantiate a StorageUri from a URI string.\n\n    :type uri_str: string\n    :param uri_str: URI naming bucket + optional object.\n    :type default_scheme: string\n    :param default_scheme: default scheme for scheme-less URIs.\n    :type debug: int\n    :param debug: debug level to pass in to boto connection (range 0..2).\n    :type validate: bool\n    :param validate: whether to check for bucket name validity.\n    :type bucket_storage_uri_class: BucketStorageUri interface.\n    :param bucket_storage_uri_class: Allows mocking for unit tests.\n\n    We allow validate to be disabled to allow caller\n    to implement bucket-level wildcarding (outside the boto library;\n    see gsutil).\n\n    :rtype: :class:`boto.StorageUri` subclass\n    :return: StorageUri subclass for given URI.\n\n    ``uri_str`` must be one of the following formats:\n\n    * gs://bucket/name\n    * s3://bucket/name\n    * gs://bucket\n    * s3://bucket\n    * filename\n\n    The last example uses the default scheme ('file', unless overridden)\n    \"\"\"\n\n    # Manually parse URI components instead of using urlparse.urlparse because\n    # what we're calling URIs don't really fit the standard syntax for URIs\n    # (the latter includes an optional host/net location part).\n    end_scheme_idx = uri_str.find('://')\n    if end_scheme_idx == -1:\n        # Check for common error: user specifies gs:bucket instead\n        # of gs://bucket. Some URI parsers allow this, but it can cause\n        # confusion for callers, so we don't.\n        if uri_str.find(':') != -1:\n            raise InvalidUriError('\"%s\" contains \":\" instead of \"://\"' % uri_str)\n        scheme = default_scheme.lower()\n        path = uri_str\n    else:\n        scheme = uri_str[0:end_scheme_idx].lower()\n        path = uri_str[end_scheme_idx + 3:]\n\n    if scheme not in ['file', 's3', 'gs']:\n        raise InvalidUriError('Unrecognized scheme \"%s\"' % scheme)\n    if scheme == 'file':\n        # For file URIs we have no bucket name, and use the complete path\n        # (minus 'file://') as the object name.\n        is_stream = False\n        if path == '-':\n            is_stream = True\n        return FileStorageUri(path, debug, is_stream)\n    else:\n        path_parts = path.split('/', 1)\n        bucket_name = path_parts[0]\n        if (validate and bucket_name and\n            # Disallow buckets violating charset or not [3..255] chars total.\n            (not re.match('^[a-z0-9][a-z0-9\\._-]{1,253}[a-z0-9]$', bucket_name)\n            # Disallow buckets with individual DNS labels longer than 63.\n             or re.search('[-_a-z0-9]{64}', bucket_name))):\n            raise InvalidUriError('Invalid bucket name in URI \"%s\"' % uri_str)\n        # If enabled, ensure the bucket name is valid, to avoid possibly\n        # confusing other parts of the code. (For example if we didn't\n        # catch bucket names containing ':', when a user tried to connect to\n        # the server with that name they might get a confusing error about\n        # non-integer port numbers.)\n        object_name = ''\n        if len(path_parts) > 1:\n            object_name = path_parts[1]\n        return bucket_storage_uri_class(scheme, bucket_name, object_name, debug)\n\ndef storage_uri_for_key(key):\n    \"\"\"Returns a StorageUri for the given key.\n\n    :type key: :class:`boto.s3.key.Key` or subclass\n    :param key: URI naming bucket + optional object.\n    \"\"\"\n    if not isinstance(key, boto.s3.key.Key):\n        raise InvalidUriError('Requested key (%s) is not a subclass of '\n                              'boto.s3.key.Key' % str(type(key)))\n    prov_name = key.bucket.connection.provider.get_provider_name()\n    uri_str = '%s://%s/%s' % (prov_name, key.bucket.name, key.name)\n    return storage_uri(uri_str)\n\nboto.plugin.load_plugins(config)\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/auth.py",
    "content": "# Copyright 2010 Google Inc.\n# Copyright (c) 2011 Mitch Garnaat http://garnaat.org/\n# Copyright (c) 2011, Eucalyptus Systems, Inc.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\n\n\"\"\"\nHandles authentication required to AWS and GS\n\"\"\"\n\nimport base64\nimport boto\nimport boto.auth_handler\nimport boto.exception\nimport boto.plugin\nimport boto.utils\nimport hmac\nimport sys\nimport urllib\nfrom email.utils import formatdate\n\nfrom boto.auth_handler import AuthHandler\nfrom boto.exception import BotoClientError\n#\n# the following is necessary because of the incompatibilities\n# between Python 2.4, 2.5, and 2.6 as well as the fact that some\n# people running 2.4 have installed hashlib as a separate module\n# this fix was provided by boto user mccormix.\n# see: http://code.google.com/p/boto/issues/detail?id=172\n# for more details.\n#\ntry:\n    from hashlib import sha1 as sha\n    from hashlib import sha256 as sha256\n\n    if sys.version[:3] == \"2.4\":\n        # we are using an hmac that expects a .new() method.\n        class Faker:\n            def __init__(self, which):\n                self.which = which\n                self.digest_size = self.which().digest_size\n\n            def new(self, *args, **kwargs):\n                return self.which(*args, **kwargs)\n\n        sha = Faker(sha)\n        sha256 = Faker(sha256)\n\nexcept ImportError:\n    import sha\n    sha256 = None\n\nclass HmacKeys(object):\n    \"\"\"Key based Auth handler helper.\"\"\"\n\n    def __init__(self, host, config, provider):\n        if provider.access_key is None or provider.secret_key is None:\n            raise boto.auth_handler.NotReadyToAuthenticate()\n        self._provider = provider\n        self._hmac = hmac.new(self._provider.secret_key, digestmod=sha)\n        if sha256:\n            self._hmac_256 = hmac.new(self._provider.secret_key,\n                                      digestmod=sha256)\n        else:\n            self._hmac_256 = None\n\n    def algorithm(self):\n        if self._hmac_256:\n            return 'HmacSHA256'\n        else:\n            return 'HmacSHA1'\n\n    def sign_string(self, string_to_sign):\n        boto.log.debug('Canonical: %s' % string_to_sign)\n        if self._hmac_256:\n            hmac = self._hmac_256.copy()\n        else:\n            hmac = self._hmac.copy()\n        hmac.update(string_to_sign)\n        return base64.encodestring(hmac.digest()).strip()\n\nclass HmacAuthV1Handler(AuthHandler, HmacKeys):\n    \"\"\"    Implements the HMAC request signing used by S3 and GS.\"\"\"\n    \n    capability = ['hmac-v1', 's3']\n    \n    def __init__(self, host, config, provider):\n        AuthHandler.__init__(self, host, config, provider)\n        HmacKeys.__init__(self, host, config, provider)\n        self._hmac_256 = None\n        \n    def add_auth(self, http_request, **kwargs):\n        headers = http_request.headers\n        method = http_request.method\n        auth_path = http_request.auth_path\n        if not headers.has_key('Date'):\n            headers['Date'] = formatdate(usegmt=True)\n\n        if self._provider.security_token:\n            key = self._provider.security_token_header\n            headers[key] = self._provider.security_token\n        c_string = boto.utils.canonical_string(method, auth_path, headers,\n                                               None, self._provider)\n        b64_hmac = self.sign_string(c_string)\n        auth_hdr = self._provider.auth_header\n        headers['Authorization'] = (\"%s %s:%s\" %\n                                    (auth_hdr,\n                                     self._provider.access_key, b64_hmac))\n\nclass HmacAuthV2Handler(AuthHandler, HmacKeys):\n    \"\"\"\n    Implements the simplified HMAC authorization used by CloudFront.\n    \"\"\"\n    capability = ['hmac-v2', 'cloudfront']\n    \n    def __init__(self, host, config, provider):\n        AuthHandler.__init__(self, host, config, provider)\n        HmacKeys.__init__(self, host, config, provider)\n        self._hmac_256 = None\n        \n    def add_auth(self, http_request, **kwargs):\n        headers = http_request.headers\n        if not headers.has_key('Date'):\n            headers['Date'] = formatdate(usegmt=True)\n\n        b64_hmac = self.sign_string(headers['Date'])\n        auth_hdr = self._provider.auth_header\n        headers['Authorization'] = (\"%s %s:%s\" %\n                                    (auth_hdr,\n                                     self._provider.access_key, b64_hmac))\n        \nclass HmacAuthV3Handler(AuthHandler, HmacKeys):\n    \"\"\"Implements the new Version 3 HMAC authorization used by Route53.\"\"\"\n    \n    capability = ['hmac-v3', 'route53', 'ses']\n    \n    def __init__(self, host, config, provider):\n        AuthHandler.__init__(self, host, config, provider)\n        HmacKeys.__init__(self, host, config, provider)\n        \n    def add_auth(self, http_request, **kwargs):\n        headers = http_request.headers\n        if not headers.has_key('Date'):\n            headers['Date'] = formatdate(usegmt=True)\n\n        b64_hmac = self.sign_string(headers['Date'])\n        s = \"AWS3-HTTPS AWSAccessKeyId=%s,\" % self._provider.access_key\n        s += \"Algorithm=%s,Signature=%s\" % (self.algorithm(), b64_hmac)\n        headers['X-Amzn-Authorization'] = s\n\nclass QuerySignatureHelper(HmacKeys):\n    \"\"\"Helper for Query signature based Auth handler.\n\n    Concrete sub class need to implement _calc_sigature method.\n    \"\"\"\n\n    def add_auth(self, http_request, **kwargs):\n        headers = http_request.headers\n        params = http_request.params\n        params['AWSAccessKeyId'] = self._provider.access_key\n        params['SignatureVersion'] = self.SignatureVersion\n        params['Timestamp'] = boto.utils.get_ts()\n        qs, signature = self._calc_signature(\n            http_request.params, http_request.method,\n            http_request.auth_path, http_request.host)\n        boto.log.debug('query_string: %s Signature: %s' % (qs, signature))\n        if http_request.method == 'POST':\n            headers['Content-Type'] = 'application/x-www-form-urlencoded; charset=UTF-8'\n            http_request.body = qs + '&Signature=' + urllib.quote(signature)\n            http_request.headers['Content-Length'] = str(len(http_request.body))\n        else:\n            http_request.body = ''\n            # if this is a retried request, the qs from the previous try will\n            # already be there, we need to get rid of that and rebuild it\n            http_request.path = http_request.path.split('?')[0]\n            http_request.path = (http_request.path + '?' + qs +\n                                 '&Signature=' + urllib.quote(signature))\n\nclass QuerySignatureV0AuthHandler(QuerySignatureHelper, AuthHandler):\n    \"\"\"Provides Signature V0 Signing\"\"\"\n\n    SignatureVersion = 0\n    capability = ['sign-v0']\n\n    def _calc_signature(self, params, *args):\n        boto.log.debug('using _calc_signature_0')\n        hmac = self._hmac.copy()\n        s = params['Action'] + params['Timestamp']\n        hmac.update(s)\n        keys = params.keys()\n        keys.sort(cmp = lambda x, y: cmp(x.lower(), y.lower()))\n        pairs = []\n        for key in keys:\n            val = boto.utils.get_utf8_value(params[key])\n            pairs.append(key + '=' + urllib.quote(val))\n        qs = '&'.join(pairs)\n        return (qs, base64.b64encode(hmac.digest()))\n\nclass QuerySignatureV1AuthHandler(QuerySignatureHelper, AuthHandler):\n    \"\"\"\n    Provides Query Signature V1 Authentication.\n    \"\"\"\n\n    SignatureVersion = 1\n    capability = ['sign-v1', 'mturk']\n\n    def _calc_signature(self, params, *args):\n        boto.log.debug('using _calc_signature_1')\n        hmac = self._hmac.copy()\n        keys = params.keys()\n        keys.sort(cmp = lambda x, y: cmp(x.lower(), y.lower()))\n        pairs = []\n        for key in keys:\n            hmac.update(key)\n            val = boto.utils.get_utf8_value(params[key])\n            hmac.update(val)\n            pairs.append(key + '=' + urllib.quote(val))\n        qs = '&'.join(pairs)\n        return (qs, base64.b64encode(hmac.digest()))\n\nclass QuerySignatureV2AuthHandler(QuerySignatureHelper, AuthHandler):\n    \"\"\"Provides Query Signature V2 Authentication.\"\"\"\n\n    SignatureVersion = 2\n    capability = ['sign-v2', 'ec2', 'ec2', 'emr', 'fps', 'ecs',\n                  'sdb', 'iam', 'rds', 'sns', 'sqs', 'cloudformation']\n\n    def _calc_signature(self, params, verb, path, server_name):\n        boto.log.debug('using _calc_signature_2')\n        string_to_sign = '%s\\n%s\\n%s\\n' % (verb, server_name.lower(), path)\n        if self._hmac_256:\n            hmac = self._hmac_256.copy()\n            params['SignatureMethod'] = 'HmacSHA256'\n        else:\n            hmac = self._hmac.copy()\n            params['SignatureMethod'] = 'HmacSHA1'\n        if self._provider.security_token:\n            params['SecurityToken'] = self._provider.security_token\n        keys = params.keys()\n        keys.sort()\n        pairs = []\n        for key in keys:\n            val = boto.utils.get_utf8_value(params[key])\n            pairs.append(urllib.quote(key, safe='') + '=' +\n                         urllib.quote(val, safe='-_~'))\n        qs = '&'.join(pairs)\n        boto.log.debug('query string: %s' % qs)\n        string_to_sign += qs\n        boto.log.debug('string_to_sign: %s' % string_to_sign)\n        hmac.update(string_to_sign)\n        b64 = base64.b64encode(hmac.digest())\n        boto.log.debug('len(b64)=%d' % len(b64))\n        boto.log.debug('base64 encoded digest: %s' % b64)\n        return (qs, b64)\n\n\ndef get_auth_handler(host, config, provider, requested_capability=None):\n    \"\"\"Finds an AuthHandler that is ready to authenticate.\n\n    Lists through all the registered AuthHandlers to find one that is willing\n    to handle for the requested capabilities, config and provider.\n\n    :type host: string\n    :param host: The name of the host\n\n    :type config: \n    :param config:\n\n    :type provider:\n    :param provider:\n\n    Returns:\n        An implementation of AuthHandler.\n\n    Raises:\n        boto.exception.NoAuthHandlerFound:\n        boto.exception.TooManyAuthHandlerReadyToAuthenticate:\n    \"\"\"\n    ready_handlers = []\n    auth_handlers = boto.plugin.get_plugin(AuthHandler, requested_capability)\n    total_handlers = len(auth_handlers)\n    for handler in auth_handlers:\n        try:\n            ready_handlers.append(handler(host, config, provider))\n        except boto.auth_handler.NotReadyToAuthenticate:\n            pass\n \n    if not ready_handlers:\n        checked_handlers = auth_handlers\n        names = [handler.__name__ for handler in checked_handlers]\n        raise boto.exception.NoAuthHandlerFound(\n              'No handler was ready to authenticate. %d handlers were checked.'\n              ' %s ' \n              'Check your credentials' % (len(names), str(names)))\n\n    if len(ready_handlers) > 1:\n        # NOTE: Even though it would be nice to accept more than one handler\n        # by using one of the many ready handlers, we are never sure that each\n        # of them are referring to the same storage account. Since we cannot\n        # easily guarantee that, it is always safe to fail, rather than operate\n        # on the wrong account.\n        names = [handler.__class__.__name__ for handler in ready_handlers]\n        raise boto.exception.TooManyAuthHandlerReadyToAuthenticate(\n               '%d AuthHandlers %s ready to authenticate for requested_capability '\n               '%s, only 1 expected. This happens if you import multiple '\n               'pluging.Plugin implementations that declare support for the '\n               'requested_capability.' % (len(names), str(names),\n               requested_capability))\n\n    return ready_handlers[0]\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/auth_handler.py",
    "content": "# Copyright 2010 Google Inc.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\n\"\"\"\nDefines an interface which all Auth handlers need to implement.\n\"\"\"\n\nfrom plugin import Plugin\n\nclass NotReadyToAuthenticate(Exception):\n  pass\n\nclass AuthHandler(Plugin):\n\n    capability = []\n\n    def __init__(self, host, config, provider):\n        \"\"\"Constructs the handlers.\n        :type host: string\n        :param host: The host to which the request is being sent.\n\n        :type config: boto.pyami.Config \n        :param config: Boto configuration.\n\n        :type provider: boto.provider.Provider  \n        :param provider: Provider details.\n\n        Raises:\n            NotReadyToAuthenticate: if this handler is not willing to\n                authenticate for the given provider and config.\n        \"\"\"\n        pass\n\n    def add_auth(self, http_request):\n        \"\"\"Invoked to add authentication details to request.\n\n        :type http_request: boto.connection.HTTPRequest\n        :param http_request: HTTP request that needs to be authenticated.\n        \"\"\"\n        pass\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/cacerts/__init__.py",
    "content": "# Copyright 2010 Google Inc.\n# All rights reserved.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n#\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/cacerts/cacerts.txt",
    "content": "# Certifcate Authority certificates for validating SSL connections.\n#\n# This file contains PEM format certificates generated from\n# http://mxr.mozilla.org/seamonkey/source/security/nss/lib/ckfw/builtins/certdata.txt\n#\n# ***** BEGIN LICENSE BLOCK *****\n# Version: MPL 1.1/GPL 2.0/LGPL 2.1\n#\n# The contents of this file are subject to the Mozilla Public License Version\n# 1.1 (the \"License\"); you may not use this file except in compliance with\n# the License. You may obtain a copy of the License at\n# http://www.mozilla.org/MPL/\n#\n# Software distributed under the License is distributed on an \"AS IS\" basis,\n# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License\n# for the specific language governing rights and limitations under the\n# License.\n#\n# The Original Code is the Netscape security libraries.\n#\n# The Initial Developer of the Original Code is\n# Netscape Communications Corporation.\n# Portions created by the Initial Developer are Copyright (C) 1994-2000\n# the Initial Developer. All Rights Reserved.\n#\n# Contributor(s):\n#\n# Alternatively, the contents of this file may be used under the terms of\n# either the GNU General Public License Version 2 or later (the \"GPL\"), or\n# the GNU Lesser General Public License Version 2.1 or later (the \"LGPL\"),\n# in which case the provisions of the GPL or the LGPL are applicable instead\n# of those above. If you wish to allow use of your version of this file only\n# under the terms of either the GPL or the LGPL, and not to allow others to\n# use your version of this file under the terms of the MPL, indicate your\n# decision by deleting the provisions above and replace them with the notice\n# and other provisions required by the GPL or the LGPL. If you do not delete\n# the provisions above, a recipient may use your version of this file under\n# the terms of any one of the MPL, the GPL or the LGPL.\n#\n# ***** END LICENSE BLOCK *****\n\nVerisign/RSA Secure Server CA\n=============================\n\n-----BEGIN CERTIFICATE-----\nMIICNDCCAaECEAKtZn5ORf5eV288mBle3cAwDQYJKoZIhvcNAQECBQAwXzELMAkG\nA1UEBhMCVVMxIDAeBgNVBAoTF1JTQSBEYXRhIFNlY3VyaXR5LCBJbmMuMS4wLAYD\nVQQLEyVTZWN1cmUgU2VydmVyIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk0\nMTEwOTAwMDAwMFoXDTEwMDEwNzIzNTk1OVowXzELMAkGA1UEBhMCVVMxIDAeBgNV\nBAoTF1JTQSBEYXRhIFNlY3VyaXR5LCBJbmMuMS4wLAYDVQQLEyVTZWN1cmUgU2Vy\ndmVyIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGbMA0GCSqGSIb3DQEBAQUAA4GJ\nADCBhQJ+AJLOesGugz5aqomDV6wlAXYMra6OLDfO6zV4ZFQD5YRAUcm/jwjiioII\n0haGN1XpsSECrXZogZoFokvJSyVmIlZsiAeP94FZbYQHZXATcXY+m3dM41CJVphI\nuR2nKRoTLkoRWZweFdVJVCxzOmmCsZc5nG1wZ0jl3S3WyB57AgMBAAEwDQYJKoZI\nhvcNAQECBQADfgBl3X7hsuyw4jrg7HFGmhkRuNPHoLQDQCYCPgmc4RKz0Vr2N6W3\nYQO2WxZpO8ZECAyIUwxrl0nHPjXcbLm7qt9cuzovk2C2qUtN8iD3zV9/ZHuO3ABc\n1/p3yjkWWW8O6tO1g39NTUJWdrTJXwT4OPjr0l91X817/OWOgHz8UA==\n-----END CERTIFICATE-----\n\nThawte Personal Basic CA\n========================\n\n-----BEGIN CERTIFICATE-----\nMIIDITCCAoqgAwIBAgIBADANBgkqhkiG9w0BAQQFADCByzELMAkGA1UEBhMCWkEx\nFTATBgNVBAgTDFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMRowGAYD\nVQQKExFUaGF3dGUgQ29uc3VsdGluZzEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBT\nZXJ2aWNlcyBEaXZpc2lvbjEhMB8GA1UEAxMYVGhhd3RlIFBlcnNvbmFsIEJhc2lj\nIENBMSgwJgYJKoZIhvcNAQkBFhlwZXJzb25hbC1iYXNpY0B0aGF3dGUuY29tMB4X\nDTk2MDEwMTAwMDAwMFoXDTIwMTIzMTIzNTk1OVowgcsxCzAJBgNVBAYTAlpBMRUw\nEwYDVQQIEwxXZXN0ZXJuIENhcGUxEjAQBgNVBAcTCUNhcGUgVG93bjEaMBgGA1UE\nChMRVGhhd3RlIENvbnN1bHRpbmcxKDAmBgNVBAsTH0NlcnRpZmljYXRpb24gU2Vy\ndmljZXMgRGl2aXNpb24xITAfBgNVBAMTGFRoYXd0ZSBQZXJzb25hbCBCYXNpYyBD\nQTEoMCYGCSqGSIb3DQEJARYZcGVyc29uYWwtYmFzaWNAdGhhd3RlLmNvbTCBnzAN\nBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAvLyTU23AUE+CFeZIlDWmWr5vQvoPR+53\ndXLdjUmbllegeNTKP1GzaQuRdhciB5dqxFGTS+CN7zeVoQxN2jSQHReJl+A1OFdK\nwPQIcOk8RHtQfmGakOMj04gRRif1CwcOu93RfyAKiLlWCy4cgNrx454p7xS9CkT7\nG1sY0b8jkyECAwEAAaMTMBEwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQQF\nAAOBgQAt4plrsD16iddZopQBHyvdEktTwq1/qqcAXJFAVyVKOKqEcLnZgA+le1z7\nc8a914phXAPjLSeoF+CEhULcXpvGt7Jtu3Sv5D/Lp7ew4F2+eIMllNLbgQ95B21P\n9DkVWlIBe94y1k049hJcBlDfBVu9FEuh3ym6O0GN92NWod8isQ==\n-----END CERTIFICATE-----\n\nThawte Personal Premium CA\n==========================\n\n-----BEGIN CERTIFICATE-----\nMIIDKTCCApKgAwIBAgIBADANBgkqhkiG9w0BAQQFADCBzzELMAkGA1UEBhMCWkEx\nFTATBgNVBAgTDFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMRowGAYD\nVQQKExFUaGF3dGUgQ29uc3VsdGluZzEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBT\nZXJ2aWNlcyBEaXZpc2lvbjEjMCEGA1UEAxMaVGhhd3RlIFBlcnNvbmFsIFByZW1p\ndW0gQ0ExKjAoBgkqhkiG9w0BCQEWG3BlcnNvbmFsLXByZW1pdW1AdGhhd3RlLmNv\nbTAeFw05NjAxMDEwMDAwMDBaFw0yMDEyMzEyMzU5NTlaMIHPMQswCQYDVQQGEwJa\nQTEVMBMGA1UECBMMV2VzdGVybiBDYXBlMRIwEAYDVQQHEwlDYXBlIFRvd24xGjAY\nBgNVBAoTEVRoYXd0ZSBDb25zdWx0aW5nMSgwJgYDVQQLEx9DZXJ0aWZpY2F0aW9u\nIFNlcnZpY2VzIERpdmlzaW9uMSMwIQYDVQQDExpUaGF3dGUgUGVyc29uYWwgUHJl\nbWl1bSBDQTEqMCgGCSqGSIb3DQEJARYbcGVyc29uYWwtcHJlbWl1bUB0aGF3dGUu\nY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDJZtn4B0TPuYwu8KHvE0Vs\nBd/eJxZRNkERbGw77f4QfRKe5ZtCmv5gMcNmt3M6SK5O0DI3lIi1DbbZ8/JE2dWI\nEt12TfIa/G8jHnrx2JhFTgcQ7xZC0EN1bUre4qrJMf8fAHB8Zs8QJQi6+u4A6UYD\nZicRFTuqW/KY3TZCstqIdQIDAQABoxMwETAPBgNVHRMBAf8EBTADAQH/MA0GCSqG\nSIb3DQEBBAUAA4GBAGk2ifc0KjNyL2071CKyuG+axTZmDhs8obF1Wub9NdP4qPIH\nb4Vnjt4rueIXsDqg8A6iAJrf8xQVbrvIhVqYgPn/vnQdPfP+MCXRNzRn+qVxeTBh\nKXLA4CxM+1bkOqhv5TJZUtt1KFBZDPgLGeSs2a+WjS9Q2wfD6h+rM+D1KzGJ\n-----END CERTIFICATE-----\n\nThawte Personal Freemail CA\n===========================\n\n-----BEGIN CERTIFICATE-----\nMIIDLTCCApagAwIBAgIBADANBgkqhkiG9w0BAQQFADCB0TELMAkGA1UEBhMCWkEx\nFTATBgNVBAgTDFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMRowGAYD\nVQQKExFUaGF3dGUgQ29uc3VsdGluZzEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBT\nZXJ2aWNlcyBEaXZpc2lvbjEkMCIGA1UEAxMbVGhhd3RlIFBlcnNvbmFsIEZyZWVt\nYWlsIENBMSswKQYJKoZIhvcNAQkBFhxwZXJzb25hbC1mcmVlbWFpbEB0aGF3dGUu\nY29tMB4XDTk2MDEwMTAwMDAwMFoXDTIwMTIzMTIzNTk1OVowgdExCzAJBgNVBAYT\nAlpBMRUwEwYDVQQIEwxXZXN0ZXJuIENhcGUxEjAQBgNVBAcTCUNhcGUgVG93bjEa\nMBgGA1UEChMRVGhhd3RlIENvbnN1bHRpbmcxKDAmBgNVBAsTH0NlcnRpZmljYXRp\nb24gU2VydmljZXMgRGl2aXNpb24xJDAiBgNVBAMTG1RoYXd0ZSBQZXJzb25hbCBG\ncmVlbWFpbCBDQTErMCkGCSqGSIb3DQEJARYccGVyc29uYWwtZnJlZW1haWxAdGhh\nd3RlLmNvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA1GnX1LCUZFtx6UfY\nDFG26nKRsIRefS0Nj3sS34UldSh0OkIsYyeflXtL734Zhx2G6qPduc6WZBrCFG5E\nrHzmj+hND3EfQDimAKOHePb5lIZererAXnbr2RSjXW56fAylS1V/Bhkpf56aJtVq\nuzgkCGqYx7Hao5iR/Xnb5VrEHLkCAwEAAaMTMBEwDwYDVR0TAQH/BAUwAwEB/zAN\nBgkqhkiG9w0BAQQFAAOBgQDH7JJ+Tvj1lqVnYiqk8E0RYNBvjWBYYawmu1I1XAjP\nMPuoSpaKH2JCI4wXD/S6ZJwXrEcp352YXtJsYHFcoqzceePnbgBHH7UNKOgCneSa\n/RP0ptl8sfjcXyMmCZGAc9AUG95DqYMl8uacLxXK/qarigd1iwzdUYRr5PjRznei\ngQ==\n-----END CERTIFICATE-----\n\nThawte Server CA\n================\n\n-----BEGIN CERTIFICATE-----\nMIIDEzCCAnygAwIBAgIBATANBgkqhkiG9w0BAQQFADCBxDELMAkGA1UEBhMCWkEx\nFTATBgNVBAgTDFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMR0wGwYD\nVQQKExRUaGF3dGUgQ29uc3VsdGluZyBjYzEoMCYGA1UECxMfQ2VydGlmaWNhdGlv\nbiBTZXJ2aWNlcyBEaXZpc2lvbjEZMBcGA1UEAxMQVGhhd3RlIFNlcnZlciBDQTEm\nMCQGCSqGSIb3DQEJARYXc2VydmVyLWNlcnRzQHRoYXd0ZS5jb20wHhcNOTYwODAx\nMDAwMDAwWhcNMjAxMjMxMjM1OTU5WjCBxDELMAkGA1UEBhMCWkExFTATBgNVBAgT\nDFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMR0wGwYDVQQKExRUaGF3\ndGUgQ29uc3VsdGluZyBjYzEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2aWNl\ncyBEaXZpc2lvbjEZMBcGA1UEAxMQVGhhd3RlIFNlcnZlciBDQTEmMCQGCSqGSIb3\nDQEJARYXc2VydmVyLWNlcnRzQHRoYXd0ZS5jb20wgZ8wDQYJKoZIhvcNAQEBBQAD\ngY0AMIGJAoGBANOkUG7I/1Zr5s9dtuoMaHVHoqrC2oQl/Kj0R1HahbUgdJSGHg91\nyekIYfUGbTBuFRkC6VLAYttNmZ7iagxEOM3+vuNkCXDF/rFrKbYvScg71CcEJRCX\nL+eQbcAoQpnXTEPew/UhbVSfXcNY4cDk2VuwuNy0e982OsK1ZiIS1ocNAgMBAAGj\nEzARMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEEBQADgYEAB/pMaVz7lcxG\n7oWDTSEwjsrZqG9JGubaUeNgcGyEYRGhGshIPllDfU+VPaGLtwtimHp1it2ITk6e\nQNuozDJ0uW8NxuOzRAvZim+aKZuZGCg70eNAKJpaPNW15yAbi8qkq43pUdniTCxZ\nqdq5snUb9kLy78fyGPmJvKP/iiMucEc=\n-----END CERTIFICATE-----\n\nThawte Premium Server CA\n========================\n\n-----BEGIN CERTIFICATE-----\nMIIDJzCCApCgAwIBAgIBATANBgkqhkiG9w0BAQQFADCBzjELMAkGA1UEBhMCWkEx\nFTATBgNVBAgTDFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMR0wGwYD\nVQQKExRUaGF3dGUgQ29uc3VsdGluZyBjYzEoMCYGA1UECxMfQ2VydGlmaWNhdGlv\nbiBTZXJ2aWNlcyBEaXZpc2lvbjEhMB8GA1UEAxMYVGhhd3RlIFByZW1pdW0gU2Vy\ndmVyIENBMSgwJgYJKoZIhvcNAQkBFhlwcmVtaXVtLXNlcnZlckB0aGF3dGUuY29t\nMB4XDTk2MDgwMTAwMDAwMFoXDTIwMTIzMTIzNTk1OVowgc4xCzAJBgNVBAYTAlpB\nMRUwEwYDVQQIEwxXZXN0ZXJuIENhcGUxEjAQBgNVBAcTCUNhcGUgVG93bjEdMBsG\nA1UEChMUVGhhd3RlIENvbnN1bHRpbmcgY2MxKDAmBgNVBAsTH0NlcnRpZmljYXRp\nb24gU2VydmljZXMgRGl2aXNpb24xITAfBgNVBAMTGFRoYXd0ZSBQcmVtaXVtIFNl\ncnZlciBDQTEoMCYGCSqGSIb3DQEJARYZcHJlbWl1bS1zZXJ2ZXJAdGhhd3RlLmNv\nbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA0jY2aovXwlue2oFBYo847kkE\nVdbQ7xwblRZH7xhINTpS9CtqBo87L+pW46+GjZ4X9560ZXUCTe/LCaIhUdib0GfQ\nug2SBhRz1JPLlyoAnFxODLz6FVL88kRu2hFKbgifLy3j+ao6hnO2RlNYyIkFvYMR\nuHM/qgeN9EJN50CdHDcCAwEAAaMTMBEwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG\n9w0BAQQFAAOBgQAmSCwWwlj66BZ0DKqqX1Q/8tfJeGBeXm43YyJ3Nn6yF8Q0ufUI\nhfzJATj/Tb7yFkJD57taRvvBxhEf8UqwKEbJw8RCfbz6q1lu1bdRiBHjpIUZa4JM\npAwSremkrj/xw0llmozFyD4lt5SZu5IycQfwhl7tUCemDaYj+bvLpgcUQg==\n-----END CERTIFICATE-----\n\nEquifax Secure CA\n=================\n\n-----BEGIN CERTIFICATE-----\nMIIDIDCCAomgAwIBAgIENd70zzANBgkqhkiG9w0BAQUFADBOMQswCQYDVQQGEwJV\nUzEQMA4GA1UEChMHRXF1aWZheDEtMCsGA1UECxMkRXF1aWZheCBTZWN1cmUgQ2Vy\ndGlmaWNhdGUgQXV0aG9yaXR5MB4XDTk4MDgyMjE2NDE1MVoXDTE4MDgyMjE2NDE1\nMVowTjELMAkGA1UEBhMCVVMxEDAOBgNVBAoTB0VxdWlmYXgxLTArBgNVBAsTJEVx\ndWlmYXggU2VjdXJlIENlcnRpZmljYXRlIEF1dGhvcml0eTCBnzANBgkqhkiG9w0B\nAQEFAAOBjQAwgYkCgYEAwV2xWGcIYu6gmi0fCG2RFGiYCh7+2gRvE4RiIcPRfM6f\nBeC4AfBONOziipUEZKzxa1NfBbPLZ4C/QgKO/t0BCezhABRP/PvwDN1Dulsr4R+A\ncJkVV5MW8Q+XarfCaCMczE1ZMKxRHjuvK9buY0V7xdlfUNLjUA86iOe/FP3gx7kC\nAwEAAaOCAQkwggEFMHAGA1UdHwRpMGcwZaBjoGGkXzBdMQswCQYDVQQGEwJVUzEQ\nMA4GA1UEChMHRXF1aWZheDEtMCsGA1UECxMkRXF1aWZheCBTZWN1cmUgQ2VydGlm\naWNhdGUgQXV0aG9yaXR5MQ0wCwYDVQQDEwRDUkwxMBoGA1UdEAQTMBGBDzIwMTgw\nODIyMTY0MTUxWjALBgNVHQ8EBAMCAQYwHwYDVR0jBBgwFoAUSOZo+SvSspXXR9gj\nIBBPM5iQn9QwHQYDVR0OBBYEFEjmaPkr0rKV10fYIyAQTzOYkJ/UMAwGA1UdEwQF\nMAMBAf8wGgYJKoZIhvZ9B0EABA0wCxsFVjMuMGMDAgbAMA0GCSqGSIb3DQEBBQUA\nA4GBAFjOKer89961zgK5F7WF0bnj4JXMJTENAKaSbn+2kmOeUJXRmm/kEd5jhW6Y\n7qj/WsjTVbJmcVfewCHrPSqnI0kBBIZCe/zuf6IWUrVnZ9NA2zsmWLIodz2uFHdh\n1voqZiegDfqnc1zqcPGUIWVEX/r87yloqaKHee9570+sB3c4\n-----END CERTIFICATE-----\n\nVerisign Class 1 Public Primary Certification Authority\n=======================================================\n\n-----BEGIN CERTIFICATE-----\nMIICPTCCAaYCEQDNun9W8N/kvFT+IqyzcqpVMA0GCSqGSIb3DQEBAgUAMF8xCzAJ\nBgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE3MDUGA1UECxMuQ2xh\nc3MgMSBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw05\nNjAxMjkwMDAwMDBaFw0yODA4MDEyMzU5NTlaMF8xCzAJBgNVBAYTAlVTMRcwFQYD\nVQQKEw5WZXJpU2lnbiwgSW5jLjE3MDUGA1UECxMuQ2xhc3MgMSBQdWJsaWMgUHJp\nbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTCBnzANBgkqhkiG9w0BAQEFAAOB\njQAwgYkCgYEA5Rm/baNWYS2ZSHH2Z965jeu3noaACpEO+jglr0aIguVzqKCbJF0N\nH8xlbgyw0FaEGIeaBpsQoXPftFg5a27B9hXVqKg/qhIGjTGsf7A01480Z4gJzRQR\n4k5FVmkfeAKA2txHkSm7NsljXMXg1y2He6G3MrB7MLoqLzGq7qNn2tsCAwEAATAN\nBgkqhkiG9w0BAQIFAAOBgQBMP7iLxmjf7kMzDl3ppssHhE16M/+SG/Q2rdiVIjZo\nEWx8QszznC7EBz8UsA9P/5CSdvnivErpj82ggAr3xSnxgiJduLHdgSOjeyUVRjB5\nFvjqBUuUfx3CHMjjt/QQQDwTw18fU+hI5Ia0e6E1sHslurjTjqs/OJ0ANACY89Fx\nlA==\n-----END CERTIFICATE-----\n\nVerisign Class 2 Public Primary Certification Authority\n=======================================================\n\n-----BEGIN CERTIFICATE-----\nMIICPDCCAaUCEC0b/EoXjaOR6+f/9YtFvgswDQYJKoZIhvcNAQECBQAwXzELMAkG\nA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFz\ncyAyIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk2\nMDEyOTAwMDAwMFoXDTI4MDgwMTIzNTk1OVowXzELMAkGA1UEBhMCVVMxFzAVBgNV\nBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAyIFB1YmxpYyBQcmlt\nYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGfMA0GCSqGSIb3DQEBAQUAA4GN\nADCBiQKBgQC2WoujDWojg4BrzzmH9CETMwZMJaLtVRKXxaeAufqDwSCg+i8VDXyh\nYGt+eSz6Bg86rvYbb7HS/y8oUl+DfUvEerf4Zh+AVPy3wo5ZShRXRtGak75BkQO7\nFYCTXOvnzAhsPz6zSvz/S2wj1VCCJkQZjiPDceoZJEcEnnW/yKYAHwIDAQABMA0G\nCSqGSIb3DQEBAgUAA4GBAIobK/o5wXTXXtgZZKJYSi034DNHD6zt96rbHuSLBlxg\nJ8pFUs4W7z8GZOeUaHxgMxURaa+dYo2jA1Rrpr7l7gUYYAS/QoD90KioHgE796Nc\nr6Pc5iaAIzy4RHT3Cq5Ji2F4zCS/iIqnDupzGUH9TQPwiNHleI2lKk/2lw0Xd8rY\n-----END CERTIFICATE-----\n\nVerisign Class 3 Public Primary Certification Authority\n=======================================================\n\n-----BEGIN CERTIFICATE-----\nMIICPDCCAaUCEHC65B0Q2Sk0tjjKewPMur8wDQYJKoZIhvcNAQECBQAwXzELMAkG\nA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFz\ncyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk2\nMDEyOTAwMDAwMFoXDTI4MDgwMTIzNTk1OVowXzELMAkGA1UEBhMCVVMxFzAVBgNV\nBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAzIFB1YmxpYyBQcmlt\nYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGfMA0GCSqGSIb3DQEBAQUAA4GN\nADCBiQKBgQDJXFme8huKARS0EN8EQNvjV69qRUCPhAwL0TPZ2RHP7gJYHyX3KqhE\nBarsAx94f56TuZoAqiN91qyFomNFx3InzPRMxnVx0jnvT0Lwdd8KkMaOIG+YD/is\nI19wKTakyYbnsZogy1Olhec9vn2a/iRFM9x2Fe0PonFkTGUugWhFpwIDAQABMA0G\nCSqGSIb3DQEBAgUAA4GBALtMEivPLCYATxQT3ab7/AoRhIzzKBxnki98tsX63/Do\nlbwdj2wsqFHMc9ikwFPwTtYmwHYBV4GSXiHx0bH/59AhWM1pF+NEHJwZRDmJXNyc\nAA9WjQKZ7aKQRUzkuxCkPfAyAw7xzvjoyVGM5mKf5p/AfbdynMk2OmufTqj/ZA1k\n-----END CERTIFICATE-----\n\nVerisign Class 1 Public Primary Certification Authority - G2\n============================================================\n\n-----BEGIN CERTIFICATE-----\nMIIDAjCCAmsCEEzH6qqYPnHTkxD4PTqJkZIwDQYJKoZIhvcNAQEFBQAwgcExCzAJ\nBgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xh\nc3MgMSBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcy\nMTowOAYDVQQLEzEoYykgMTk5OCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3Jp\nemVkIHVzZSBvbmx5MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMB4X\nDTk4MDUxODAwMDAwMFoXDTI4MDgwMTIzNTk1OVowgcExCzAJBgNVBAYTAlVTMRcw\nFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xhc3MgMSBQdWJsaWMg\nUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMTowOAYDVQQLEzEo\nYykgMTk5OCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5\nMR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMIGfMA0GCSqGSIb3DQEB\nAQUAA4GNADCBiQKBgQCq0Lq+Fi24g9TK0g+8djHKlNgdk4xWArzZbxpvUjZudVYK\nVdPfQ4chEWWKfo+9Id5rMj8bhDSVBZ1BNeuS65bdqlk/AVNtmU/t5eIqWpDBucSm\nFc/IReumXY6cPvBkJHalzasab7bYe1FhbqZ/h8jit+U03EGI6glAvnOSPWvndQID\nAQABMA0GCSqGSIb3DQEBBQUAA4GBAKlPww3HZ74sy9mozS11534Vnjty637rXC0J\nh9ZrbWB85a7FkCMMXErQr7Fd88e2CtvgFZMN3QO8x3aKtd1Pw5sTdbgBwObJW2ul\nuIncrKTdcu1OofdPvAbT6shkdHvClUGcZXNY8ZCaPGqxmMnEh7zPRW1F4m4iP/68\nDzFc6PLZ\n-----END CERTIFICATE-----\n\nVerisign Class 2 Public Primary Certification Authority - G2\n============================================================\n\n-----BEGIN CERTIFICATE-----\nMIIDAzCCAmwCEQC5L2DMiJ+hekYJuFtwbIqvMA0GCSqGSIb3DQEBBQUAMIHBMQsw\nCQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xPDA6BgNVBAsTM0Ns\nYXNzIDIgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBH\nMjE6MDgGA1UECxMxKGMpIDE5OTggVmVyaVNpZ24sIEluYy4gLSBGb3IgYXV0aG9y\naXplZCB1c2Ugb25seTEfMB0GA1UECxMWVmVyaVNpZ24gVHJ1c3QgTmV0d29yazAe\nFw05ODA1MTgwMDAwMDBaFw0yODA4MDEyMzU5NTlaMIHBMQswCQYDVQQGEwJVUzEX\nMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xPDA6BgNVBAsTM0NsYXNzIDIgUHVibGlj\nIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBHMjE6MDgGA1UECxMx\nKGMpIDE5OTggVmVyaVNpZ24sIEluYy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25s\neTEfMB0GA1UECxMWVmVyaVNpZ24gVHJ1c3QgTmV0d29yazCBnzANBgkqhkiG9w0B\nAQEFAAOBjQAwgYkCgYEAp4gBIXQs5xoD8JjhlzwPIQjxnNuX6Zr8wgQGE75fUsjM\nHiwSViy4AWkszJkfrbCWrnkE8hM5wXuYuggs6MKEEyyqaekJ9MepAqRCwiNPStjw\nDqL7MWzJ5m+ZJwf15vRMeJ5t60aG+rmGyVTyssSv1EYcWskVMP8NbPUtDm3Of3cC\nAwEAATANBgkqhkiG9w0BAQUFAAOBgQByLvl/0fFx+8Se9sVeUYpAmLho+Jscg9ji\nnb3/7aHmZuovCfTK1+qlK5X2JGCGTUQug6XELaDTrnhpb3LabK4I8GOSN+a7xDAX\nrXfMSTWqz9iP0b63GJZHc2pUIjRkLbYWm1lbtFFZOrMLFPQS32eg9K0yZF6xRnIn\njBJ7xUS0rg==\n-----END CERTIFICATE-----\n\nVerisign Class 3 Public Primary Certification Authority - G2\n============================================================\n\n-----BEGIN CERTIFICATE-----\nMIIDAjCCAmsCEH3Z/gfPqB63EHln+6eJNMYwDQYJKoZIhvcNAQEFBQAwgcExCzAJ\nBgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xh\nc3MgMyBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcy\nMTowOAYDVQQLEzEoYykgMTk5OCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3Jp\nemVkIHVzZSBvbmx5MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMB4X\nDTk4MDUxODAwMDAwMFoXDTI4MDgwMTIzNTk1OVowgcExCzAJBgNVBAYTAlVTMRcw\nFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xhc3MgMyBQdWJsaWMg\nUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMTowOAYDVQQLEzEo\nYykgMTk5OCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5\nMR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMIGfMA0GCSqGSIb3DQEB\nAQUAA4GNADCBiQKBgQDMXtERXVxp0KvTuWpMmR9ZmDCOFoUgRm1HP9SFIIThbbP4\npO0M8RcPO/mn+SXXwc+EY/J8Y8+iR/LGWzOOZEAEaMGAuWQcRXfH2G71lSk8UOg0\n13gfqLptQ5GVj0VXXn7F+8qkBOvqlzdUMG+7AUcyM83cV5tkaWH4mx0ciU9cZwID\nAQABMA0GCSqGSIb3DQEBBQUAA4GBAFFNzb5cy5gZnBWyATl4Lk0PZ3BwmcYQWpSk\nU01UbSuvDV1Ai2TT1+7eVmGSX6bEHRBhNtMsJzzoKQm5EWR0zLVznxxIqbxhAe7i\nF6YM40AIOw7n60RzKprxaZLvcRTDOaxxp5EJb+RxBrO6WVcmeQD2+A2iMzAo1KpY\noJ2daZH9\n-----END CERTIFICATE-----\n\nVerisign Class 4 Public Primary Certification Authority - G2\n============================================================\n\n-----BEGIN CERTIFICATE-----\nMIIDAjCCAmsCEDKIjprS9esTR/h/xCA3JfgwDQYJKoZIhvcNAQEFBQAwgcExCzAJ\nBgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xh\nc3MgNCBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcy\nMTowOAYDVQQLEzEoYykgMTk5OCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3Jp\nemVkIHVzZSBvbmx5MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMB4X\nDTk4MDUxODAwMDAwMFoXDTI4MDgwMTIzNTk1OVowgcExCzAJBgNVBAYTAlVTMRcw\nFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xhc3MgNCBQdWJsaWMg\nUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMTowOAYDVQQLEzEo\nYykgMTk5OCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5\nMR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMIGfMA0GCSqGSIb3DQEB\nAQUAA4GNADCBiQKBgQC68OTP+cSuhVS5B1f5j8V/aBH4xBewRNzjMHPVKmIquNDM\nHO0oW369atyzkSTKQWI8/AIBvxwWMZQFl3Zuoq29YRdsTjCG8FE3KlDHqGKB3FtK\nqsGgtG7rL+VXxbErQHDbWk2hjh+9Ax/YA9SPTJlxvOKCzFjomDqG04Y48wApHwID\nAQABMA0GCSqGSIb3DQEBBQUAA4GBAIWMEsGnuVAVess+rLhDityq3RS6iYF+ATwj\ncSGIL4LcY/oCRaxFWdcqWERbt5+BO5JoPeI3JPV7bI92NZYJqFmduc4jq3TWg/0y\ncyfYaT5DdPauxYma51N86Xv2S/PBZYPejYqcPIiNOVn8qj8ijaHBZlCBckztImRP\nT8qAkbYp\n-----END CERTIFICATE-----\n\nVerisign Class 1 Public Primary Certification Authority - G3\n============================================================\n\n-----BEGIN CERTIFICATE-----\nMIIEGjCCAwICEQCLW3VWhFSFCwDPrzhIzrGkMA0GCSqGSIb3DQEBBQUAMIHKMQsw\nCQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZl\ncmlTaWduIFRydXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWdu\nLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlT\naWduIENsYXNzIDEgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3Jp\ndHkgLSBHMzAeFw05OTEwMDEwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMIHKMQswCQYD\nVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlT\naWduIFRydXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJ\nbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlTaWdu\nIENsYXNzIDEgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkg\nLSBHMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAN2E1Lm0+afY8wR4\nnN493GwTFtl63SRRZsDHJlkNrAYIwpTRMx/wgzUfbhvI3qpuFU5UJ+/EbRrsC+MO\n8ESlV8dAWB6jRx9x7GD2bZTIGDnt/kIYVt/kTEkQeE4BdjVjEjbdZrwBBDajVWjV\nojYJrKshJlQGrT/KFOCsyq0GHZXi+J3x4GD/wn91K0zM2v6HmSHquv4+VNfSWXjb\nPG7PoBMAGrgnoeS+Z5bKoMWznN3JdZ7rMJpfo83ZrngZPyPpXNspva1VyBtUjGP2\n6KbqxzcSXKMpHgLZ2x87tNcPVkeBFQRKr4Mn0cVYiMHd9qqnoxjaaKptEVHhv2Vr\nn5Z20T0CAwEAATANBgkqhkiG9w0BAQUFAAOCAQEAq2aN17O6x5q25lXQBfGfMY1a\nqtmqRiYPce2lrVNWYgFHKkTp/j90CxObufRNG7LRX7K20ohcs5/Ny9Sn2WCVhDr4\nwTcdYcrnsMXlkdpUpqwxga6X3s0IrLjAl4B/bnKk52kTlWUfxJM8/XmPBNQ+T+r3\nns7NZ3xPZQL/kYVUc8f/NveGLezQXk//EZ9yBta4GvFMDSZl4kSAHsef493oCtrs\npSCAaWihT37ha88HQfqDjrw43bAuEbFrskLMmrz5SCJ5ShkPshw+IHTZasO+8ih4\nE1Z5T21Q6huwtVexN2ZYI/PcD98Kh8TvhgXVOBRgmaNL3gaWcSzy27YfpO8/7g==\n-----END CERTIFICATE-----\n\nVerisign Class 2 Public Primary Certification Authority - G3\n============================================================\n\n-----BEGIN CERTIFICATE-----\nMIIEGTCCAwECEGFwy0mMX5hFKeewptlQW3owDQYJKoZIhvcNAQEFBQAwgcoxCzAJ\nBgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjEfMB0GA1UECxMWVmVy\naVNpZ24gVHJ1c3QgTmV0d29yazE6MDgGA1UECxMxKGMpIDE5OTkgVmVyaVNpZ24s\nIEluYy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25seTFFMEMGA1UEAxM8VmVyaVNp\nZ24gQ2xhc3MgMiBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0\neSAtIEczMB4XDTk5MTAwMTAwMDAwMFoXDTM2MDcxNjIzNTk1OVowgcoxCzAJBgNV\nBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjEfMB0GA1UECxMWVmVyaVNp\nZ24gVHJ1c3QgTmV0d29yazE6MDgGA1UECxMxKGMpIDE5OTkgVmVyaVNpZ24sIElu\nYy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25seTFFMEMGA1UEAxM8VmVyaVNpZ24g\nQ2xhc3MgMiBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAt\nIEczMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArwoNwtUs22e5LeWU\nJ92lvuCwTY+zYVY81nzD9M0+hsuiiOLh2KRpxbXiv8GmR1BeRjmL1Za6tW8UvxDO\nJxOeBUebMXoT2B/Z0wI3i60sR/COgQanDTAM6/c8DyAd3HJG7qUCyFvDyVZpTMUY\nwZF7C9UTAJu878NIPkZgIIUq1ZC2zYugzDLdt/1AVbJQHFauzI13TccgTacxdu9o\nkoqQHgiBVrKtaaNS0MscxCM9H5n+TOgWY47GCI72MfbS+uV23bUckqNJzc0BzWjN\nqWm6o+sdDZykIKbBoMXRRkwXbdKsZj+WjOCE1Db/IlnF+RFgqF8EffIa9iVCYQ/E\nSrg+iQIDAQABMA0GCSqGSIb3DQEBBQUAA4IBAQA0JhU8wI1NQ0kdvekhktdmnLfe\nxbjQ5F1fdiLAJvmEOjr5jLX77GDx6M4EsMjdpwOPMPOY36TmpDHf0xwLRtxyID+u\n7gU8pDM/CzmscHhzS5kr3zDCVLCoO1Wh/hYozUK9dG6A2ydEp85EXdQbkJgNHkKU\nsQAsBNB0owIFImNjzYO1+8FtYmtpdf1dcEG59b98377BMnMiIYtYgXsVkXq642RI\nsH/7NiXaldDxJBQX3RiAa0YjOVT1jmIJBB2UkKab5iXiQkWquJCtvgiPqQtCGJTP\ncjnhsUPgKM+351psE2tJs//jGHyJizNdrDPXp/naOlXJWBD5qu9ats9LS98q\n-----END CERTIFICATE-----\n\nVerisign Class 3 Public Primary Certification Authority - G3\n============================================================\n\n-----BEGIN CERTIFICATE-----\nMIIEGjCCAwICEQCbfgZJoz5iudXukEhxKe9XMA0GCSqGSIb3DQEBBQUAMIHKMQsw\nCQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZl\ncmlTaWduIFRydXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWdu\nLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlT\naWduIENsYXNzIDMgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3Jp\ndHkgLSBHMzAeFw05OTEwMDEwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMIHKMQswCQYD\nVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlT\naWduIFRydXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJ\nbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlTaWdu\nIENsYXNzIDMgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkg\nLSBHMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMu6nFL8eB8aHm8b\nN3O9+MlrlBIwT/A2R/XQkQr1F8ilYcEWQE37imGQ5XYgwREGfassbqb1EUGO+i2t\nKmFZpGcmTNDovFJbcCAEWNF6yaRpvIMXZK0Fi7zQWM6NjPXr8EJJC52XJ2cybuGu\nkxUccLwgTS8Y3pKI6GyFVxEa6X7jJhFUokWWVYPKMIno3Nij7SqAP395ZVc+FSBm\nCC+Vk7+qRy+oRpfwEuL+wgorUeZ25rdGt+INpsyow0xZVYnm6FNcHOqd8GIWC6fJ\nXwzw3sJ2zq/3avL6QaaiMxTJ5Xpj055iN9WFZZ4O5lMkdBteHRJTW8cs54NJOxWu\nimi5V5cCAwEAATANBgkqhkiG9w0BAQUFAAOCAQEAERSWwauSCPc/L8my/uRan2Te\n2yFPhpk0djZX3dAVL8WtfxUfN2JzPtTnX84XA9s1+ivbrmAJXx5fj267Cz3qWhMe\nDGBvtcC1IyIuBwvLqXTLR7sdwdela8wv0kL9Sd2nic9TutoAWii/gt/4uhMdUIaC\n/Y4wjylGsB49Ndo4YhYYSq3mtlFs3q9i6wHQHiT+eo8SGhJouPtmmRQURVyu565p\nF4ErWjfJXir0xuKhXFSbplQAz/DxwceYMBo7Nhbbo27q/a2ywtrvAkcTisDxszGt\nTxzhT5yvDwyd93gN2PQ1VoDat20Xj50egWTh/sVFuq1ruQp6Tk9LhO5L8X3dEQ==\n-----END CERTIFICATE-----\n\nVerisign Class 4 Public Primary Certification Authority - G3\n============================================================\n\n-----BEGIN CERTIFICATE-----\nMIIEGjCCAwICEQDsoKeLbnVqAc/EfMwvlF7XMA0GCSqGSIb3DQEBBQUAMIHKMQsw\nCQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZl\ncmlTaWduIFRydXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWdu\nLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlT\naWduIENsYXNzIDQgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3Jp\ndHkgLSBHMzAeFw05OTEwMDEwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMIHKMQswCQYD\nVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlT\naWduIFRydXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJ\nbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlTaWdu\nIENsYXNzIDQgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkg\nLSBHMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAK3LpRFpxlmr8Y+1\nGQ9Wzsy1HyDkniYlS+BzZYlZ3tCD5PUPtbut8XzoIfzk6AzufEUiGXaStBO3IFsJ\n+mGuqPKljYXCKtbeZjbSmwL0qJJgfJxptI8kHtCGUvYynEFYHiK9zUVilQhu0Gbd\nU6LM8BDcVHOLBKFGMzNcF0C5nk3T875Vg+ixiY5afJqWIpA7iCXy0lOIAgwLePLm\nNxdLMEYH5IBtptiWLugs+BGzOA1mppvqySNb247i8xOOGlktqgLw7KSHZtzBP/XY\nufTsgsbSPZUd5cBPhMnZo0QoBmrXRazwa2rvTl/4EYIeOGM0ZlDUPpNz+jDDZq3/\nky2X7wMCAwEAATANBgkqhkiG9w0BAQUFAAOCAQEAj/ola09b5KROJ1WrIhVZPMq1\nCtRK26vdoV9TxaBXOcLORyu+OshWv8LZJxA6sQU8wHcxuzrTBXttmhwwjIDLk5Mq\ng6sFUYICABFna/OIYUdfA5PVWw3g8dShMjWFsjrbsIKr0csKvE+MW8VLADsfKoKm\nfjaF3H48ZwC15DtS4KjrXRX5xm3wrR0OhbepmnMUWluPQSjA1egtTaRezarZ7c7c\n2NU8Qh0XwRJdRTjDOPP8hS6DRkiy1yBfkjaP53kPmF6Z6PDQpLv1U70qzlmwr25/\nbLvSHgCwIe34QWKCudiyxLtGUPMxxY8BqHTr9Xgn2uf3ZkPznoM+IKrDNWCRzg==\n-----END CERTIFICATE-----\n\nEquifax Secure Global eBusiness CA\n==================================\n\n-----BEGIN CERTIFICATE-----\nMIICkDCCAfmgAwIBAgIBATANBgkqhkiG9w0BAQQFADBaMQswCQYDVQQGEwJVUzEc\nMBoGA1UEChMTRXF1aWZheCBTZWN1cmUgSW5jLjEtMCsGA1UEAxMkRXF1aWZheCBT\nZWN1cmUgR2xvYmFsIGVCdXNpbmVzcyBDQS0xMB4XDTk5MDYyMTA0MDAwMFoXDTIw\nMDYyMTA0MDAwMFowWjELMAkGA1UEBhMCVVMxHDAaBgNVBAoTE0VxdWlmYXggU2Vj\ndXJlIEluYy4xLTArBgNVBAMTJEVxdWlmYXggU2VjdXJlIEdsb2JhbCBlQnVzaW5l\nc3MgQ0EtMTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAuucXkAJlsTRVPEnC\nUdXfp9E3j9HngXNBUmCbnaEXJnitx7HoJpQytd4zjTov2/KaelpzmKNc6fuKcxtc\n58O/gGzNqfTWK8D3+ZmqY6KxRwIP1ORROhI8bIpaVIRw28HFkM9yRcuoWcDNM50/\no5brhTMhHD4ePmBudpxnhcXIw2ECAwEAAaNmMGQwEQYJYIZIAYb4QgEBBAQDAgAH\nMA8GA1UdEwEB/wQFMAMBAf8wHwYDVR0jBBgwFoAUvqigdHJQa0S3ySPY+6j/s1dr\naGwwHQYDVR0OBBYEFL6ooHRyUGtEt8kj2Puo/7NXa2hsMA0GCSqGSIb3DQEBBAUA\nA4GBADDiAVGqx+pf2rnQZQ8w1j7aDRRJbpGTJxQx78T3LUX47Me/okENI7SS+RkA\nZ70Br83gcfxaz2TE4JaY0KNA4gGK7ycH8WUBikQtBmV1UsCGECAhX2xrD2yuCRyv\n8qIYNMR1pHMc8Y3c7635s3a0kr/clRAevsvIO1qEYBlWlKlV\n-----END CERTIFICATE-----\n\nEquifax Secure eBusiness CA 1\n=============================\n\n-----BEGIN CERTIFICATE-----\nMIICgjCCAeugAwIBAgIBBDANBgkqhkiG9w0BAQQFADBTMQswCQYDVQQGEwJVUzEc\nMBoGA1UEChMTRXF1aWZheCBTZWN1cmUgSW5jLjEmMCQGA1UEAxMdRXF1aWZheCBT\nZWN1cmUgZUJ1c2luZXNzIENBLTEwHhcNOTkwNjIxMDQwMDAwWhcNMjAwNjIxMDQw\nMDAwWjBTMQswCQYDVQQGEwJVUzEcMBoGA1UEChMTRXF1aWZheCBTZWN1cmUgSW5j\nLjEmMCQGA1UEAxMdRXF1aWZheCBTZWN1cmUgZUJ1c2luZXNzIENBLTEwgZ8wDQYJ\nKoZIhvcNAQEBBQADgY0AMIGJAoGBAM4vGbwXt3fek6lfWg0XTzQaDJj0ItlZ1MRo\nRvC0NcWFAyDGr0WlIVFFQesWWDYyb+JQYmT5/VGcqiTZ9J2DKocKIdMSODRsjQBu\nWqDZQu4aIZX5UkxVWsUPOE9G+m34LjXWHXzr4vCwdYDIqROsvojvOm6rXyo4YgKw\nEnv+j6YDAgMBAAGjZjBkMBEGCWCGSAGG+EIBAQQEAwIABzAPBgNVHRMBAf8EBTAD\nAQH/MB8GA1UdIwQYMBaAFEp4MlIR21kWNl7fwRQ2QGpHfEyhMB0GA1UdDgQWBBRK\neDJSEdtZFjZe38EUNkBqR3xMoTANBgkqhkiG9w0BAQQFAAOBgQB1W6ibAxHm6VZM\nzfmpTMANmvPMZWnmJXbMWbfWVMMdzZmsGd20hdXgPfxiIKeES1hl8eL5lSE/9dR+\nWB5Hh1Q+WKG1tfgq73HnvMP2sUlG4tega+VWeponmHxGYhTnyfxuAxJ5gDgdSIKN\n/Bf+KpYrtWKmpj29f5JZzVoqgrI3eQ==\n-----END CERTIFICATE-----\n\nEquifax Secure eBusiness CA 2\n=============================\n\n-----BEGIN CERTIFICATE-----\nMIIDIDCCAomgAwIBAgIEN3DPtTANBgkqhkiG9w0BAQUFADBOMQswCQYDVQQGEwJV\nUzEXMBUGA1UEChMORXF1aWZheCBTZWN1cmUxJjAkBgNVBAsTHUVxdWlmYXggU2Vj\ndXJlIGVCdXNpbmVzcyBDQS0yMB4XDTk5MDYyMzEyMTQ0NVoXDTE5MDYyMzEyMTQ0\nNVowTjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDkVxdWlmYXggU2VjdXJlMSYwJAYD\nVQQLEx1FcXVpZmF4IFNlY3VyZSBlQnVzaW5lc3MgQ0EtMjCBnzANBgkqhkiG9w0B\nAQEFAAOBjQAwgYkCgYEA5Dk5kx5SBhsoNviyoynF7Y6yEb3+6+e0dMKP/wXn2Z0G\nvxLIPw7y1tEkshHe0XMJitSxLJgJDR5QRrKDpkWNYmi7hRsgcDKqQM2mll/EcTc/\nBPO3QSQ5BxoeLmFYoBIL5aXfxavqN3HMHMg3OrmXUqesxWoklE6ce8/AatbfIb0C\nAwEAAaOCAQkwggEFMHAGA1UdHwRpMGcwZaBjoGGkXzBdMQswCQYDVQQGEwJVUzEX\nMBUGA1UEChMORXF1aWZheCBTZWN1cmUxJjAkBgNVBAsTHUVxdWlmYXggU2VjdXJl\nIGVCdXNpbmVzcyBDQS0yMQ0wCwYDVQQDEwRDUkwxMBoGA1UdEAQTMBGBDzIwMTkw\nNjIzMTIxNDQ1WjALBgNVHQ8EBAMCAQYwHwYDVR0jBBgwFoAUUJ4L6q9euSBIplBq\ny/3YIHqngnYwHQYDVR0OBBYEFFCeC+qvXrkgSKZQasv92CB6p4J2MAwGA1UdEwQF\nMAMBAf8wGgYJKoZIhvZ9B0EABA0wCxsFVjMuMGMDAgbAMA0GCSqGSIb3DQEBBQUA\nA4GBAAyGgq3oThr1jokn4jVYPSm0B482UJW/bsGe68SQsoWou7dC4A8HOd/7npCy\n0cE+U58DRLB+S/Rv5Hwf5+Kx5Lia78O9zt4LMjTZ3ijtM2vE1Nc9ElirfQkty3D1\nE4qUoSek1nDFbZS1yX2doNLGCEnZZpum0/QL3MUmV+GRMOrN\n-----END CERTIFICATE-----\n\nThawte Time Stamping CA\n=======================\n\n-----BEGIN CERTIFICATE-----\nMIICoTCCAgqgAwIBAgIBADANBgkqhkiG9w0BAQQFADCBizELMAkGA1UEBhMCWkEx\nFTATBgNVBAgTDFdlc3Rlcm4gQ2FwZTEUMBIGA1UEBxMLRHVyYmFudmlsbGUxDzAN\nBgNVBAoTBlRoYXd0ZTEdMBsGA1UECxMUVGhhd3RlIENlcnRpZmljYXRpb24xHzAd\nBgNVBAMTFlRoYXd0ZSBUaW1lc3RhbXBpbmcgQ0EwHhcNOTcwMTAxMDAwMDAwWhcN\nMjAxMjMxMjM1OTU5WjCBizELMAkGA1UEBhMCWkExFTATBgNVBAgTDFdlc3Rlcm4g\nQ2FwZTEUMBIGA1UEBxMLRHVyYmFudmlsbGUxDzANBgNVBAoTBlRoYXd0ZTEdMBsG\nA1UECxMUVGhhd3RlIENlcnRpZmljYXRpb24xHzAdBgNVBAMTFlRoYXd0ZSBUaW1l\nc3RhbXBpbmcgQ0EwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBANYrWHhhRYZT\n6jR7UZztsOYuGA7+4F+oJ9O0yeB8WU4WDnNUYMF/9p8u6TqFJBU820cEY8OexJQa\nWt9MevPZQx08EHp5JduQ/vBR5zDWQQD9nyjfeb6Uu522FOMjhdepQeBMpHmwKxqL\n8vg7ij5FrHGSALSQQZj7X+36ty6K+Ig3AgMBAAGjEzARMA8GA1UdEwEB/wQFMAMB\nAf8wDQYJKoZIhvcNAQEEBQADgYEAZ9viwuaHPUCDhjc1fR/OmsMMZiCouqoEiYbC\n9RAIDb/LogWK0E02PvTX72nGXuSwlG9KuefeW4i2e9vjJ+V2w/A1wcu1J5szedyQ\npgCed/r8zSeUQhac0xxo7L9c3eWpexAKMnRUEzGLhQOEkbdYATAUOK8oyvyxUBkZ\nCayJSdM=\n-----END CERTIFICATE-----\n\nthawte Primary Root CA\n======================\n\n-----BEGIN CERTIFICATE-----\nMIIEIDCCAwigAwIBAgIQNE7VVyDV7exJ9C/ON9srbTANBgkqhkiG9w0BAQUFADCB\nqTELMAkGA1UEBhMCVVMxFTATBgNVBAoTDHRoYXd0ZSwgSW5jLjEoMCYGA1UECxMf\nQ2VydGlmaWNhdGlvbiBTZXJ2aWNlcyBEaXZpc2lvbjE4MDYGA1UECxMvKGMpIDIw\nMDYgdGhhd3RlLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxHzAdBgNV\nBAMTFnRoYXd0ZSBQcmltYXJ5IFJvb3QgQ0EwHhcNMDYxMTE3MDAwMDAwWhcNMzYw\nNzE2MjM1OTU5WjCBqTELMAkGA1UEBhMCVVMxFTATBgNVBAoTDHRoYXd0ZSwgSW5j\nLjEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2aWNlcyBEaXZpc2lvbjE4MDYG\nA1UECxMvKGMpIDIwMDYgdGhhd3RlLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNl\nIG9ubHkxHzAdBgNVBAMTFnRoYXd0ZSBQcmltYXJ5IFJvb3QgQ0EwggEiMA0GCSqG\nSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCsoPD7gFnUnMekz52hWXMJEEUMDSxuaPFs\nW0hoSVk3/AszGcJ3f8wQLZU0HObrTQmnHNK4yZc2AreJ1CRfBsDMRJSUjQJib+ta\n3RGNKJpchJAQeg29dGYvajig4tVUROsdB58Hum/u6f1OCyn1PoSgAfGcq/gcfomk\n6KHYcWUNo1F77rzSImANuVud37r8UVsLr5iy6S7pBOhih94ryNdOwUxkHt3Ph1i6\nSk/KaAcdHJ1KxtUvkcx8cXIcxcBn6zL9yZJclNqFwJu/U30rCfSMnZEfl2pSy94J\nNqR32HuHUETVPm4pafs5SSYeCaWAe0At6+gnhcn+Yf1+5nyXHdWdAgMBAAGjQjBA\nMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBR7W0XP\nr87Lev0xkhpqtvNG61dIUDANBgkqhkiG9w0BAQUFAAOCAQEAeRHAS7ORtvzw6WfU\nDW5FvlXok9LOAz/t2iWwHVfLHjp2oEzsUHboZHIMpKnxuIvW1oeEuzLlQRHAd9mz\nYJ3rG9XRbkREqaYB7FViHXe4XI5ISXycO1cRrK1zN44veFyQaEfZYGDm/Ac9IiAX\nxPcW6cTYcvnIc3zfFi8VqT79aie2oetaupgf1eNNZAqdE8hhuvU5HIe6uL17In/2\n/qxAeeWsEG89jxt5dovEN7MhGITlNgDrYyCZuen+MwS7QcjBAvlEYyCegc5C09Y/\nLHbTY5xZ3Y+m4Q6gLkH3LpVHz7z9M/P2C2F+fpErgUfCJzDupxBdN49cOSvkBPB7\njVaMaA==\n-----END CERTIFICATE-----\n\nVeriSign Class 3 Public Primary Certification Authority - G5\n============================================================\n\n-----BEGIN CERTIFICATE-----\nMIIE0zCCA7ugAwIBAgIQGNrRniZ96LtKIVjNzGs7SjANBgkqhkiG9w0BAQUFADCB\nyjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL\nExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNiBWZXJp\nU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MUUwQwYDVQQDEzxW\nZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0\naG9yaXR5IC0gRzUwHhcNMDYxMTA4MDAwMDAwWhcNMzYwNzE2MjM1OTU5WjCByjEL\nMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZW\nZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNiBWZXJpU2ln\nbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MUUwQwYDVQQDEzxWZXJp\nU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9y\naXR5IC0gRzUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCvJAgIKXo1\nnmAMqudLO07cfLw8RRy7K+D+KQL5VwijZIUVJ/XxrcgxiV0i6CqqpkKzj/i5Vbex\nt0uz/o9+B1fs70PbZmIVYc9gDaTY3vjgw2IIPVQT60nKWVSFJuUrjxuf6/WhkcIz\nSdhDY2pSS9KP6HBRTdGJaXvHcPaz3BJ023tdS1bTlr8Vd6Gw9KIl8q8ckmcY5fQG\nBO+QueQA5N06tRn/Arr0PO7gi+s3i+z016zy9vA9r911kTMZHRxAy3QkGSGT2RT+\nrCpSx4/VBEnkjWNHiDxpg8v+R70rfk/Fla4OndTRQ8Bnc+MUCH7lP59zuDMKz10/\nNIeWiu5T6CUVAgMBAAGjgbIwga8wDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8E\nBAMCAQYwbQYIKwYBBQUHAQwEYTBfoV2gWzBZMFcwVRYJaW1hZ2UvZ2lmMCEwHzAH\nBgUrDgMCGgQUj+XTGoasjY5rw8+AatRIGCx7GS4wJRYjaHR0cDovL2xvZ28udmVy\naXNpZ24uY29tL3ZzbG9nby5naWYwHQYDVR0OBBYEFH/TZafC3ey78DAJ80M5+gKv\nMzEzMA0GCSqGSIb3DQEBBQUAA4IBAQCTJEowX2LP2BqYLz3q3JktvXf2pXkiOOzE\np6B4Eq1iDkVwZMXnl2YtmAl+X6/WzChl8gGqCBpH3vn5fJJaCGkgDdk+bW48DW7Y\n5gaRQBi5+MHt39tBquCWIMnNZBU4gcmU7qKEKQsTb47bDN0lAtukixlE0kF6BWlK\nWE9gyn6CagsCqiUXObXbf+eEZSqVir2G3l6BFoMtEMze/aiCKm0oHw0LxOXnGiYZ\n4fQRbxC1lfznQgUy286dUV4otp6F01vvpX1FQHKOtw5rDgb7MzVIcbidJ4vEZV8N\nhnacRHr2lVz2XTIIM6RUthg/aFzyQkqFOFSDX9HoLPKsEdao7WNq\n-----END CERTIFICATE-----\n\nEntrust.net Secure Server Certification Authority\n=================================================\n\n-----BEGIN CERTIFICATE-----\nMIIE2DCCBEGgAwIBAgIEN0rSQzANBgkqhkiG9w0BAQUFADCBwzELMAkGA1UEBhMC\nVVMxFDASBgNVBAoTC0VudHJ1c3QubmV0MTswOQYDVQQLEzJ3d3cuZW50cnVzdC5u\nZXQvQ1BTIGluY29ycC4gYnkgcmVmLiAobGltaXRzIGxpYWIuKTElMCMGA1UECxMc\nKGMpIDE5OTkgRW50cnVzdC5uZXQgTGltaXRlZDE6MDgGA1UEAxMxRW50cnVzdC5u\nZXQgU2VjdXJlIFNlcnZlciBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw05OTA1\nMjUxNjA5NDBaFw0xOTA1MjUxNjM5NDBaMIHDMQswCQYDVQQGEwJVUzEUMBIGA1UE\nChMLRW50cnVzdC5uZXQxOzA5BgNVBAsTMnd3dy5lbnRydXN0Lm5ldC9DUFMgaW5j\nb3JwLiBieSByZWYuIChsaW1pdHMgbGlhYi4pMSUwIwYDVQQLExwoYykgMTk5OSBF\nbnRydXN0Lm5ldCBMaW1pdGVkMTowOAYDVQQDEzFFbnRydXN0Lm5ldCBTZWN1cmUg\nU2VydmVyIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGdMA0GCSqGSIb3DQEBAQUA\nA4GLADCBhwKBgQDNKIM0VBuJ8w+vN5Ex/68xYMmo6LIQaO2f55M28Qpku0f1BBc/\nI0dNxScZgSYMVHINiC3ZH5oSn7yzcdOAGT9HZnuMNSjSuQrfJNqc1lB5gXpa0zf3\nwkrYKZImZNHkmGw6AIr1NJtl+O3jEP/9uElY3KDegjlrgbEWGWG5VLbmQwIBA6OC\nAdcwggHTMBEGCWCGSAGG+EIBAQQEAwIABzCCARkGA1UdHwSCARAwggEMMIHeoIHb\noIHYpIHVMIHSMQswCQYDVQQGEwJVUzEUMBIGA1UEChMLRW50cnVzdC5uZXQxOzA5\nBgNVBAsTMnd3dy5lbnRydXN0Lm5ldC9DUFMgaW5jb3JwLiBieSByZWYuIChsaW1p\ndHMgbGlhYi4pMSUwIwYDVQQLExwoYykgMTk5OSBFbnRydXN0Lm5ldCBMaW1pdGVk\nMTowOAYDVQQDEzFFbnRydXN0Lm5ldCBTZWN1cmUgU2VydmVyIENlcnRpZmljYXRp\nb24gQXV0aG9yaXR5MQ0wCwYDVQQDEwRDUkwxMCmgJ6AlhiNodHRwOi8vd3d3LmVu\ndHJ1c3QubmV0L0NSTC9uZXQxLmNybDArBgNVHRAEJDAigA8xOTk5MDUyNTE2MDk0\nMFqBDzIwMTkwNTI1MTYwOTQwWjALBgNVHQ8EBAMCAQYwHwYDVR0jBBgwFoAU8Bdi\nE1U9s/8KAGv7UISX8+1i0BowHQYDVR0OBBYEFPAXYhNVPbP/CgBr+1CEl/PtYtAa\nMAwGA1UdEwQFMAMBAf8wGQYJKoZIhvZ9B0EABAwwChsEVjQuMAMCBJAwDQYJKoZI\nhvcNAQEFBQADgYEAkNwwAvpkdMKnCqV8IY00F6j7Rw7/JXyNEwr75Ji174z4xRAN\n95K+8cPV1ZVqBLssziY2ZcgxxufuP+NXdYR6Ee9GTxj005i7qIcyunL2POI9n9cd\n2cNgQ4xYDiKWL2KjLB+6rQXvqzJ4h6BUcxm1XAX5Uj5tLUUL9wqT6u0G+bI=\n-----END CERTIFICATE-----\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/cloudformation/__init__.py",
    "content": "# Copyright (c) 2010-2011 Mitch Garnaat http://garnaat.org/\n# Copyright (c) 2010-2011, Eucalyptus Systems, Inc.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\n# this is here for backward compatibility\n# originally, the SNSConnection class was defined here\nfrom connection import CloudFormationConnection\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/cloudformation/connection.py",
    "content": "# Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\ntry:\n    import simplejson as json\nexcept:\n    import json\n\nimport boto\nfrom boto.cloudformation.stack import Stack, StackSummary, StackEvent\nfrom boto.cloudformation.stack import StackResource, StackResourceSummary\nfrom boto.cloudformation.template import Template\nfrom boto.connection import AWSQueryConnection\nfrom boto.regioninfo import RegionInfo\n\nclass CloudFormationConnection(AWSQueryConnection):\n\n    \"\"\"\n    A Connection to the CloudFormation Service.\n    \"\"\"\n    DefaultRegionName = 'us-east-1'\n    DefaultRegionEndpoint = 'cloudformation.us-east-1.amazonaws.com'\n    APIVersion = '2010-05-15'\n\n    valid_states = (\"CREATE_IN_PROGRESS\", \"CREATE_FAILED\", \"CREATE_COMPLETE\",\n            \"ROLLBACK_IN_PROGRESS\", \"ROLLBACK_FAILED\", \"ROLLBACK_COMPLETE\",\n            \"DELETE_IN_PROGRESS\", \"DELETE_FAILED\", \"DELETE_COMPLETE\")\n\n    def __init__(self, aws_access_key_id=None, aws_secret_access_key=None,\n                 is_secure=True, port=None, proxy=None, proxy_port=None,\n                 proxy_user=None, proxy_pass=None, debug=0,\n                 https_connection_factory=None, region=None, path='/', converter=None):\n        if not region:\n            region = RegionInfo(self, self.DefaultRegionName,\n                self.DefaultRegionEndpoint, CloudFormationConnection)\n        self.region = region\n        AWSQueryConnection.__init__(self, aws_access_key_id, aws_secret_access_key,\n                                    is_secure, port, proxy, proxy_port, proxy_user, proxy_pass,\n                                    self.region.endpoint, debug, https_connection_factory, path)\n\n    def _required_auth_capability(self):\n        return ['cloudformation']\n\n    def encode_bool(self, v):\n        v = bool(v)\n        return {True: \"true\", False: \"false\"}[v]\n\n    def create_stack(self, stack_name, template_body=None, template_url=None,\n            parameters=[], notification_arns=[], disable_rollback=False,\n            timeout_in_minutes=None):\n        \"\"\"\n        Creates a CloudFormation Stack as specified by the template.\n\n        :type stack_name: string\n        :param stack_name: The name of the Stack, must be unique amoung running\n                            Stacks\n\n        :type template_body: string\n        :param template_body: The template body (JSON string)\n\n        :type template_url: string\n        :param template_url: An S3 URL of a stored template JSON document. If\n                            both the template_body and template_url are\n                            specified, the template_body takes precedence\n\n        :type parameters: list of tuples\n        :param parameters: A list of (key, value) pairs for template input\n                            parameters.\n\n        :type notification_arns: list of strings\n        :param notification_arns: A list of SNS topics to send Stack event\n                            notifications to\n\n        :type disable_rollback: bool\n        :param disable_rollback: Indicates whether or not to rollback on\n                            failure\n\n        :type timeout_in_minutes: int\n        :param timeout_in_minutes: Maximum amount of time to let the Stack\n                            spend creating itself. If this timeout is exceeded,\n                            the Stack will enter the CREATE_FAILED state\n\n        :rtype: string\n        :return: The unique Stack ID\n        \"\"\"\n        params = {'ContentType': \"JSON\", 'StackName': stack_name,\n                'DisableRollback': self.encode_bool(disable_rollback)}\n        if template_body:\n            params['TemplateBody'] = template_body\n        if template_url:\n            params['TemplateURL'] = template_url\n        if template_body and template_url:\n            boto.log.warning(\"If both TemplateBody and TemplateURL are\"\n                \" specified, only TemplateBody will be honored by the API\")\n        if len(parameters) > 0:\n            for i, (key, value) in enumerate(parameters):\n                params['Parameters.member.%d.ParameterKey' % (i+1)] = key\n                params['Parameters.member.%d.ParameterValue' % (i+1)] = value\n        if len(notification_arns) > 0:\n            self.build_list_params(params, notification_arns, \"NotificationARNs.member\")\n        if timeout_in_minutes:\n            params['TimeoutInMinutes'] = int(timeout_in_minutes)\n\n        response = self.make_request('CreateStack', params, '/', 'POST')\n        body = response.read()\n        if response.status == 200:\n            body = json.loads(body)\n            return body['CreateStackResponse']['CreateStackResult']['StackId']\n        else:\n            boto.log.error('%s %s' % (response.status, response.reason))\n            boto.log.error('%s' % body)\n            raise self.ResponseError(response.status, response.reason, body)\n\n    def delete_stack(self, stack_name_or_id):\n        params = {'ContentType': \"JSON\", 'StackName': stack_name_or_id}\n        # TODO: change this to get_status ?\n        response = self.make_request('DeleteStack', params, '/', 'GET')\n        body = response.read()\n        if response.status == 200:\n            return json.loads(body)\n        else:\n            boto.log.error('%s %s' % (response.status, response.reason))\n            boto.log.error('%s' % body)\n            raise self.ResponseError(response.status, response.reason, body)\n\n    def describe_stack_events(self, stack_name_or_id=None, next_token=None):\n        params = {}\n        if stack_name_or_id:\n            params['StackName'] = stack_name_or_id\n        if next_token:\n            params['NextToken'] = next_token\n        return self.get_list('DescribeStackEvents', params, [('member',\n            StackEvent)])\n\n    def describe_stack_resource(self, stack_name_or_id, logical_resource_id):\n        params = {'ContentType': \"JSON\", 'StackName': stack_name_or_id,\n                'LogicalResourceId': logical_resource_id}\n        response = self.make_request('DescribeStackResource', params, '/', 'GET')\n        body = response.read()\n        if response.status == 200:\n            return json.loads(body)\n        else:\n            boto.log.error('%s %s' % (response.status, response.reason))\n            boto.log.error('%s' % body)\n            raise self.ResponseError(response.status, response.reason, body)\n\n    def describe_stack_resources(self, stack_name_or_id=None,\n            logical_resource_id=None,\n            physical_resource_id=None):\n        params = {}\n        if stack_name_or_id:\n            params['StackName'] = stack_name_or_id\n        if logical_resource_id:\n            params['LogicalResourceId'] = logical_resource_id\n        if physical_resource_id:\n            params['PhysicalResourceId'] = physical_resource_id\n        return self.get_list('DescribeStackResources', params, [('member',\n            StackResource)])\n\n    def describe_stacks(self, stack_name_or_id=None):\n        params = {}\n        if stack_name_or_id:\n            params['StackName'] = stack_name_or_id\n        return self.get_list('DescribeStacks', params, [('member', Stack)])\n\n    def get_template(self, stack_name_or_id):\n        params = {'ContentType': \"JSON\", 'StackName': stack_name_or_id}\n        response = self.make_request('GetTemplate', params, '/', 'GET')\n        body = response.read()\n        if response.status == 200:\n            return json.loads(body)\n        else:\n            boto.log.error('%s %s' % (response.status, response.reason))\n            boto.log.error('%s' % body)\n            raise self.ResponseError(response.status, response.reason, body)\n\n    def list_stack_resources(self, stack_name_or_id, next_token=None):\n        params = {'StackName': stack_name_or_id}\n        if next_token:\n            params['NextToken'] = next_token\n        return self.get_list('ListStackResources', params, [('member',\n            StackResourceSummary)])\n\n    def list_stacks(self, stack_status_filters=[], next_token=None):\n        params = {}\n        if next_token:\n            params['NextToken'] = next_token\n        if len(stack_status_filters) > 0:\n            self.build_list_params(params, stack_status_filters,\n                \"StackStatusFilter.member\")\n\n        return self.get_list('ListStacks', params, [('member',\n            StackSummary)])\n\n    def validate_template(self, template_body=None, template_url=None):\n        params = {}\n        if template_body:\n            params['TemplateBody'] = template_body\n        if template_url:\n            params['TemplateUrl'] = template_url\n        if template_body and template_url:\n            boto.log.warning(\"If both TemplateBody and TemplateURL are\"\n                \" specified, only TemplateBody will be honored by the API\")\n        return self.get_object('ValidateTemplate', params, Template,\n                verb=\"POST\")\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/cloudformation/stack.py",
    "content": "from datetime import datetime\n\nfrom boto.resultset import ResultSet\n\nclass Stack:\n    def __init__(self, connection=None):\n        self.connection = connection\n        self.creation_time = None\n        self.description = None\n        self.disable_rollback = None\n        self.notification_arns = []\n        self.outputs = []\n        self.parameters = []\n        self.stack_id = None\n        self.stack_status = None\n        self.stack_name = None\n        self.stack_name_reason = None\n        self.timeout_in_minutes = None\n\n    def startElement(self, name, attrs, connection):\n        if name == \"Parameters\":\n            self.parameters = ResultSet([('member', Parameter)])\n            return self.parameters\n        elif name == \"Outputs\":\n            self.outputs = ResultSet([('member', Output)])\n            return self.outputs\n        else:\n            return None\n\n    def endElement(self, name, value, connection):\n        if name == 'CreationTime':\n            self.creation_time = datetime.strptime(value, '%Y-%m-%dT%H:%M:%SZ')\n        elif name == \"Description\":\n            self.description = value\n        elif name == \"DisableRollback\":\n            self.disable_rollback = bool(value)\n        elif name == \"NotificationARNs\":\n            self.notification_arns = value\n        elif name == 'StackId':\n            self.stack_id = value\n        elif name == 'StackName':\n            self.stack_name = value\n        elif name == 'StackStatus':\n            self.stack_status = value\n        elif name == \"StackStatusReason\":\n            self.stack_status_reason = value\n        elif name == \"TimeoutInMinutes\":\n            self.timeout_in_minutes = int(value)\n        elif name == \"member\":\n            pass\n        else:\n            setattr(self, name, value)\n\n    def delete(self):\n        return self.connection.delete_stack(stack_name_or_id=self.stack_id)\n\n    def describe_events(self, next_token=None):\n        return self.connection.describe_stack_events(\n            stack_name_or_id=self.stack_id,\n            next_token=next_token\n        )\n\n    def describe_resource(self, logical_resource_id):\n        return self.connection.describe_stack_resource(\n            stack_name_or_id=self.stack_id,\n            logical_resource_id=logical_resource_id\n        )\n\n    def describe_resources(self, logical_resource_id=None,\n            physical_resource_id=None):\n        return self.connection.describe_stack_resources(\n            stack_name_or_id=self.stack_id,\n            logical_resource_id=logical_resource_id,\n            physical_resource_id=physical_resource_id\n        )\n\n    def list_resources(self, next_token=None):\n        return self.connection.list_stack_resources(\n            stack_name_or_id=self.stack_id,\n            next_token=next_token\n        )\n\n    def update(self):\n        rs = self.connection.describe_stacks(self.stack_id)\n        if len(rs) == 1 and rs[0].stack_id == self.stack_id:\n            self.__dict__.update(rs[0].__dict__)\n        else:\n            raise ValueError(\"%s is not a valid Stack ID or Name\" %\n                self.stack_id)\n\n    def get_template(self):\n        return self.connection.get_template(stack_name_or_id=self.stack_id)\n\nclass StackSummary:\n    def __init__(self, connection=None):\n        self.connection = connection\n        self.stack_id = None\n        self.stack_status = None\n        self.stack_name = None\n        self.creation_time = None\n        self.deletion_time = None\n        self.template_description = None\n\n    def startElement(self, name, attrs, connection):\n        return None\n\n    def endElement(self, name, value, connection):\n        if name == 'StackId':\n            self.stack_id = value\n        elif name == 'StackStatus':\n            self.stack_status = value\n        elif name == 'StackName':\n            self.stack_name = value\n        elif name == 'CreationTime':\n            self.creation_time = datetime.strptime(value, '%Y-%m-%dT%H:%M:%SZ')\n        elif name == \"DeletionTime\":\n            self.deletion_time = datetime.strptime(value, '%Y-%m-%dT%H:%M:%SZ')\n        elif name == 'TemplateDescription':\n            self.template_description = value\n        elif name == \"member\":\n            pass\n        else:\n            setattr(self, name, value)\n\nclass Parameter:\n    def __init__(self, connection=None):\n        self.connection = None\n        self.key = None\n        self.value = None\n\n    def startElement(self, name, attrs, connection):\n        return None\n\n    def endElement(self, name, value, connection):\n        if name == \"ParameterKey\":\n            self.key = value\n        elif name == \"ParameterValue\":\n            self.value = value\n        else:\n            setattr(self, name, value)\n\n    def __repr__(self):\n        return \"Parameter:\\\"%s\\\"=\\\"%s\\\"\" % (self.key, self.value)\n\nclass Output:\n    def __init__(self, connection=None):\n        self.connection = connection\n        self.description = None\n        self.key = None\n        self.value = None\n\n    def startElement(self, name, attrs, connection):\n        return None\n\n    def endElement(self, name, value, connection):\n        if name == \"Description\":\n            self.description = value\n        elif name == \"OutputKey\":\n            self.key = value\n        elif name == \"OutputValue\":\n            self.value = value\n        else:\n            setattr(self, name, value)\n\n    def __repr__(self):\n        return \"Output:\\\"%s\\\"=\\\"%s\\\"\" % (self.key, self.value)\n\nclass StackResource:\n    def __init__(self, connection=None):\n        self.connection = connection\n        self.description = None\n        self.logical_resource_id = None\n        self.physical_resource_id = None\n        self.resource_status = None\n        self.resource_status_reason = None\n        self.resource_type = None\n        self.stack_id = None\n        self.stack_name = None\n        self.timestamp = None\n\n    def startElement(self, name, attrs, connection):\n        return None\n\n    def endElement(self, name, value, connection):\n        if name == \"Description\":\n            self.description = value\n        elif name == \"LogicalResourceId\":\n            self.logical_resource_id = value\n        elif name == \"PhysicalResourceId\":\n            self.physical_resource_id = value\n        elif name == \"ResourceStatus\":\n            self.resource_status = value\n        elif name == \"ResourceStatusReason\":\n            self.resource_status_reason = value\n        elif name == \"ResourceType\":\n            self.resource_type = value\n        elif name == \"StackId\":\n            self.stack_id = value\n        elif name == \"StackName\":\n            self.stack_name = value\n        elif name == \"Timestamp\":\n            self.timestamp = datetime.strptime(value, '%Y-%m-%dT%H:%M:%SZ')\n        else:\n            setattr(self, name, value)\n\n    def __repr__(self):\n        return \"StackResource:%s (%s)\" % (self.logical_resource_id,\n                self.resource_type)\n\nclass StackResourceSummary:\n    def __init__(self, connection=None):\n        self.connection = connection\n        self.last_updated_timestamp = None\n        self.logical_resource_id = None\n        self.physical_resource_id = None\n        self.resource_status = None\n        self.resource_status_reason = None\n        self.resource_type = None\n\n    def startElement(self, name, attrs, connection):\n        return None\n\n    def endElement(self, name, value, connection):\n        if name == \"LastUpdatedTimestamp\":\n            self.last_updated_timestampe = datetime.strptime(value,\n                '%Y-%m-%dT%H:%M:%SZ')\n        elif name == \"LogicalResourceId\":\n            self.logical_resource_id = value\n        elif name == \"PhysicalResourceId\":\n            self.physical_resource_id = value\n        elif name == \"ResourceStatus\":\n            self.resource_status = value\n        elif name == \"ResourceStatusReason\":\n            self.resource_status_reason = value\n        elif name == \"ResourceType\":\n            self.resource_type = value\n        else:\n            setattr(self, name, value)\n\n    def __repr__(self):\n        return \"StackResourceSummary:%s (%s)\" % (self.logical_resource_id,\n                self.resource_type)\n\nclass StackEvent:\n    valid_states = (\"CREATE_IN_PROGRESS\", \"CREATE_FAILED\", \"CREATE_COMPLETE\",\n            \"DELETE_IN_PROGRESS\", \"DELETE_FAILED\", \"DELETE_COMPLETE\")\n    def __init__(self, connection=None):\n        self.connection = connection\n        self.event_id = None\n        self.logical_resource_id = None\n        self.physical_resource_id = None\n        self.resource_properties = None\n        self.resource_status = None\n        self.resource_status_reason = None\n        self.resource_type = None\n        self.stack_id = None\n        self.stack_name = None\n        self.timestamp = None\n\n    def startElement(self, name, attrs, connection):\n        return None\n\n    def endElement(self, name, value, connection):\n        if name == \"EventId\":\n            self.event_id = value\n        elif name == \"LogicalResourceId\":\n            self.logical_resource_id = value\n        elif name == \"PhysicalResourceId\":\n            self.physical_resource_id = value\n        elif name == \"ResourceProperties\":\n            self.resource_properties = value\n        elif name == \"ResourceStatus\":\n            self.resource_status = value\n        elif name == \"ResourceStatusReason\":\n            self.resource_status_reason = value\n        elif name == \"ResourceType\":\n            self.resource_type = value\n        elif name == \"StackId\":\n            self.stack_id = value\n        elif name == \"StackName\":\n            self.stack_name = value\n        elif name == \"Timestamp\":\n            self.timestamp = datetime.strptime(value, '%Y-%m-%dT%H:%M:%SZ')\n        else:\n            setattr(self, name, value)\n\n    def __repr__(self):\n        return \"StackEvent %s %s %s\" % (self.resource_type,\n                self.logical_resource_id, self.resource_status)\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/cloudformation/template.py",
    "content": "from boto.resultset import ResultSet\n\nclass Template:\n    def __init__(self, connection=None):\n        self.connection = connection\n        self.description = None\n        self.template_parameters = None\n\n    def startElement(self, name, attrs, connection):\n        if name == \"Parameters\":\n            self.template_parameters = ResultSet([('member', TemplateParameter)])\n            return self.template_parameters\n        else:\n            return None\n\n    def endElement(self, name, value, connection):\n        if name == \"Description\":\n            self.description = value\n        else:\n            setattr(self, name, value)\n\nclass TemplateParameter:\n    def __init__(self, parent):\n        self.parent = parent\n        self.default_value = None\n        self.description = None\n        self.no_echo = None\n        self.parameter_key = None\n\n    def startElement(self, name, attrs, connection):\n        return None\n\n    def endElement(self, name, value, connection):\n        if name == \"DefaultValue\":\n            self.default_value = value\n        elif name == \"Description\":\n            self.description = value\n        elif name == \"NoEcho\":\n            self.no_echo = bool(value)\n        elif name == \"ParameterKey\":\n            self.parameter_key = value\n        else:\n            setattr(self, name, value)\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/cloudfront/__init__.py",
    "content": "# Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n#\n\nimport xml.sax\nimport time\nimport boto\nfrom boto.connection import AWSAuthConnection\nfrom boto import handler\nfrom boto.cloudfront.distribution import Distribution, DistributionSummary, DistributionConfig\nfrom boto.cloudfront.distribution import StreamingDistribution, StreamingDistributionSummary, StreamingDistributionConfig\nfrom boto.cloudfront.identity import OriginAccessIdentity\nfrom boto.cloudfront.identity import OriginAccessIdentitySummary\nfrom boto.cloudfront.identity import OriginAccessIdentityConfig\nfrom boto.cloudfront.invalidation import InvalidationBatch\nfrom boto.resultset import ResultSet\nfrom boto.cloudfront.exception import CloudFrontServerError\n\nclass CloudFrontConnection(AWSAuthConnection):\n\n    DefaultHost = 'cloudfront.amazonaws.com'\n    Version = '2010-11-01'\n\n    def __init__(self, aws_access_key_id=None, aws_secret_access_key=None,\n                 port=None, proxy=None, proxy_port=None,\n                 host=DefaultHost, debug=0):\n        AWSAuthConnection.__init__(self, host,\n                aws_access_key_id, aws_secret_access_key,\n                True, port, proxy, proxy_port, debug=debug)\n\n    def get_etag(self, response):\n        response_headers = response.msg\n        for key in response_headers.keys():\n            if key.lower() == 'etag':\n                return response_headers[key]\n        return None\n\n    def _required_auth_capability(self):\n        return ['cloudfront']\n\n    # Generics\n    \n    def _get_all_objects(self, resource, tags):\n        if not tags:\n            tags=[('DistributionSummary', DistributionSummary)]\n        response = self.make_request('GET', '/%s/%s' % (self.Version, resource))\n        body = response.read()\n        boto.log.debug(body)\n        if response.status >= 300:\n            raise CloudFrontServerError(response.status, response.reason, body)\n        rs = ResultSet(tags)\n        h = handler.XmlHandler(rs, self)\n        xml.sax.parseString(body, h)\n        return rs\n\n    def _get_info(self, id, resource, dist_class):\n        uri = '/%s/%s/%s' % (self.Version, resource, id)\n        response = self.make_request('GET', uri)\n        body = response.read()\n        boto.log.debug(body)\n        if response.status >= 300:\n            raise CloudFrontServerError(response.status, response.reason, body)\n        d = dist_class(connection=self)\n        response_headers = response.msg\n        for key in response_headers.keys():\n            if key.lower() == 'etag':\n                d.etag = response_headers[key]\n        h = handler.XmlHandler(d, self)\n        xml.sax.parseString(body, h)\n        return d\n\n    def _get_config(self, id, resource, config_class):\n        uri = '/%s/%s/%s/config' % (self.Version, resource, id)\n        response = self.make_request('GET', uri)\n        body = response.read()\n        boto.log.debug(body)\n        if response.status >= 300:\n            raise CloudFrontServerError(response.status, response.reason, body)\n        d = config_class(connection=self)\n        d.etag = self.get_etag(response)\n        h = handler.XmlHandler(d, self)\n        xml.sax.parseString(body, h)\n        return d\n    \n    def _set_config(self, distribution_id, etag, config):\n        if isinstance(config, StreamingDistributionConfig):\n            resource = 'streaming-distribution'\n        else:\n            resource = 'distribution'\n        uri = '/%s/%s/%s/config' % (self.Version, resource, distribution_id)\n        headers = {'If-Match' : etag, 'Content-Type' : 'text/xml'}\n        response = self.make_request('PUT', uri, headers, config.to_xml())\n        body = response.read()\n        boto.log.debug(body)\n        if response.status != 200:\n            raise CloudFrontServerError(response.status, response.reason, body)\n        return self.get_etag(response)\n    \n    def _create_object(self, config, resource, dist_class):\n        response = self.make_request('POST', '/%s/%s' % (self.Version, resource),\n                                     {'Content-Type' : 'text/xml'}, data=config.to_xml())\n        body = response.read()\n        boto.log.debug(body)\n        if response.status == 201:\n            d = dist_class(connection=self)\n            h = handler.XmlHandler(d, self)\n            xml.sax.parseString(body, h)\n            d.etag = self.get_etag(response)\n            return d\n        else:\n            raise CloudFrontServerError(response.status, response.reason, body)\n        \n    def _delete_object(self, id, etag, resource):\n        uri = '/%s/%s/%s' % (self.Version, resource, id)\n        response = self.make_request('DELETE', uri, {'If-Match' : etag})\n        body = response.read()\n        boto.log.debug(body)\n        if response.status != 204:\n            raise CloudFrontServerError(response.status, response.reason, body)\n\n    # Distributions\n        \n    def get_all_distributions(self):\n        tags=[('DistributionSummary', DistributionSummary)]\n        return self._get_all_objects('distribution', tags)\n\n    def get_distribution_info(self, distribution_id):\n        return self._get_info(distribution_id, 'distribution', Distribution)\n\n    def get_distribution_config(self, distribution_id):\n        return self._get_config(distribution_id, 'distribution',\n                                DistributionConfig)\n    \n    def set_distribution_config(self, distribution_id, etag, config):\n        return self._set_config(distribution_id, etag, config)\n    \n    def create_distribution(self, origin, enabled, caller_reference='',\n                            cnames=None, comment='', trusted_signers=None):\n        config = DistributionConfig(origin=origin, enabled=enabled,\n                                    caller_reference=caller_reference,\n                                    cnames=cnames, comment=comment,\n                                    trusted_signers=trusted_signers)\n        return self._create_object(config, 'distribution', Distribution)\n        \n    def delete_distribution(self, distribution_id, etag):\n        return self._delete_object(distribution_id, etag, 'distribution')\n\n    # Streaming Distributions\n        \n    def get_all_streaming_distributions(self):\n        tags=[('StreamingDistributionSummary', StreamingDistributionSummary)]\n        return self._get_all_objects('streaming-distribution', tags)\n\n    def get_streaming_distribution_info(self, distribution_id):\n        return self._get_info(distribution_id, 'streaming-distribution',\n                              StreamingDistribution)\n\n    def get_streaming_distribution_config(self, distribution_id):\n        return self._get_config(distribution_id, 'streaming-distribution',\n                                StreamingDistributionConfig)\n    \n    def set_streaming_distribution_config(self, distribution_id, etag, config):\n        return self._set_config(distribution_id, etag, config)\n    \n    def create_streaming_distribution(self, origin, enabled,\n                                      caller_reference='',\n                                      cnames=None, comment='',\n                                      trusted_signers=None):\n        config = StreamingDistributionConfig(origin=origin, enabled=enabled,\n                                             caller_reference=caller_reference,\n                                             cnames=cnames, comment=comment,\n                                             trusted_signers=trusted_signers)\n        return self._create_object(config, 'streaming-distribution',\n                                   StreamingDistribution)\n        \n    def delete_streaming_distribution(self, distribution_id, etag):\n        return self._delete_object(distribution_id, etag, 'streaming-distribution')\n\n    # Origin Access Identity\n\n    def get_all_origin_access_identity(self):\n        tags=[('CloudFrontOriginAccessIdentitySummary',\n               OriginAccessIdentitySummary)]\n        return self._get_all_objects('origin-access-identity/cloudfront', tags)\n\n    def get_origin_access_identity_info(self, access_id):\n        return self._get_info(access_id, 'origin-access-identity/cloudfront',\n                              OriginAccessIdentity)\n\n    def get_origin_access_identity_config(self, access_id):\n        return self._get_config(access_id,\n                                'origin-access-identity/cloudfront',\n                                OriginAccessIdentityConfig)\n    \n    def set_origin_access_identity_config(self, access_id,\n                                          etag, config):\n        return self._set_config(access_id, etag, config)\n    \n    def create_origin_access_identity(self, caller_reference='', comment=''):\n        config = OriginAccessIdentityConfig(caller_reference=caller_reference,\n                                            comment=comment)\n        return self._create_object(config, 'origin-access-identity/cloudfront',\n                                   OriginAccessIdentity)\n        \n    def delete_origin_access_identity(self, access_id, etag):\n        return self._delete_object(access_id, etag,\n                                   'origin-access-identity/cloudfront')\n\n    # Object Invalidation\n    \n    def create_invalidation_request(self, distribution_id, paths,\n                                    caller_reference=None):\n        \"\"\"Creates a new invalidation request\n            :see: http://goo.gl/8vECq\n        \"\"\"\n        # We allow you to pass in either an array or\n        # an InvalidationBatch object\n        if not isinstance(paths, InvalidationBatch):\n            paths = InvalidationBatch(paths)\n        paths.connection = self\n        uri = '/%s/distribution/%s/invalidation' % (self.Version,\n                                                    distribution_id)\n        response = self.make_request('POST', uri,\n                                     {'Content-Type' : 'text/xml'},\n                                     data=paths.to_xml())\n        body = response.read()\n        if response.status == 201:\n            h = handler.XmlHandler(paths, self)\n            xml.sax.parseString(body, h)\n            return paths\n        else:\n            raise CloudFrontServerError(response.status, response.reason, body)\n\n    def invalidation_request_status (self, distribution_id, request_id, caller_reference=None):\n        uri = '/%s/distribution/%s/invalidation/%s' % (self.Version, distribution_id, request_id )\n        response = self.make_request('GET', uri, {'Content-Type' : 'text/xml'})\n        body = response.read()\n        if response.status == 200:\n            paths = InvalidationBatch([])\n            h = handler.XmlHandler(paths, self)\n            xml.sax.parseString(body, h)\n            return paths\n        else:\n            raise CloudFrontServerError(response.status, response.reason, body)\n\n\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/cloudfront/distribution.py",
    "content": "# Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nimport uuid\nimport base64\nimport json\nfrom boto.cloudfront.identity import OriginAccessIdentity\nfrom boto.cloudfront.object import Object, StreamingObject\nfrom boto.cloudfront.signers import ActiveTrustedSigners, TrustedSigners\nfrom boto.cloudfront.logging import LoggingInfo\nfrom boto.cloudfront.origin import S3Origin, CustomOrigin\nfrom boto.s3.acl import ACL\n\nclass DistributionConfig:\n\n    def __init__(self, connection=None, origin=None, enabled=False,\n                 caller_reference='', cnames=None, comment='',\n                 trusted_signers=None, default_root_object=None,\n                 logging=None):\n        \"\"\"\n        :param origin: Origin information to associate with the\n                       distribution.  If your distribution will use\n                       an Amazon S3 origin, then this should be an\n                       S3Origin object. If your distribution will use\n                       a custom origin (non Amazon S3), then this\n                       should be a CustomOrigin object.\n        :type origin: :class:`boto.cloudfront.origin.S3Origin` or\n                      :class:`boto.cloudfront.origin.CustomOrigin`\n\n        :param enabled: Whether the distribution is enabled to accept\n                        end user requests for content.\n        :type enabled: bool\n        \n        :param caller_reference: A unique number that ensures the\n                                 request can't be replayed.  If no\n                                 caller_reference is provided, boto\n                                 will generate a type 4 UUID for use\n                                 as the caller reference.\n        :type enabled: str\n        \n        :param cnames: A CNAME alias you want to associate with this\n                       distribution. You can have up to 10 CNAME aliases\n                       per distribution.\n        :type enabled: array of str\n        \n        :param comment: Any comments you want to include about the\n                        distribution.\n        :type comment: str\n        \n        :param trusted_signers: Specifies any AWS accounts you want to\n                                permit to create signed URLs for private\n                                content. If you want the distribution to\n                                use signed URLs, this should contain a\n                                TrustedSigners object; if you want the\n                                distribution to use basic URLs, leave\n                                this None.\n        :type trusted_signers: :class`boto.cloudfront.signers.TrustedSigners`\n        \n        :param default_root_object: Designates a default root object.\n                                    Only include a DefaultRootObject value\n                                    if you are going to assign a default\n                                    root object for the distribution.\n        :type comment: str\n\n        :param logging: Controls whether access logs are written for the\n                        distribution. If you want to turn on access logs,\n                        this should contain a LoggingInfo object; otherwise\n                        it should contain None.\n        :type logging: :class`boto.cloudfront.logging.LoggingInfo`\n        \n        \"\"\"\n        self.connection = connection\n        self.origin = origin\n        self.enabled = enabled\n        if caller_reference:\n            self.caller_reference = caller_reference\n        else:\n            self.caller_reference = str(uuid.uuid4())\n        self.cnames = []\n        if cnames:\n            self.cnames = cnames\n        self.comment = comment\n        self.trusted_signers = trusted_signers\n        self.logging = None\n        self.default_root_object = default_root_object\n\n    def to_xml(self):\n        s = '<?xml version=\"1.0\" encoding=\"UTF-8\"?>\\n'\n        s += '<DistributionConfig xmlns=\"http://cloudfront.amazonaws.com/doc/2010-07-15/\">\\n'\n        if self.origin:\n            s += self.origin.to_xml()\n        s += '  <CallerReference>%s</CallerReference>\\n' % self.caller_reference\n        for cname in self.cnames:\n            s += '  <CNAME>%s</CNAME>\\n' % cname\n        if self.comment:\n            s += '  <Comment>%s</Comment>\\n' % self.comment\n        s += '  <Enabled>'\n        if self.enabled:\n            s += 'true'\n        else:\n            s += 'false'\n        s += '</Enabled>\\n'\n        if self.trusted_signers:\n            s += '<TrustedSigners>\\n'\n            for signer in self.trusted_signers:\n                if signer == 'Self':\n                    s += '  <Self></Self>\\n'\n                else:\n                    s += '  <AwsAccountNumber>%s</AwsAccountNumber>\\n' % signer\n            s += '</TrustedSigners>\\n'\n        if self.logging:\n            s += '<Logging>\\n'\n            s += '  <Bucket>%s</Bucket>\\n' % self.logging.bucket\n            s += '  <Prefix>%s</Prefix>\\n' % self.logging.prefix\n            s += '</Logging>\\n'\n        if self.default_root_object:\n            dro = self.default_root_object\n            s += '<DefaultRootObject>%s</DefaultRootObject>\\n' % dro\n        s += '</DistributionConfig>\\n'\n        return s\n\n    def startElement(self, name, attrs, connection):\n        if name == 'TrustedSigners':\n            self.trusted_signers = TrustedSigners()\n            return self.trusted_signers\n        elif name == 'Logging':\n            self.logging = LoggingInfo()\n            return self.logging\n        elif name == 'S3Origin':\n            self.origin = S3Origin()\n            return self.origin\n        elif name == 'CustomOrigin':\n            self.origin = CustomOrigin()\n            return self.origin\n        else:\n            return None\n\n    def endElement(self, name, value, connection):\n        if name == 'CNAME':\n            self.cnames.append(value)\n        elif name == 'Comment':\n            self.comment = value\n        elif name == 'Enabled':\n            if value.lower() == 'true':\n                self.enabled = True\n            else:\n                self.enabled = False\n        elif name == 'CallerReference':\n            self.caller_reference = value\n        elif name == 'DefaultRootObject':\n            self.default_root_object = value\n        else:\n            setattr(self, name, value)\n\nclass StreamingDistributionConfig(DistributionConfig):\n\n    def __init__(self, connection=None, origin='', enabled=False,\n                 caller_reference='', cnames=None, comment='',\n                 trusted_signers=None, logging=None):\n        DistributionConfig.__init__(self, connection=connection,\n                                    origin=origin, enabled=enabled,\n                                    caller_reference=caller_reference,\n                                    cnames=cnames, comment=comment,\n                                    trusted_signers=trusted_signers,\n                                    logging=logging)\n    def to_xml(self):\n        s = '<?xml version=\"1.0\" encoding=\"UTF-8\"?>\\n'\n        s += '<StreamingDistributionConfig xmlns=\"http://cloudfront.amazonaws.com/doc/2010-07-15/\">\\n'\n        if self.origin:\n            s += self.origin.to_xml()\n        s += '  <CallerReference>%s</CallerReference>\\n' % self.caller_reference\n        for cname in self.cnames:\n            s += '  <CNAME>%s</CNAME>\\n' % cname\n        if self.comment:\n            s += '  <Comment>%s</Comment>\\n' % self.comment\n        s += '  <Enabled>'\n        if self.enabled:\n            s += 'true'\n        else:\n            s += 'false'\n        s += '</Enabled>\\n'\n        if self.trusted_signers:\n            s += '<TrustedSigners>\\n'\n            for signer in self.trusted_signers:\n                if signer == 'Self':\n                    s += '  <Self/>\\n'\n                else:\n                    s += '  <AwsAccountNumber>%s</AwsAccountNumber>\\n' % signer\n            s += '</TrustedSigners>\\n'\n        if self.logging:\n            s += '<Logging>\\n'\n            s += '  <Bucket>%s</Bucket>\\n' % self.logging.bucket\n            s += '  <Prefix>%s</Prefix>\\n' % self.logging.prefix\n            s += '</Logging>\\n'\n        s += '</StreamingDistributionConfig>\\n'\n        return s\n\nclass DistributionSummary:\n\n    def __init__(self, connection=None, domain_name='', id='',\n                 last_modified_time=None, status='', origin=None,\n                 cname='', comment='', enabled=False):\n        self.connection = connection\n        self.domain_name = domain_name\n        self.id = id\n        self.last_modified_time = last_modified_time\n        self.status = status\n        self.origin = origin\n        self.enabled = enabled\n        self.cnames = []\n        if cname:\n            self.cnames.append(cname)\n        self.comment = comment\n        self.trusted_signers = None\n        self.etag = None\n        self.streaming = False\n\n    def startElement(self, name, attrs, connection):\n        if name == 'TrustedSigners':\n            self.trusted_signers = TrustedSigners()\n            return self.trusted_signers\n        elif name == 'S3Origin':\n            self.origin = S3Origin()\n            return self.origin\n        elif name == 'CustomOrigin':\n            self.origin = CustomOrigin()\n            return self.origin\n        return None\n\n    def endElement(self, name, value, connection):\n        if name == 'Id':\n            self.id = value\n        elif name == 'Status':\n            self.status = value\n        elif name == 'LastModifiedTime':\n            self.last_modified_time = value\n        elif name == 'DomainName':\n            self.domain_name = value\n        elif name == 'Origin':\n            self.origin = value\n        elif name == 'CNAME':\n            self.cnames.append(value)\n        elif name == 'Comment':\n            self.comment = value\n        elif name == 'Enabled':\n            if value.lower() == 'true':\n                self.enabled = True\n            else:\n                self.enabled = False\n        elif name == 'StreamingDistributionSummary':\n            self.streaming = True\n        else:\n            setattr(self, name, value)\n\n    def get_distribution(self):\n        return self.connection.get_distribution_info(self.id)\n\nclass StreamingDistributionSummary(DistributionSummary):\n\n    def get_distribution(self):\n        return self.connection.get_streaming_distribution_info(self.id)\n    \nclass Distribution:\n\n    def __init__(self, connection=None, config=None, domain_name='',\n                 id='', last_modified_time=None, status=''):\n        self.connection = connection\n        self.config = config\n        self.domain_name = domain_name\n        self.id = id\n        self.last_modified_time = last_modified_time\n        self.status = status\n        self.in_progress_invalidation_batches = 0\n        self.active_signers = None\n        self.etag = None\n        self._bucket = None\n        self._object_class = Object\n\n    def startElement(self, name, attrs, connection):\n        if name == 'DistributionConfig':\n            self.config = DistributionConfig()\n            return self.config\n        elif name == 'ActiveTrustedSigners':\n            self.active_signers = ActiveTrustedSigners()\n            return self.active_signers\n        else:\n            return None\n\n    def endElement(self, name, value, connection):\n        if name == 'Id':\n            self.id = value\n        elif name == 'LastModifiedTime':\n            self.last_modified_time = value\n        elif name == 'Status':\n            self.status = value\n        elif name == 'InProgressInvalidationBatches':\n            self.in_progress_invalidation_batches = int(value)\n        elif name == 'DomainName':\n            self.domain_name = value\n        else:\n            setattr(self, name, value)\n\n    def update(self, enabled=None, cnames=None, comment=None):\n        \"\"\"\n        Update the configuration of the Distribution.  The only values\n        of the DistributionConfig that can be directly updated are:\n\n         * CNAMES\n         * Comment\n         * Whether the Distribution is enabled or not\n\n        Any changes to the ``trusted_signers`` or ``origin`` properties of\n        this distribution's current config object will also be included in\n        the update. Therefore, to set the origin access identity for this\n        distribution, set ``Distribution.config.origin.origin_access_identity``\n        before calling this update method.\n\n        :type enabled: bool\n        :param enabled: Whether the Distribution is active or not.\n\n        :type cnames: list of str\n        :param cnames: The DNS CNAME's associated with this\n                        Distribution.  Maximum of 10 values.\n\n        :type comment: str or unicode\n        :param comment: The comment associated with the Distribution.\n\n        \"\"\"\n        new_config = DistributionConfig(self.connection, self.config.origin,\n                                        self.config.enabled, self.config.caller_reference,\n                                        self.config.cnames, self.config.comment,\n                                        self.config.trusted_signers,\n                                        self.config.default_root_object)\n        if enabled != None:\n            new_config.enabled = enabled\n        if cnames != None:\n            new_config.cnames = cnames\n        if comment != None:\n            new_config.comment = comment\n        self.etag = self.connection.set_distribution_config(self.id, self.etag, new_config)\n        self.config = new_config\n        self._object_class = Object\n\n    def enable(self):\n        \"\"\"\n        Deactivate the Distribution.  A convenience wrapper around\n        the update method.\n        \"\"\"\n        self.update(enabled=True)\n\n    def disable(self):\n        \"\"\"\n        Activate the Distribution.  A convenience wrapper around\n        the update method.\n        \"\"\"\n        self.update(enabled=False)\n\n    def delete(self):\n        \"\"\"\n        Delete this CloudFront Distribution.  The content\n        associated with the Distribution is not deleted from\n        the underlying Origin bucket in S3.\n        \"\"\"\n        self.connection.delete_distribution(self.id, self.etag)\n\n    def _get_bucket(self):\n        if isinstance(self.config.origin, S3Origin):\n            if not self._bucket:\n                bucket_dns_name = self.config.origin.dns_name\n                bucket_name = bucket_dns_name.replace('.s3.amazonaws.com', '')\n                from boto.s3.connection import S3Connection\n                s3 = S3Connection(self.connection.aws_access_key_id,\n                                  self.connection.aws_secret_access_key,\n                                  proxy=self.connection.proxy,\n                                  proxy_port=self.connection.proxy_port,\n                                  proxy_user=self.connection.proxy_user,\n                                  proxy_pass=self.connection.proxy_pass)\n                self._bucket = s3.get_bucket(bucket_name)\n                self._bucket.distribution = self\n                self._bucket.set_key_class(self._object_class)\n            return self._bucket\n        else:\n            raise NotImplementedError('Unable to get_objects on CustomOrigin')\n    \n    def get_objects(self):\n        \"\"\"\n        Return a list of all content objects in this distribution.\n        \n        :rtype: list of :class:`boto.cloudfront.object.Object`\n        :return: The content objects\n        \"\"\"\n        bucket = self._get_bucket()\n        objs = []\n        for key in bucket:\n            objs.append(key)\n        return objs\n\n    def set_permissions(self, object, replace=False):\n        \"\"\"\n        Sets the S3 ACL grants for the given object to the appropriate\n        value based on the type of Distribution.  If the Distribution\n        is serving private content the ACL will be set to include the\n        Origin Access Identity associated with the Distribution.  If\n        the Distribution is serving public content the content will\n        be set up with \"public-read\".\n\n        :type object: :class:`boto.cloudfront.object.Object`\n        :param enabled: The Object whose ACL is being set\n\n        :type replace: bool\n        :param replace: If False, the Origin Access Identity will be\n                        appended to the existing ACL for the object.\n                        If True, the ACL for the object will be\n                        completely replaced with one that grants\n                        READ permission to the Origin Access Identity.\n\n        \"\"\"\n        if isinstance(self.config.origin, S3Origin):\n            if self.config.origin.origin_access_identity:\n                id = self.config.origin.origin_access_identity.split('/')[-1]\n                oai = self.connection.get_origin_access_identity_info(id)\n                policy = object.get_acl()\n                if replace:\n                    policy.acl = ACL()\n                policy.acl.add_user_grant('READ', oai.s3_user_id)\n                object.set_acl(policy)\n            else:\n                object.set_canned_acl('public-read')\n\n    def set_permissions_all(self, replace=False):\n        \"\"\"\n        Sets the S3 ACL grants for all objects in the Distribution\n        to the appropriate value based on the type of Distribution.\n\n        :type replace: bool\n        :param replace: If False, the Origin Access Identity will be\n                        appended to the existing ACL for the object.\n                        If True, the ACL for the object will be\n                        completely replaced with one that grants\n                        READ permission to the Origin Access Identity.\n\n        \"\"\"\n        bucket = self._get_bucket()\n        for key in bucket:\n            self.set_permissions(key, replace)\n\n    def add_object(self, name, content, headers=None, replace=True):\n        \"\"\"\n        Adds a new content object to the Distribution.  The content\n        for the object will be copied to a new Key in the S3 Bucket\n        and the permissions will be set appropriately for the type\n        of Distribution.\n\n        :type name: str or unicode\n        :param name: The name or key of the new object.\n\n        :type content: file-like object\n        :param content: A file-like object that contains the content\n                        for the new object.\n\n        :type headers: dict\n        :param headers: A dictionary containing additional headers\n                        you would like associated with the new\n                        object in S3.\n\n        :rtype: :class:`boto.cloudfront.object.Object`\n        :return: The newly created object.\n        \"\"\"\n        if self.config.origin.origin_access_identity:\n            policy = 'private'\n        else:\n            policy = 'public-read'\n        bucket = self._get_bucket()\n        object = bucket.new_key(name)\n        object.set_contents_from_file(content, headers=headers, policy=policy)\n        if self.config.origin.origin_access_identity:\n            self.set_permissions(object, replace)\n        return object\n\n    def create_signed_url(self, url, keypair_id,\n                          expire_time=None, valid_after_time=None,\n                          ip_address=None, policy_url=None,\n                          private_key_file=None, private_key_string=None):\n        \"\"\"\n        Creates a signed CloudFront URL that is only valid within the specified\n        parameters.\n\n        :type url: str\n        :param url: The URL of the protected object.\n\n        :type keypair_id: str\n        :param keypair_id: The keypair ID of the Amazon KeyPair used to sign\n                           theURL.  This ID MUST correspond to the private key\n                           specified with private_key_file or\n                           private_key_string.\n\n        :type expire_time: int\n        :param expire_time: The expiry time of the URL. If provided, the URL\n                            will expire after the time has passed. If not\n                            provided the URL will never expire. Format is a\n                            unix epoch. Use time.time() + duration_in_sec.\n\n        :type valid_after_time: int\n        :param valid_after_time: If provided, the URL will not be valid until\n                                 after valid_after_time. Format is a unix\n                                 epoch. Use time.time() + secs_until_valid.\n\n        :type ip_address: str\n        :param ip_address: If provided, only allows access from the specified\n                           IP address.  Use '192.168.0.10' for a single IP or\n                           use '192.168.0.0/24' CIDR notation for a subnet.\n\n        :type policy_url: str\n        :param policy_url: If provided, allows the signature to contain\n                           wildcard globs in the URL.  For example, you could\n                           provide: 'http://example.com/media/*' and the policy\n                           and signature would allow access to all contents of\n                           the media subdirectory.  If not specified, only\n                           allow access to the exact url provided in 'url'.\n\n        :type private_key_file: str or file object.\n        :param private_key_file: If provided, contains the filename of the\n                                 private key file used for signing or an open\n                                 file object containing the private key\n                                 contents.  Only one of private_key_file or\n                                 private_key_string can be provided.\n\n        :type private_key_string: str\n        :param private_key_string: If provided, contains the private key string\n                                   used for signing. Only one of\n                                   private_key_file or private_key_string can\n                                   be provided.\n\n        :rtype: str\n        :return: The signed URL.\n        \"\"\"\n        # Get the required parameters\n        params = self._create_signing_params(\n                     url=url, keypair_id=keypair_id, expire_time=expire_time,\n                     valid_after_time=valid_after_time, ip_address=ip_address,\n                     policy_url=policy_url, private_key_file=private_key_file,\n                     private_key_string=private_key_string)\n\n        #combine these into a full url\n        if \"?\" in url:\n            sep = \"&\"\n        else:\n            sep = \"?\"\n        signed_url_params = []\n        for key in [\"Expires\", \"Policy\", \"Signature\", \"Key-Pair-Id\"]:\n            if key in params:\n                param = \"%s=%s\" % (key, params[key])\n                signed_url_params.append(param)\n        signed_url = url + sep + \"&\".join(signed_url_params)\n        return signed_url\n\n    def _create_signing_params(self, url, keypair_id,\n                          expire_time=None, valid_after_time=None,\n                          ip_address=None, policy_url=None,\n                          private_key_file=None, private_key_string=None):\n        \"\"\"\n        Creates the required URL parameters for a signed URL.\n        \"\"\"\n        params = {}\n        # Check if we can use a canned policy\n        if expire_time and not valid_after_time and not ip_address and not policy_url:\n            # we manually construct this policy string to ensure formatting\n            # matches signature\n            policy = self._canned_policy(url, expire_time)\n            params[\"Expires\"] = str(expire_time)\n        else:\n            # If no policy_url is specified, default to the full url.\n            if policy_url is None:\n                policy_url = url\n            # Can't use canned policy\n            policy = self._custom_policy(policy_url, expires=None,\n                                         valid_after=None,\n                                         ip_address=None)\n            encoded_policy = self._url_base64_encode(policy)\n            params[\"Policy\"] = encoded_policy\n        #sign the policy\n        signature = self._sign_string(policy, private_key_file, private_key_string)\n        #now base64 encode the signature (URL safe as well)\n        encoded_signature = self._url_base64_encode(signature)\n        params[\"Signature\"] = encoded_signature\n        params[\"Key-Pair-Id\"] = keypair_id\n        return params\n\n    @staticmethod\n    def _canned_policy(resource, expires):\n        \"\"\"\n        Creates a canned policy string.\n        \"\"\"\n        policy = ('{\"Statement\":[{\"Resource\":\"%(resource)s\",'\n                  '\"Condition\":{\"DateLessThan\":{\"AWS:EpochTime\":'\n                  '%(expires)s}}}]}' % locals())\n        return policy\n\n    @staticmethod\n    def _custom_policy(resource, expires=None, valid_after=None, ip_address=None):\n        \"\"\"\n        Creates a custom policy string based on the supplied parameters.\n        \"\"\"\n        condition = {}\n        if expires:\n            condition[\"DateLessThan\"] = {\"AWS:EpochTime\": expires}\n        if valid_after:\n            condition[\"DateGreaterThan\"] = {\"AWS:EpochTime\": valid_after}\n        if ip_address:\n            if '/' not in ip_address:\n                ip_address += \"/32\"\n            condition[\"IpAddress\"] = {\"AWS:SourceIp\": ip_address}\n        policy = {\"Statement\": [{\n                     \"Resource\": resource,\n                     \"Condition\": condition}]}\n        return json.dumps(policy, separators=(\",\", \":\"))\n\n    @staticmethod\n    def _sign_string(message, private_key_file=None, private_key_string=None):\n        \"\"\"\n        Signs a string for use with Amazon CloudFront.  Requires the M2Crypto\n        library be installed.\n        \"\"\"\n        try:\n            from M2Crypto import EVP\n        except ImportError:\n            raise NotImplementedError(\"Boto depends on the python M2Crypto \"\n                                      \"library to generate signed URLs for \"\n                                      \"CloudFront\")\n        # Make sure only one of private_key_file and private_key_string is set\n        if private_key_file and private_key_string:\n            raise ValueError(\"Only specify the private_key_file or the private_key_string not both\")\n        if not private_key_file and not private_key_string:\n            raise ValueError(\"You must specify one of private_key_file or private_key_string\")\n        # if private_key_file is a file object read the key string from there\n        if isinstance(private_key_file, file):\n            private_key_string = private_key_file.read()\n        # Now load key and calculate signature\n        if private_key_string:\n            key = EVP.load_key_string(private_key_string)\n        else:\n            key = EVP.load_key(private_key_file)\n        key.reset_context(md='sha1')\n        key.sign_init()\n        key.sign_update(str(message))\n        signature = key.sign_final()\n        return signature\n\n    @staticmethod\n    def _url_base64_encode(msg):\n        \"\"\"\n        Base64 encodes a string using the URL-safe characters specified by\n        Amazon.\n        \"\"\"\n        msg_base64 = base64.b64encode(msg)\n        msg_base64 = msg_base64.replace('+', '-')\n        msg_base64 = msg_base64.replace('=', '_')\n        msg_base64 = msg_base64.replace('/', '~')\n        return msg_base64\n\nclass StreamingDistribution(Distribution):\n\n    def __init__(self, connection=None, config=None, domain_name='',\n                 id='', last_modified_time=None, status=''):\n        Distribution.__init__(self, connection, config, domain_name,\n                              id, last_modified_time, status)\n        self._object_class = StreamingObject\n\n    def startElement(self, name, attrs, connection):\n        if name == 'StreamingDistributionConfig':\n            self.config = StreamingDistributionConfig()\n            return self.config\n        else:\n            return Distribution.startElement(self, name, attrs, connection)\n\n    def update(self, enabled=None, cnames=None, comment=None):\n        \"\"\"\n        Update the configuration of the StreamingDistribution.  The only values\n        of the StreamingDistributionConfig that can be directly updated are:\n\n         * CNAMES\n         * Comment\n         * Whether the Distribution is enabled or not\n\n        Any changes to the ``trusted_signers`` or ``origin`` properties of\n        this distribution's current config object will also be included in\n        the update. Therefore, to set the origin access identity for this\n        distribution, set\n        ``StreamingDistribution.config.origin.origin_access_identity``\n        before calling this update method.\n\n        :type enabled: bool\n        :param enabled: Whether the StreamingDistribution is active or not.\n\n        :type cnames: list of str\n        :param cnames: The DNS CNAME's associated with this\n                        Distribution.  Maximum of 10 values.\n\n        :type comment: str or unicode\n        :param comment: The comment associated with the Distribution.\n\n        \"\"\"\n        new_config = StreamingDistributionConfig(self.connection,\n                                                 self.config.origin,\n                                                 self.config.enabled,\n                                                 self.config.caller_reference,\n                                                 self.config.cnames,\n                                                 self.config.comment,\n                                                 self.config.trusted_signers)\n        if enabled != None:\n            new_config.enabled = enabled\n        if cnames != None:\n            new_config.cnames = cnames\n        if comment != None:\n            new_config.comment = comment\n        self.etag = self.connection.set_streaming_distribution_config(self.id,\n                                                                      self.etag,\n                                                                      new_config)\n        self.config = new_config\n        self._object_class = StreamingObject\n\n    def delete(self):\n        self.connection.delete_streaming_distribution(self.id, self.etag)\n            \n        \n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/cloudfront/exception.py",
    "content": "# Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nfrom boto.exception import BotoServerError\n\nclass CloudFrontServerError(BotoServerError):\n\n    pass\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/cloudfront/identity.py",
    "content": "# Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nimport uuid\n\nclass OriginAccessIdentity:\n\n    def __init__(self, connection=None, config=None, id='',\n                 s3_user_id='', comment=''):\n        self.connection = connection\n        self.config = config\n        self.id = id\n        self.s3_user_id = s3_user_id\n        self.comment = comment\n        self.etag = None\n        \n    def startElement(self, name, attrs, connection):\n        if name == 'CloudFrontOriginAccessIdentityConfig':\n            self.config = OriginAccessIdentityConfig()\n            return self.config\n        else:\n            return None\n\n    def endElement(self, name, value, connection):\n        if name == 'Id':\n            self.id = value\n        elif name == 'S3CanonicalUserId':\n            self.s3_user_id = value\n        elif name == 'Comment':\n            self.comment = value\n        else:\n            setattr(self, name, value)\n\n    def update(self, comment=None):\n        new_config = OriginAccessIdentityConfig(self.connection,\n                                                self.config.caller_reference,\n                                                self.config.comment)\n        if comment != None:\n            new_config.comment = comment\n        self.etag = self.connection.set_origin_identity_config(self.id, self.etag, new_config)\n        self.config = new_config\n\n    def delete(self):\n        return self.connection.delete_origin_access_identity(self.id, self.etag)\n\n    def uri(self):\n        return 'origin-access-identity/cloudfront/%s' % self.id\n            \nclass OriginAccessIdentityConfig:\n\n    def __init__(self, connection=None, caller_reference='', comment=''):\n        self.connection = connection\n        if caller_reference:\n            self.caller_reference = caller_reference\n        else:\n            self.caller_reference = str(uuid.uuid4())\n        self.comment = comment\n\n    def to_xml(self):\n        s = '<?xml version=\"1.0\" encoding=\"UTF-8\"?>\\n'\n        s += '<CloudFrontOriginAccessIdentityConfig xmlns=\"http://cloudfront.amazonaws.com/doc/2009-09-09/\">\\n'\n        s += '  <CallerReference>%s</CallerReference>\\n' % self.caller_reference\n        if self.comment:\n            s += '  <Comment>%s</Comment>\\n' % self.comment\n        s += '</CloudFrontOriginAccessIdentityConfig>\\n'\n        return s\n\n    def startElement(self, name, attrs, connection):\n        return None\n\n    def endElement(self, name, value, connection):\n        if name == 'Comment':\n            self.comment = value\n        elif name == 'CallerReference':\n            self.caller_reference = value\n        else:\n            setattr(self, name, value)\n\nclass OriginAccessIdentitySummary:\n\n    def __init__(self, connection=None, id='',\n                 s3_user_id='', comment=''):\n        self.connection = connection\n        self.id = id\n        self.s3_user_id = s3_user_id\n        self.comment = comment\n        self.etag = None\n        \n    def startElement(self, name, attrs, connection):\n        return None\n\n    def endElement(self, name, value, connection):\n        if name == 'Id':\n            self.id = value\n        elif name == 'S3CanonicalUserId':\n            self.s3_user_id = value\n        elif name == 'Comment':\n            self.comment = value\n        else:\n            setattr(self, name, value)\n\n    def get_origin_access_identity(self):\n        return self.connection.get_origin_access_identity_info(self.id)\n    \n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/cloudfront/invalidation.py",
    "content": "# Copyright (c) 2006-2010 Chris Moyer http://coredumped.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nimport uuid\nimport urllib\n\nclass InvalidationBatch(object):\n    \"\"\"A simple invalidation request.\n        :see: http://docs.amazonwebservices.com/AmazonCloudFront/2010-08-01/APIReference/index.html?InvalidationBatchDatatype.html\n    \"\"\"\n\n    def __init__(self, paths=None, connection=None, distribution=None, caller_reference=''):\n        \"\"\"Create a new invalidation request:\n            :paths: An array of paths to invalidate\n        \"\"\"\n        self.paths = paths or []\n        self.distribution = distribution\n        self.caller_reference = caller_reference\n        if not self.caller_reference:\n            self.caller_reference = str(uuid.uuid4())\n\n        # If we passed in a distribution,\n        # then we use that as the connection object\n        if distribution:\n            self.connection = connection\n        else:\n            self.connection = connection\n\n    def add(self, path):\n        \"\"\"Add another path to this invalidation request\"\"\"\n        return self.paths.append(path)\n\n    def remove(self, path):\n        \"\"\"Remove a path from this invalidation request\"\"\"\n        return self.paths.remove(path)\n\n    def __iter__(self):\n        return iter(self.paths)\n\n    def __getitem__(self, i):\n        return self.paths[i]\n\n    def __setitem__(self, k, v):\n        self.paths[k] = v\n\n    def escape(self, p):\n        \"\"\"Escape a path, make sure it begins with a slash and contains no invalid characters\"\"\"\n        if not p[0] == \"/\":\n            p = \"/%s\" % p\n        return urllib.quote(p)\n\n    def to_xml(self):\n        \"\"\"Get this batch as XML\"\"\"\n        assert self.connection != None\n        s = '<?xml version=\"1.0\" encoding=\"UTF-8\"?>\\n'\n        s += '<InvalidationBatch xmlns=\"http://cloudfront.amazonaws.com/doc/%s/\">\\n' % self.connection.Version\n        for p in self.paths:\n            s += '    <Path>%s</Path>\\n' % self.escape(p)\n        s += '    <CallerReference>%s</CallerReference>\\n' % self.caller_reference\n        s += '</InvalidationBatch>\\n'\n        return s\n\n    def startElement(self, name, attrs, connection):\n        if name == \"InvalidationBatch\":\n            self.paths = []\n        return None\n\n    def endElement(self, name, value, connection):\n        if name == 'Path':\n            self.paths.append(value)\n        elif name == \"Status\":\n            self.status = value\n        elif name == \"Id\":\n            self.id = value\n        elif name == \"CreateTime\":\n            self.create_time = value\n        elif name == \"CallerReference\":\n            self.caller_reference = value\n        return None\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/cloudfront/logging.py",
    "content": "# Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nclass LoggingInfo(object):\n\n    def __init__(self, bucket='', prefix=''):\n        self.bucket = bucket\n        self.prefix = prefix\n    \n    def startElement(self, name, attrs, connection):\n        return None\n\n    def endElement(self, name, value, connection):\n        if name == 'Bucket':\n            self.bucket = value\n        elif name == 'Prefix':\n            self.prefix = value\n        else:\n            setattr(self, name, value)\n            \n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/cloudfront/object.py",
    "content": "# Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nfrom boto.s3.key import Key\n\nclass Object(Key):\n\n    def __init__(self, bucket, name=None):\n        Key.__init__(self, bucket, name=name)\n        self.distribution = bucket.distribution\n\n    def __repr__(self):\n        return '<Object: %s/%s>' % (self.distribution.config.origin, self.name)\n\n    def url(self, scheme='http'):\n        url = '%s://' % scheme\n        url += self.distribution.domain_name\n        if scheme.lower().startswith('rtmp'):\n            url += '/cfx/st/'\n        else:\n            url += '/'\n        url += self.name\n        return url\n\nclass StreamingObject(Object):\n\n    def url(self, scheme='rtmp'):\n        return Object.url(self, scheme)\n\n        \n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/cloudfront/origin.py",
    "content": "# Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/\n# Copyright (c) 2010, Eucalyptus Systems, Inc.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nfrom identity import OriginAccessIdentity\n\ndef get_oai_value(origin_access_identity):\n    if isinstance(origin_access_identity, OriginAccessIdentity):\n        return origin_access_identity.uri()\n    else:\n        return origin_access_identity\n                \nclass S3Origin(object):\n    \"\"\"\n    Origin information to associate with the distribution.\n    If your distribution will use an Amazon S3 origin,\n    then you use the S3Origin element.\n    \"\"\"\n\n    def __init__(self, dns_name=None, origin_access_identity=None):\n        \"\"\"\n        :param dns_name: The DNS name of your Amazon S3 bucket to\n                         associate with the distribution.\n                         For example: mybucket.s3.amazonaws.com.\n        :type dns_name: str\n        \n        :param origin_access_identity: The CloudFront origin access\n                                       identity to associate with the\n                                       distribution. If you want the\n                                       distribution to serve private content,\n                                       include this element; if you want the\n                                       distribution to serve public content,\n                                       remove this element.\n        :type origin_access_identity: str\n        \n        \"\"\"\n        self.dns_name = dns_name\n        self.origin_access_identity = origin_access_identity\n\n    def __repr__(self):\n        return '<S3Origin: %s>' % self.dns_name\n\n    def startElement(self, name, attrs, connection):\n        return None\n\n    def endElement(self, name, value, connection):\n        if name == 'DNSName':\n            self.dns_name = value\n        elif name == 'OriginAccessIdentity':\n            self.origin_access_identity = value\n        else:\n            setattr(self, name, value)\n\n    def to_xml(self):\n        s = '  <S3Origin>\\n'\n        s += '    <DNSName>%s</DNSName>\\n' % self.dns_name\n        if self.origin_access_identity:\n            val = get_oai_value(self.origin_access_identity)\n            s += '    <OriginAccessIdentity>%s</OriginAccessIdentity>\\n' % val\n        s += '  </S3Origin>\\n'\n        return s\n    \nclass CustomOrigin(object):\n    \"\"\"\n    Origin information to associate with the distribution.\n    If your distribution will use a non-Amazon S3 origin,\n    then you use the CustomOrigin element.\n    \"\"\"\n\n    def __init__(self, dns_name=None, http_port=80, https_port=443,\n                 origin_protocol_policy=None):\n        \"\"\"\n        :param dns_name: The DNS name of your Amazon S3 bucket to\n                         associate with the distribution.\n                         For example: mybucket.s3.amazonaws.com.\n        :type dns_name: str\n        \n        :param http_port: The HTTP port the custom origin listens on.\n        :type http_port: int\n        \n        :param https_port: The HTTPS port the custom origin listens on.\n        :type http_port: int\n        \n        :param origin_protocol_policy: The origin protocol policy to\n                                       apply to your origin. If you\n                                       specify http-only, CloudFront\n                                       will use HTTP only to access the origin.\n                                       If you specify match-viewer, CloudFront\n                                       will fetch from your origin using HTTP\n                                       or HTTPS, based on the protocol of the\n                                       viewer request.\n        :type origin_protocol_policy: str\n        \n        \"\"\"\n        self.dns_name = dns_name\n        self.http_port = http_port\n        self.https_port = https_port\n        self.origin_protocol_policy = origin_protocol_policy\n\n    def __repr__(self):\n        return '<CustomOrigin: %s>' % self.dns_name\n\n    def startElement(self, name, attrs, connection):\n        return None\n\n    def endElement(self, name, value, connection):\n        if name == 'DNSName':\n            self.dns_name = value\n        elif name == 'HTTPPort':\n            try:\n                self.http_port = int(value)\n            except ValueError:\n                self.http_port = value\n        elif name == 'HTTPSPort':\n            try:\n                self.https_port = int(value)\n            except ValueError:\n                self.https_port = value\n        elif name == 'OriginProtocolPolicy':\n            self.origin_protocol_policy = value\n        else:\n            setattr(self, name, value)\n\n    def to_xml(self):\n        s = '  <CustomOrigin>\\n'\n        s += '    <DNSName>%s</DNSName>\\n' % self.dns_name\n        s += '    <HTTPPort>%d</HTTPPort>\\n' % self.http_port\n        s += '    <HTTPSPort>%d</HTTPSPort>\\n' % self.https_port\n        s += '    <OriginProtocolPolicy>%s</OriginProtocolPolicy>\\n' % self.origin_protocol_policy\n        s += '  </CustomOrigin>\\n'\n        return s\n    \n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/cloudfront/signers.py",
    "content": "# Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nclass Signer:\n\n    def __init__(self):\n        self.id = None\n        self.key_pair_ids = []\n        \n    def startElement(self, name, attrs, connection):\n        return None\n\n    def endElement(self, name, value, connection):\n        if name == 'Self':\n            self.id = 'Self'\n        elif name == 'AwsAccountNumber':\n            self.id = value\n        elif name == 'KeyPairId':\n            self.key_pair_ids.append(value)\n            \nclass ActiveTrustedSigners(list):\n\n    def startElement(self, name, attrs, connection):\n        if name == 'Signer':\n            s = Signer()\n            self.append(s)\n            return s\n\n    def endElement(self, name, value, connection):\n        pass\n\nclass TrustedSigners(list):\n\n    def startElement(self, name, attrs, connection):\n        return None\n\n    def endElement(self, name, value, connection):\n        if name == 'Self':\n            self.append(name)\n        elif name == 'AwsAccountNumber':\n            self.append(value)\n\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/connection.py",
    "content": "# Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/\n# Copyright (c) 2010 Google\n# Copyright (c) 2008 rPath, Inc.\n# Copyright (c) 2009 The Echo Nest Corporation\n# Copyright (c) 2010, Eucalyptus Systems, Inc.\n# Copyright (c) 2011, Nexenta Systems Inc.\n# All rights reserved.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\n#\n# Parts of this code were copied or derived from sample code supplied by AWS.\n# The following notice applies to that code.\n#\n#  This software code is made available \"AS IS\" without warranties of any\n#  kind.  You may copy, display, modify and redistribute the software\n#  code either by itself or as incorporated into your code; provided that\n#  you do not remove any proprietary notices.  Your use of this software\n#  code is at your own risk and you waive any claim against Amazon\n#  Digital Services, Inc. or its affiliates with respect to your use of\n#  this software code. (c) 2006 Amazon Digital Services, Inc. or its\n#  affiliates.\n\n\"\"\"\nHandles basic connections to AWS\n\"\"\"\n\nfrom __future__ import with_statement\nimport base64\nimport errno\nimport httplib\nimport os\nimport Queue\nimport random\nimport re\nimport socket\nimport sys\nimport time\nimport urllib, urlparse\nimport xml.sax\n\nimport auth\nimport auth_handler\nimport boto\nimport boto.utils\nimport boto.handler\nimport boto.cacerts\n\nfrom boto import config, UserAgent\nfrom boto.exception import AWSConnectionError, BotoClientError, BotoServerError\nfrom boto.provider import Provider\nfrom boto.resultset import ResultSet\n\nHAVE_HTTPS_CONNECTION = False\ntry:\n    import ssl\n    from boto import https_connection\n    # Google App Engine runs on Python 2.5 so doesn't have ssl.SSLError.\n    if hasattr(ssl, 'SSLError'):\n        HAVE_HTTPS_CONNECTION = True\nexcept ImportError:\n    pass\n\ntry:\n    import threading\nexcept ImportError:\n    import dummy_threading as threading\n\nON_APP_ENGINE = all(key in os.environ for key in (\n    'USER_IS_ADMIN', 'CURRENT_VERSION_ID', 'APPLICATION_ID'))\n\nPORTS_BY_SECURITY = { True: 443, False: 80 }\n\nDEFAULT_CA_CERTS_FILE = os.path.join(\n        os.path.dirname(os.path.abspath(boto.cacerts.__file__ )), \"cacerts.txt\")\n\nclass HostConnectionPool(object):\n\n    \"\"\"\n    A pool of connections for one remote (host,is_secure).\n\n    When connections are added to the pool, they are put into a\n    pending queue.  The _mexe method returns connections to the pool\n    before the response body has been read, so they connections aren't\n    ready to send another request yet.  They stay in the pending queue\n    until they are ready for another request, at which point they are\n    returned to the pool of ready connections.\n\n    The pool of ready connections is an ordered list of\n    (connection,time) pairs, where the time is the time the connection\n    was returned from _mexe.  After a certain period of time,\n    connections are considered stale, and discarded rather than being\n    reused.  This saves having to wait for the connection to time out\n    if AWS has decided to close it on the other end because of\n    inactivity.\n\n    Thread Safety:\n\n        This class is used only fram ConnectionPool while it's mutex\n        is held.\n    \"\"\"\n\n    def __init__(self):\n        self.queue = []\n\n    def size(self):\n        \"\"\"\n        Returns the number of connections in the pool for this host.\n        Some of the connections may still be in use, and may not be\n        ready to be returned by get().\n        \"\"\"\n        return len(self.queue)\n    \n    def put(self, conn):\n        \"\"\"\n        Adds a connection to the pool, along with the time it was\n        added.\n        \"\"\"\n        self.queue.append((conn, time.time()))\n\n    def get(self):\n        \"\"\"\n        Returns the next connection in this pool that is ready to be\n        reused.  Returns None of there aren't any.\n        \"\"\"\n        # Discard ready connections that are too old.\n        self.clean()\n\n        # Return the first connection that is ready, and remove it\n        # from the queue.  Connections that aren't ready are returned\n        # to the end of the queue with an updated time, on the\n        # assumption that somebody is actively reading the response.\n        for _ in range(len(self.queue)):\n            (conn, _) = self.queue.pop(0)\n            if self._conn_ready(conn):\n                return conn\n            else:\n                self.put(conn)\n        return None\n\n    def _conn_ready(self, conn):\n        \"\"\"\n        There is a nice state diagram at the top of httplib.py.  It\n        indicates that once the response headers have been read (which\n        _mexe does before adding the connection to the pool), a\n        response is attached to the connection, and it stays there\n        until it's done reading.  This isn't entirely true: even after\n        the client is done reading, the response may be closed, but\n        not removed from the connection yet.\n\n        This is ugly, reading a private instance variable, but the\n        state we care about isn't available in any public methods.\n        \"\"\"\n        if ON_APP_ENGINE:\n            # Google App Engine implementation of HTTPConnection doesn't contain\n            # _HTTPConnection__response attribute. Moreover, it's not possible\n            # to determine if given connection is ready. Reusing connections\n            # simply doesn't make sense with App Engine urlfetch service.\n            return False\n        else:\n            response = conn._HTTPConnection__response\n            return (response is None) or response.isclosed()\n\n    def clean(self):\n        \"\"\"\n        Get rid of stale connections.\n        \"\"\"\n        # Note that we do not close the connection here -- somebody\n        # may still be reading from it.\n        while len(self.queue) > 0 and self._pair_stale(self.queue[0]):\n            self.queue.pop(0)\n\n    def _pair_stale(self, pair):\n        \"\"\"\n        Returns true of the (connection,time) pair is too old to be\n        used.\n        \"\"\"\n        (_conn, return_time) = pair\n        now = time.time()\n        return return_time + ConnectionPool.STALE_DURATION < now\n\nclass ConnectionPool(object):\n\n    \"\"\"\n    A connection pool that expires connections after a fixed period of\n    time.  This saves time spent waiting for a connection that AWS has\n    timed out on the other end.\n\n    This class is thread-safe.\n    \"\"\"\n\n    #\n    # The amout of time between calls to clean.\n    #\n    \n    CLEAN_INTERVAL = 5.0\n\n    #\n    # How long before a connection becomes \"stale\" and won't be reused\n    # again.  The intention is that this time is less that the timeout\n    # period that AWS uses, so we'll never try to reuse a connection\n    # and find that AWS is timing it out.\n    #\n    # Experimentation in July 2011 shows that AWS starts timing things\n    # out after three minutes.  The 60 seconds here is conservative so\n    # we should never hit that 3-minute timout.\n    #\n\n    STALE_DURATION = 60.0\n\n    def __init__(self):\n        # Mapping from (host,is_secure) to HostConnectionPool.\n        # If a pool becomes empty, it is removed.\n        self.host_to_pool = {}\n        # The last time the pool was cleaned.\n        self.last_clean_time = 0.0\n        self.mutex = threading.Lock()\n\n    def size(self):\n        \"\"\"\n        Returns the number of connections in the pool.\n        \"\"\"\n        return sum(pool.size() for pool in self.host_to_pool.values())\n\n    def get_http_connection(self, host, is_secure):\n        \"\"\"\n        Gets a connection from the pool for the named host.  Returns\n        None if there is no connection that can be reused.\n        \"\"\"\n        self.clean()\n        with self.mutex:\n            key = (host, is_secure)\n            if key not in self.host_to_pool:\n                return None\n            return self.host_to_pool[key].get()\n\n    def put_http_connection(self, host, is_secure, conn):\n        \"\"\"\n        Adds a connection to the pool of connections that can be\n        reused for the named host.\n        \"\"\"\n        with self.mutex:\n            key = (host, is_secure)\n            if key not in self.host_to_pool:\n                self.host_to_pool[key] = HostConnectionPool()\n            self.host_to_pool[key].put(conn)\n\n    def clean(self):\n        \"\"\"\n        Clean up the stale connections in all of the pools, and then\n        get rid of empty pools.  Pools clean themselves every time a\n        connection is fetched; this cleaning takes care of pools that\n        aren't being used any more, so nothing is being gotten from\n        them. \n        \"\"\"\n        with self.mutex:\n            now = time.time()\n            if self.last_clean_time + self.CLEAN_INTERVAL < now:\n                to_remove = []\n                for (host, pool) in self.host_to_pool.items():\n                    pool.clean()\n                    if pool.size() == 0:\n                        to_remove.append(host)\n                for host in to_remove:\n                    del self.host_to_pool[host]\n                self.last_clean_time = now\n\nclass HTTPRequest(object):\n\n    def __init__(self, method, protocol, host, port, path, auth_path,\n                 params, headers, body):\n        \"\"\"Represents an HTTP request.\n\n        :type method: string\n        :param method: The HTTP method name, 'GET', 'POST', 'PUT' etc.\n\n        :type protocol: string\n        :param protocol: The http protocol used, 'http' or 'https'.\n\n        :type host: string\n        :param host: Host to which the request is addressed. eg. abc.com\n\n        :type port: int\n        :param port: port on which the request is being sent. Zero means unset,\n                     in which case default port will be chosen.\n\n        :type path: string\n        :param path: URL path that is bein accessed.\n\n        :type auth_path: string\n        :param path: The part of the URL path used when creating the\n                     authentication string.\n\n        :type params: dict\n        :param params: HTTP url query parameters, with key as name of the param,\n                       and value as value of param.\n\n        :type headers: dict\n        :param headers: HTTP headers, with key as name of the header and value\n                        as value of header.\n\n        :type body: string\n        :param body: Body of the HTTP request. If not present, will be None or\n                     empty string ('').\n        \"\"\"\n        self.method = method\n        self.protocol = protocol\n        self.host = host\n        self.port = port\n        self.path = path\n        if auth_path is None:\n            auth_path = path\n        self.auth_path = auth_path\n        self.params = params\n        # chunked Transfer-Encoding should act only on PUT request.\n        if headers and 'Transfer-Encoding' in headers and \\\n                headers['Transfer-Encoding'] == 'chunked' and \\\n                self.method != 'PUT':\n            self.headers = headers.copy()\n            del self.headers['Transfer-Encoding']\n        else:\n            self.headers = headers\n        self.body = body\n\n    def __str__(self):\n        return (('method:(%s) protocol:(%s) host(%s) port(%s) path(%s) '\n                 'params(%s) headers(%s) body(%s)') % (self.method,\n                 self.protocol, self.host, self.port, self.path, self.params,\n                 self.headers, self.body))\n\n    def authorize(self, connection, **kwargs):\n        for key in self.headers:\n            val = self.headers[key]\n            if isinstance(val, unicode):\n                self.headers[key] = urllib.quote_plus(val.encode('utf-8'))\n\n        connection._auth_handler.add_auth(self, **kwargs)\n\n        self.headers['User-Agent'] = UserAgent\n        # I'm not sure if this is still needed, now that add_auth is\n        # setting the content-length for POST requests.\n        if not self.headers.has_key('Content-Length'):\n            if not self.headers.has_key('Transfer-Encoding') or \\\n                    self.headers['Transfer-Encoding'] != 'chunked':\n                self.headers['Content-Length'] = str(len(self.body))\n\nclass AWSAuthConnection(object):\n    def __init__(self, host, aws_access_key_id=None, aws_secret_access_key=None,\n                 is_secure=True, port=None, proxy=None, proxy_port=None,\n                 proxy_user=None, proxy_pass=None, debug=0,\n                 https_connection_factory=None, path='/',\n                 provider='aws', security_token=None):\n        \"\"\"\n        :type host: str\n        :param host: The host to make the connection to\n\n        :keyword str aws_access_key_id: Your AWS Access Key ID (provided by\n            Amazon). If none is specified, the value in your\n            ``AWS_ACCESS_KEY_ID`` environmental variable is used.\n        :keyword str aws_secret_access_key: Your AWS Secret Access Key\n            (provided by Amazon). If none is specified, the value in your\n            ``AWS_SECRET_ACCESS_KEY`` environmental variable is used.\n\n        :type is_secure: boolean\n        :param is_secure: Whether the connection is over SSL\n\n        :type https_connection_factory: list or tuple\n        :param https_connection_factory: A pair of an HTTP connection\n                                         factory and the exceptions to catch.\n                                         The factory should have a similar\n                                         interface to L{httplib.HTTPSConnection}.\n\n        :param str proxy: Address/hostname for a proxy server\n\n        :type proxy_port: int\n        :param proxy_port: The port to use when connecting over a proxy\n\n        :type proxy_user: str\n        :param proxy_user: The username to connect with on the proxy\n\n        :type proxy_pass: str\n        :param proxy_pass: The password to use when connection over a proxy.\n\n        :type port: int\n        :param port: The port to use to connect\n        \"\"\"\n        self.num_retries = 6\n        # Override passed-in is_secure setting if value was defined in config.\n        if config.has_option('Boto', 'is_secure'):\n            is_secure = config.getboolean('Boto', 'is_secure')\n        self.is_secure = is_secure\n        # Whether or not to validate server certificates.  At some point in the\n        # future, the default should be flipped to true.\n        self.https_validate_certificates = config.getbool(\n                'Boto', 'https_validate_certificates', False)\n        if self.https_validate_certificates and not HAVE_HTTPS_CONNECTION:\n            raise BotoClientError(\n                    \"SSL server certificate validation is enabled in boto \"\n                    \"configuration, but Python dependencies required to \"\n                    \"support this feature are not available. Certificate \"\n                    \"validation is only supported when running under Python \"\n                    \"2.6 or later.\")\n        self.ca_certificates_file = config.get_value(\n                'Boto', 'ca_certificates_file', DEFAULT_CA_CERTS_FILE)\n        self.handle_proxy(proxy, proxy_port, proxy_user, proxy_pass)\n        # define exceptions from httplib that we want to catch and retry\n        self.http_exceptions = (httplib.HTTPException, socket.error,\n                                socket.gaierror)\n        # define subclasses of the above that are not retryable.\n        self.http_unretryable_exceptions = []\n        if HAVE_HTTPS_CONNECTION:\n            self.http_unretryable_exceptions.append(ssl.SSLError)\n            self.http_unretryable_exceptions.append(\n                    https_connection.InvalidCertificateException)\n\n        # define values in socket exceptions we don't want to catch\n        self.socket_exception_values = (errno.EINTR,)\n        if https_connection_factory is not None:\n            self.https_connection_factory = https_connection_factory[0]\n            self.http_exceptions += https_connection_factory[1]\n        else:\n            self.https_connection_factory = None\n        if (is_secure):\n            self.protocol = 'https'\n        else:\n            self.protocol = 'http'\n        self.host = host\n        self.path = path\n        if debug:\n            self.debug = debug\n        else:\n            self.debug = config.getint('Boto', 'debug', debug)\n        if port:\n            self.port = port\n        else:\n            self.port = PORTS_BY_SECURITY[is_secure]\n\n        # Timeout used to tell httplib how long to wait for socket timeouts.\n        # Default is to leave timeout unchanged, which will in turn result in\n        # the socket's default global timeout being used. To specify a\n        # timeout, set http_socket_timeout in Boto config. Regardless,\n        # timeouts will only be applied if Python is 2.6 or greater.\n        self.http_connection_kwargs = {}\n        if (sys.version_info[0], sys.version_info[1]) >= (2, 6):\n            if config.has_option('Boto', 'http_socket_timeout'):\n                timeout = config.getint('Boto', 'http_socket_timeout')\n                self.http_connection_kwargs['timeout'] = timeout\n\n        self.provider = Provider(provider,\n                                 aws_access_key_id,\n                                 aws_secret_access_key,\n                                 security_token)\n\n        # allow config file to override default host\n        if self.provider.host:\n            self.host = self.provider.host\n\n        self._pool = ConnectionPool()\n        self._connection = (self.server_name(), self.is_secure)\n        self._last_rs = None\n        self._auth_handler = auth.get_auth_handler(\n              host, config, self.provider, self._required_auth_capability())\n\n    def __repr__(self):\n        return '%s:%s' % (self.__class__.__name__, self.host)\n\n    def _required_auth_capability(self):\n        return []\n\n    def connection(self):\n        return self.get_http_connection(*self._connection)\n    connection = property(connection)\n\n    def aws_access_key_id(self):\n        return self.provider.access_key\n    aws_access_key_id = property(aws_access_key_id)\n    gs_access_key_id = aws_access_key_id\n    access_key = aws_access_key_id\n\n    def aws_secret_access_key(self):\n        return self.provider.secret_key\n    aws_secret_access_key = property(aws_secret_access_key)\n    gs_secret_access_key = aws_secret_access_key\n    secret_key = aws_secret_access_key\n\n    def get_path(self, path='/'):\n        pos = path.find('?')\n        if pos >= 0:\n            params = path[pos:]\n            path = path[:pos]\n        else:\n            params = None\n        if path[-1] == '/':\n            need_trailing = True\n        else:\n            need_trailing = False\n        path_elements = self.path.split('/')\n        path_elements.extend(path.split('/'))\n        path_elements = [p for p in path_elements if p]\n        path = '/' + '/'.join(path_elements)\n        if path[-1] != '/' and need_trailing:\n            path += '/'\n        if params:\n            path = path + params\n        return path\n\n    def server_name(self, port=None):\n        if not port:\n            port = self.port\n        if port == 80:\n            signature_host = self.host\n        else:\n            # This unfortunate little hack can be attributed to\n            # a difference in the 2.6 version of httplib.  In old\n            # versions, it would append \":443\" to the hostname sent\n            # in the Host header and so we needed to make sure we\n            # did the same when calculating the V2 signature.  In 2.6\n            # (and higher!)\n            # it no longer does that.  Hence, this kludge.\n            if ((ON_APP_ENGINE and sys.version[:3] == '2.5') or\n                    sys.version[:3] in ('2.6', '2.7')) and port == 443:\n                signature_host = self.host\n            else:\n                signature_host = '%s:%d' % (self.host, port)\n        return signature_host\n\n    def handle_proxy(self, proxy, proxy_port, proxy_user, proxy_pass):\n        self.proxy = proxy\n        self.proxy_port = proxy_port\n        self.proxy_user = proxy_user\n        self.proxy_pass = proxy_pass\n        if os.environ.has_key('http_proxy') and not self.proxy:\n            pattern = re.compile(\n                '(?:http://)?' \\\n                '(?:(?P<user>\\w+):(?P<pass>.*)@)?' \\\n                '(?P<host>[\\w\\-\\.]+)' \\\n                '(?::(?P<port>\\d+))?'\n            )\n            match = pattern.match(os.environ['http_proxy'])\n            if match:\n                self.proxy = match.group('host')\n                self.proxy_port = match.group('port')\n                self.proxy_user = match.group('user')\n                self.proxy_pass = match.group('pass')\n        else:\n            if not self.proxy:\n                self.proxy = config.get_value('Boto', 'proxy', None)\n            if not self.proxy_port:\n                self.proxy_port = config.get_value('Boto', 'proxy_port', None)\n            if not self.proxy_user:\n                self.proxy_user = config.get_value('Boto', 'proxy_user', None)\n            if not self.proxy_pass:\n                self.proxy_pass = config.get_value('Boto', 'proxy_pass', None)\n\n        if not self.proxy_port and self.proxy:\n            print \"http_proxy environment variable does not specify \" \\\n                \"a port, using default\"\n            self.proxy_port = self.port\n        self.use_proxy = (self.proxy != None)\n\n    def get_http_connection(self, host, is_secure):\n        conn = self._pool.get_http_connection(host, is_secure)\n        if conn is not None:\n            return conn\n        else:\n            return self.new_http_connection(host, is_secure)\n\n    def new_http_connection(self, host, is_secure):\n        if self.use_proxy:\n            host = '%s:%d' % (self.proxy, int(self.proxy_port))\n        if host is None:\n            host = self.server_name()\n        if is_secure:\n            boto.log.debug(\n                    'establishing HTTPS connection: host=%s, kwargs=%s',\n                    host, self.http_connection_kwargs)\n            if self.use_proxy:\n                connection = self.proxy_ssl()\n            elif self.https_connection_factory:\n                connection = self.https_connection_factory(host)\n            elif self.https_validate_certificates and HAVE_HTTPS_CONNECTION:\n                connection = https_connection.CertValidatingHTTPSConnection(\n                        host, ca_certs=self.ca_certificates_file,\n                        **self.http_connection_kwargs)\n            else:\n                connection = httplib.HTTPSConnection(host,\n                        **self.http_connection_kwargs)\n        else:\n            boto.log.debug('establishing HTTP connection: kwargs=%s' %\n                    self.http_connection_kwargs)\n            connection = httplib.HTTPConnection(host,\n                    **self.http_connection_kwargs)\n        if self.debug > 1:\n            connection.set_debuglevel(self.debug)\n        # self.connection must be maintained for backwards-compatibility\n        # however, it must be dynamically pulled from the connection pool\n        # set a private variable which will enable that\n        if host.split(':')[0] == self.host and is_secure == self.is_secure:\n            self._connection = (host, is_secure)\n        return connection\n\n    def put_http_connection(self, host, is_secure, connection):\n        self._pool.put_http_connection(host, is_secure, connection)\n\n    def proxy_ssl(self):\n        host = '%s:%d' % (self.host, self.port)\n        sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)\n        try:\n            sock.connect((self.proxy, int(self.proxy_port)))\n        except:\n            raise\n        boto.log.debug(\"Proxy connection: CONNECT %s HTTP/1.0\\r\\n\", host)\n        sock.sendall(\"CONNECT %s HTTP/1.0\\r\\n\" % host)\n        sock.sendall(\"User-Agent: %s\\r\\n\" % UserAgent)\n        if self.proxy_user and self.proxy_pass:\n            for k, v in self.get_proxy_auth_header().items():\n                sock.sendall(\"%s: %s\\r\\n\" % (k, v))\n        sock.sendall(\"\\r\\n\")\n        resp = httplib.HTTPResponse(sock, strict=True, debuglevel=self.debug)\n        resp.begin()\n\n        if resp.status != 200:\n            # Fake a socket error, use a code that make it obvious it hasn't\n            # been generated by the socket library\n            raise socket.error(-71,\n                               \"Error talking to HTTP proxy %s:%s: %s (%s)\" %\n                               (self.proxy, self.proxy_port, resp.status, resp.reason))\n\n        # We can safely close the response, it duped the original socket\n        resp.close()\n\n        h = httplib.HTTPConnection(host)\n\n        if self.https_validate_certificates and HAVE_HTTPS_CONNECTION:\n            boto.log.debug(\"wrapping ssl socket for proxied connection; \"\n                           \"CA certificate file=%s\",\n                           self.ca_certificates_file)\n            key_file = self.http_connection_kwargs.get('key_file', None)\n            cert_file = self.http_connection_kwargs.get('cert_file', None)\n            sslSock = ssl.wrap_socket(sock, keyfile=key_file,\n                                      certfile=cert_file,\n                                      cert_reqs=ssl.CERT_REQUIRED,\n                                      ca_certs=self.ca_certificates_file)\n            cert = sslSock.getpeercert()\n            hostname = self.host.split(':', 0)[0]\n            if not https_connection.ValidateCertificateHostname(cert, hostname):\n                raise https_connection.InvalidCertificateException(\n                        hostname, cert, 'hostname mismatch')\n        else:\n            # Fallback for old Python without ssl.wrap_socket\n            if hasattr(httplib, 'ssl'):\n                sslSock = httplib.ssl.SSLSocket(sock)\n            else:\n                sslSock = socket.ssl(sock, None, None)\n                sslSock = httplib.FakeSocket(sock, sslSock)\n\n        # This is a bit unclean\n        h.sock = sslSock\n        return h\n\n    def prefix_proxy_to_path(self, path, host=None):\n        path = self.protocol + '://' + (host or self.server_name()) + path\n        return path\n\n    def get_proxy_auth_header(self):\n        auth = base64.encodestring(self.proxy_user + ':' + self.proxy_pass)\n        return {'Proxy-Authorization': 'Basic %s' % auth}\n\n    def _mexe(self, request, sender=None, override_num_retries=None):\n        \"\"\"\n        mexe - Multi-execute inside a loop, retrying multiple times to handle\n               transient Internet errors by simply trying again.\n               Also handles redirects.\n\n        This code was inspired by the S3Utils classes posted to the boto-users\n        Google group by Larry Bates.  Thanks!\n        \"\"\"\n        boto.log.debug('Method: %s' % request.method)\n        boto.log.debug('Path: %s' % request.path)\n        boto.log.debug('Data: %s' % request.body)\n        boto.log.debug('Headers: %s' % request.headers)\n        boto.log.debug('Host: %s' % request.host)\n        response = None\n        body = None\n        e = None\n        if override_num_retries is None:\n            num_retries = config.getint('Boto', 'num_retries', self.num_retries)\n        else:\n            num_retries = override_num_retries\n        i = 0\n        connection = self.get_http_connection(request.host, self.is_secure)\n        while i <= num_retries:\n            # Use binary exponential backoff to desynchronize client requests\n            next_sleep = random.random() * (2 ** i)\n            try:\n                # we now re-sign each request before it is retried\n                request.authorize(connection=self)\n                if callable(sender):\n                    response = sender(connection, request.method, request.path,\n                                      request.body, request.headers)\n                else:\n                    connection.request(request.method, request.path, request.body,\n                                       request.headers)\n                    response = connection.getresponse()\n                location = response.getheader('location')\n                # -- gross hack --\n                # httplib gets confused with chunked responses to HEAD requests\n                # so I have to fake it out\n                if request.method == 'HEAD' and getattr(response, 'chunked', False):\n                    response.chunked = 0\n                if response.status == 500 or response.status == 503:\n                    boto.log.debug('received %d response, retrying in %3.1f seconds' %\n                                   (response.status, next_sleep))\n                    body = response.read()\n                elif response.status < 300 or response.status >= 400 or \\\n                        not location:\n                    self.put_http_connection(request.host, self.is_secure, connection)\n                    return response\n                else:\n                    scheme, request.host, request.path, params, query, fragment = \\\n                            urlparse.urlparse(location)\n                    if query:\n                        request.path += '?' + query\n                    boto.log.debug('Redirecting: %s' % scheme + '://' + request.host + request.path)\n                    connection = self.get_http_connection(request.host, scheme == 'https')\n                    continue\n            except self.http_exceptions, e:\n                for unretryable in self.http_unretryable_exceptions:\n                    if isinstance(e, unretryable):\n                        boto.log.debug(\n                            'encountered unretryable %s exception, re-raising' %\n                            e.__class__.__name__)\n                        raise e\n                boto.log.debug('encountered %s exception, reconnecting' % \\\n                                  e.__class__.__name__)\n                connection = self.new_http_connection(request.host, self.is_secure)\n            time.sleep(next_sleep)\n            i += 1\n        # If we made it here, it's because we have exhausted our retries and stil haven't\n        # succeeded.  So, if we have a response object, use it to raise an exception.\n        # Otherwise, raise the exception that must have already happened.\n        if response:\n            raise BotoServerError(response.status, response.reason, body)\n        elif e:\n            raise e\n        else:\n            raise BotoClientError('Please report this exception as a Boto Issue!')\n\n    def build_base_http_request(self, method, path, auth_path,\n                                params=None, headers=None, data='', host=None):\n        path = self.get_path(path)\n        if auth_path is not None:\n            auth_path = self.get_path(auth_path)\n        if params == None:\n            params = {}\n        else:\n            params = params.copy()\n        if headers == None:\n            headers = {}\n        else:\n            headers = headers.copy()\n        host = host or self.host\n        if self.use_proxy:\n            if not auth_path:\n                auth_path = path\n            path = self.prefix_proxy_to_path(path, host)\n            if self.proxy_user and self.proxy_pass and not self.is_secure:\n                # If is_secure, we don't have to set the proxy authentication\n                # header here, we did that in the CONNECT to the proxy.\n                headers.update(self.get_proxy_auth_header())\n        return HTTPRequest(method, self.protocol, host, self.port,\n                           path, auth_path, params, headers, data)\n\n    def make_request(self, method, path, headers=None, data='', host=None,\n                     auth_path=None, sender=None, override_num_retries=None):\n        \"\"\"Makes a request to the server, with stock multiple-retry logic.\"\"\"\n        http_request = self.build_base_http_request(method, path, auth_path,\n                                                    {}, headers, data, host)\n        return self._mexe(http_request, sender, override_num_retries)\n\n    def close(self):\n        \"\"\"(Optional) Close any open HTTP connections.  This is non-destructive,\n        and making a new request will open a connection again.\"\"\"\n\n        boto.log.debug('closing all HTTP connections')\n        self.connection = None  # compat field\n\nclass AWSQueryConnection(AWSAuthConnection):\n\n    APIVersion = ''\n    ResponseError = BotoServerError\n\n    def __init__(self, aws_access_key_id=None, aws_secret_access_key=None,\n                 is_secure=True, port=None, proxy=None, proxy_port=None,\n                 proxy_user=None, proxy_pass=None, host=None, debug=0,\n                 https_connection_factory=None, path='/', security_token=None):\n        AWSAuthConnection.__init__(self, host, aws_access_key_id,\n                                   aws_secret_access_key,\n                                   is_secure, port, proxy,\n                                   proxy_port, proxy_user, proxy_pass,\n                                   debug, https_connection_factory, path,\n                                   security_token=security_token)\n\n    def _required_auth_capability(self):\n        return []\n\n    def get_utf8_value(self, value):\n        return boto.utils.get_utf8_value(value)\n\n    def make_request(self, action, params=None, path='/', verb='GET'):\n        http_request = self.build_base_http_request(verb, path, None,\n                                                    params, {}, '',\n                                                    self.server_name())\n        if action:\n            http_request.params['Action'] = action\n        http_request.params['Version'] = self.APIVersion\n        return self._mexe(http_request)\n\n    def build_list_params(self, params, items, label):\n        if isinstance(items, str):\n            items = [items]\n        for i in range(1, len(items) + 1):\n            params['%s.%d' % (label, i)] = items[i - 1]\n\n    # generics\n\n    def get_list(self, action, params, markers, path='/',\n                 parent=None, verb='GET'):\n        if not parent:\n            parent = self\n        response = self.make_request(action, params, path, verb)\n        body = response.read()\n        boto.log.debug(body)\n        if not body:\n            boto.log.error('Null body %s' % body)\n            raise self.ResponseError(response.status, response.reason, body)\n        elif response.status == 200:\n            rs = ResultSet(markers)\n            h = boto.handler.XmlHandler(rs, parent)\n            xml.sax.parseString(body, h)\n            return rs\n        else:\n            boto.log.error('%s %s' % (response.status, response.reason))\n            boto.log.error('%s' % body)\n            raise self.ResponseError(response.status, response.reason, body)\n\n    def get_object(self, action, params, cls, path='/',\n                   parent=None, verb='GET'):\n        if not parent:\n            parent = self\n        response = self.make_request(action, params, path, verb)\n        body = response.read()\n        boto.log.debug(body)\n        if not body:\n            boto.log.error('Null body %s' % body)\n            raise self.ResponseError(response.status, response.reason, body)\n        elif response.status == 200:\n            obj = cls(parent)\n            h = boto.handler.XmlHandler(obj, parent)\n            xml.sax.parseString(body, h)\n            return obj\n        else:\n            boto.log.error('%s %s' % (response.status, response.reason))\n            boto.log.error('%s' % body)\n            raise self.ResponseError(response.status, response.reason, body)\n\n    def get_status(self, action, params, path='/', parent=None, verb='GET'):\n        if not parent:\n            parent = self\n        response = self.make_request(action, params, path, verb)\n        body = response.read()\n        boto.log.debug(body)\n        if not body:\n            boto.log.error('Null body %s' % body)\n            raise self.ResponseError(response.status, response.reason, body)\n        elif response.status == 200:\n            rs = ResultSet()\n            h = boto.handler.XmlHandler(rs, parent)\n            xml.sax.parseString(body, h)\n            return rs.status\n        else:\n            boto.log.error('%s %s' % (response.status, response.reason))\n            boto.log.error('%s' % body)\n            raise self.ResponseError(response.status, response.reason, body)\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/contrib/__init__.py",
    "content": "# Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n#\n\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/contrib/m2helpers.py",
    "content": "# Copyright (c) 2006,2007 Jon Colverson\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\n\"\"\"\nThis module was contributed by Jon Colverson.  It provides a couple of helper\nfunctions that allow you to use M2Crypto's implementation of HTTPSConnection\nrather than the default version in httplib.py.  The main benefit is that\nM2Crypto's version verifies the certificate of the server.\n\nTo use this feature, do something like this:\n\nfrom boto.ec2.connection import EC2Connection\n\nec2 = EC2Connection(ACCESS_KEY_ID, SECRET_ACCESS_KEY,\n    https_connection_factory=https_connection_factory(cafile=CA_FILE))\n\nSee http://code.google.com/p/boto/issues/detail?id=57 for more details.\n\"\"\"\nfrom M2Crypto import SSL\nfrom M2Crypto.httpslib import HTTPSConnection\n\ndef secure_context(cafile=None, capath=None):\n    ctx = SSL.Context()\n    ctx.set_verify(SSL.verify_peer | SSL.verify_fail_if_no_peer_cert, depth=9)\n    if ctx.load_verify_locations(cafile=cafile, capath=capath) != 1:\n        raise Exception(\"Couldn't load certificates\")\n    return ctx\n\ndef https_connection_factory(cafile=None, capath=None):\n    def factory(*args, **kwargs):\n        return HTTPSConnection(\n            ssl_context=secure_context(cafile=cafile, capath=capath),\n                *args, **kwargs)\n    return (factory, (SSL.SSLError,))\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/contrib/ymlmessage.py",
    "content": "# Copyright (c) 2006,2007 Chris Moyer\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\n\"\"\"\nThis module was contributed by Chris Moyer.  It provides a subclass of the\nSQS Message class that supports YAML as the body of the message.\n\nThis module requires the yaml module.\n\"\"\"\nfrom boto.sqs.message import Message\nimport yaml\n\nclass YAMLMessage(Message):\n    \"\"\"\n    The YAMLMessage class provides a YAML compatible message. Encoding and\n    decoding are handled automaticaly.\n\n    Access this message data like such:\n\n    m.data = [ 1, 2, 3]\n    m.data[0] # Returns 1\n\n    This depends on the PyYAML package\n    \"\"\"\n\n    def __init__(self, queue=None, body='', xml_attrs=None):\n        self.data = None\n        Message.__init__(self, queue, body)\n\n    def set_body(self, body):\n        self.data = yaml.load(body)\n\n    def get_body(self):\n        return yaml.dump(self.data)\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/ec2/__init__.py",
    "content": "# Copyright (c) 2006-2008 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n#\n\"\"\"\nThis module provides an interface to the Elastic Compute Cloud (EC2)\nservice from AWS.\n\"\"\"\nfrom boto.ec2.connection import EC2Connection\n\ndef regions(**kw_params):\n    \"\"\"\n    Get all available regions for the EC2 service.\n    You may pass any of the arguments accepted by the EC2Connection\n    object's constructor as keyword arguments and they will be\n    passed along to the EC2Connection object.\n        \n    :rtype: list\n    :return: A list of :class:`boto.ec2.regioninfo.RegionInfo`\n    \"\"\"\n    c = EC2Connection(**kw_params)\n    return c.get_all_regions()\n\ndef connect_to_region(region_name, **kw_params):\n    \"\"\"\n    Given a valid region name, return a \n    :class:`boto.ec2.connection.EC2Connection`.\n    Any additional parameters after the region_name are passed on to\n    the connect method of the region object.\n\n    :type: str\n    :param region_name: The name of the region to connect to.\n    \n    :rtype: :class:`boto.ec2.connection.EC2Connection` or ``None``\n    :return: A connection to the given region, or None if an invalid region\n             name is given\n    \"\"\"\n    for region in regions(**kw_params):\n        if region.name == region_name:\n            return region.connect(**kw_params)\n    return None\n    \ndef get_region(region_name, **kw_params):\n    \"\"\"\n    Find and return a :class:`boto.ec2.regioninfo.RegionInfo` object\n    given a region name.\n\n    :type: str\n    :param: The name of the region.\n\n    :rtype: :class:`boto.ec2.regioninfo.RegionInfo`\n    :return: The RegionInfo object for the given region or None if\n             an invalid region name is provided.\n    \"\"\"\n    for region in regions(**kw_params):\n        if region.name == region_name:\n            return region\n    return None\n    \n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/ec2/address.py",
    "content": "# Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\n\"\"\"\nRepresents an EC2 Elastic IP Address\n\"\"\"\n\nfrom boto.ec2.ec2object import EC2Object\n\nclass Address(EC2Object):\n\n    def __init__(self, connection=None, public_ip=None, instance_id=None):\n        EC2Object.__init__(self, connection)\n        self.connection = connection\n        self.public_ip = public_ip\n        self.instance_id = instance_id\n        self.domain = None\n        self.allocation_id = None\n        self.association_id = None\n\n    def __repr__(self):\n        return 'Address:%s' % self.public_ip\n\n    def endElement(self, name, value, connection):\n        if name == 'publicIp':\n            self.public_ip = value\n        elif name == 'instanceId':\n            self.instance_id = value\n        elif name == 'domain':\n            self.domain = value\n        elif name == 'allocationId':\n            self.allocation_id = value\n        elif name == 'associationId':\n            self.association_id = value\n        else:\n            setattr(self, name, value)\n\n    def release(self):\n        return self.connection.release_address(self.public_ip)\n\n    delete = release\n\n    def associate(self, instance_id):\n        return self.connection.associate_address(instance_id, self.public_ip)\n\n    def disassociate(self):\n        return self.connection.disassociate_address(self.public_ip)\n\n\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/ec2/autoscale/__init__.py",
    "content": "# Copyright (c) 2009-2011 Reza Lotun http://reza.lotun.name/\n# Copyright (c) 2011 Jann Kleen\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\n\"\"\"\nThis module provides an interface to the Elastic Compute Cloud (EC2)\nAuto Scaling service.\n\"\"\"\n\nimport base64\n\nimport boto\nfrom boto.connection import AWSQueryConnection\nfrom boto.ec2.regioninfo import RegionInfo\nfrom boto.ec2.autoscale.request import Request\nfrom boto.ec2.autoscale.launchconfig import LaunchConfiguration\nfrom boto.ec2.autoscale.group import AutoScalingGroup, ProcessType\nfrom boto.ec2.autoscale.activity import Activity\nfrom boto.ec2.autoscale.policy import AdjustmentType, MetricCollectionTypes, ScalingPolicy\nfrom boto.ec2.autoscale.instance import Instance\nfrom boto.ec2.autoscale.scheduled import ScheduledUpdateGroupAction\n\n\nRegionData = {\n    'us-east-1' : 'autoscaling.us-east-1.amazonaws.com',\n    'us-west-1' : 'autoscaling.us-west-1.amazonaws.com',\n    'eu-west-1' : 'autoscaling.eu-west-1.amazonaws.com',\n    'ap-northeast-1' : 'autoscaling.ap-northeast-1.amazonaws.com',\n    'ap-southeast-1' : 'autoscaling.ap-southeast-1.amazonaws.com'}\n\ndef regions():\n    \"\"\"\n    Get all available regions for the Auto Scaling service.\n\n    :rtype: list\n    :return: A list of :class:`boto.RegionInfo` instances\n    \"\"\"\n    regions = []\n    for region_name in RegionData:\n        region = RegionInfo(name=region_name,\n                            endpoint=RegionData[region_name],\n                            connection_cls=AutoScaleConnection)\n        regions.append(region)\n    return regions\n\ndef connect_to_region(region_name, **kw_params):\n    \"\"\"\n    Given a valid region name, return a\n    :class:`boto.ec2.autoscale.AutoScaleConnection`.\n\n    :param str region_name: The name of the region to connect to.\n\n    :rtype: :class:`boto.ec2.AutoScaleConnection` or ``None``\n    :return: A connection to the given region, or None if an invalid region\n        name is given\n    \"\"\"\n    for region in regions():\n        if region.name == region_name:\n            return region.connect(**kw_params)\n    return None\n\n\nclass AutoScaleConnection(AWSQueryConnection):\n    APIVersion = boto.config.get('Boto', 'autoscale_version', '2011-01-01')\n    DefaultRegionEndpoint = boto.config.get('Boto', 'autoscale_endpoint',\n                                            'autoscaling.amazonaws.com')\n    DefaultRegionName =  boto.config.get('Boto', 'autoscale_region_name', 'us-east-1')\n\n    def __init__(self, aws_access_key_id=None, aws_secret_access_key=None,\n                 is_secure=True, port=None, proxy=None, proxy_port=None,\n                 proxy_user=None, proxy_pass=None, debug=None,\n                 https_connection_factory=None, region=None, path='/'):\n        \"\"\"\n        Init method to create a new connection to the AutoScaling service.\n\n        B{Note:} The host argument is overridden by the host specified in the\n                 boto configuration file.\n        \"\"\"\n        if not region:\n            region = RegionInfo(self, self.DefaultRegionName,\n                                self.DefaultRegionEndpoint,\n                                AutoScaleConnection)\n        self.region = region\n        AWSQueryConnection.__init__(self, aws_access_key_id,\n                                    aws_secret_access_key,\n                                    is_secure, port, proxy, proxy_port,\n                                    proxy_user, proxy_pass,\n                                    self.region.endpoint, debug,\n                                    https_connection_factory, path=path)\n\n    def _required_auth_capability(self):\n        return ['ec2']\n\n    def build_list_params(self, params, items, label):\n        \"\"\"\n        Items is a list of dictionaries or strings::\n\n            [\n                {\n                    'Protocol' : 'HTTP',\n                    'LoadBalancerPort' : '80',\n                    'InstancePort' : '80'\n                },\n                ..\n            ] etc.\n\n        or::\n\n            ['us-east-1b',...]\n        \"\"\"\n        # different from EC2 list params\n        for i in xrange(1, len(items)+1):\n            if isinstance(items[i-1], dict):\n                for k, v in items[i-1].iteritems():\n                    if isinstance(v, dict):\n                        for kk, vv in v.iteritems():\n                            params['%s.member.%d.%s.%s' % (label, i, k, kk)] = vv\n                    else:\n                        params['%s.member.%d.%s' % (label, i, k)] = v\n            elif isinstance(items[i-1], basestring):\n                params['%s.member.%d' % (label, i)] = items[i-1]\n\n    def _update_group(self, op, as_group):\n        params = {\n                  'AutoScalingGroupName'    : as_group.name,\n                  'LaunchConfigurationName' : as_group.launch_config_name,\n                  'MinSize'                 : as_group.min_size,\n                  'MaxSize'                 : as_group.max_size,\n                  }\n        # get availability zone information (required param)\n        zones = as_group.availability_zones\n        self.build_list_params(params, zones,\n                                'AvailabilityZones')\n        if as_group.desired_capacity:\n            params['DesiredCapacity'] = as_group.desired_capacity\n        if as_group.vpc_zone_identifier:\n            params['VPCZoneIdentifier'] = as_group.vpc_zone_identifier\n        if as_group.health_check_period:\n            params['HealthCheckGracePeriod'] = as_group.health_check_period\n        if as_group.health_check_type:\n            params['HealthCheckType'] = as_group.health_check_type\n        if as_group.default_cooldown:\n            params['DefaultCooldown'] = as_group.default_cooldown\n        if as_group.placement_group:\n            params['PlacementGroup'] = as_group.placement_group\n        if op.startswith('Create'):\n            # you can only associate load balancers with an autoscale group at creation time\n            if as_group.load_balancers:\n                self.build_list_params(params, as_group.load_balancers,\n                                       'LoadBalancerNames')\n        return self.get_object(op, params, Request)\n\n    def create_auto_scaling_group(self, as_group):\n        \"\"\"\n        Create auto scaling group.\n        \"\"\"\n        return self._update_group('CreateAutoScalingGroup', as_group)\n\n    def delete_auto_scaling_group(self, name, force_delete=False):\n        \"\"\"\n        Deletes the specified auto scaling group if the group has no instances\n        and no scaling activities in progress.\n        \"\"\"\n        if(force_delete):\n            params = {'AutoScalingGroupName' : name, 'ForceDelete' : 'true'}\n        else:\n            params = {'AutoScalingGroupName' : name}\n        return self.get_object('DeleteAutoScalingGroup', params, Request)\n\n    def create_launch_configuration(self, launch_config):\n        \"\"\"\n        Creates a new Launch Configuration.\n\n        :type launch_config: :class:`boto.ec2.autoscale.launchconfig.LaunchConfiguration`\n        :param launch_config: LaunchConfiguration object.\n\n        \"\"\"\n        params = {\n                  'ImageId'                 : launch_config.image_id,\n                  'LaunchConfigurationName' : launch_config.name,\n                  'InstanceType'            : launch_config.instance_type,\n                 }\n        if launch_config.key_name:\n            params['KeyName'] = launch_config.key_name\n        if launch_config.user_data:\n            params['UserData'] = base64.b64encode(launch_config.user_data)\n        if launch_config.kernel_id:\n            params['KernelId'] = launch_config.kernel_id\n        if launch_config.ramdisk_id:\n            params['RamdiskId'] = launch_config.ramdisk_id\n        if launch_config.block_device_mappings:\n            self.build_list_params(params, launch_config.block_device_mappings,\n                                   'BlockDeviceMappings')\n        if launch_config.security_groups:\n            self.build_list_params(params, launch_config.security_groups,\n                                   'SecurityGroups')\n        if launch_config.instance_monitoring:\n            params['InstanceMonitoring.member.Enabled'] = 'true'\n        return self.get_object('CreateLaunchConfiguration', params,\n                                  Request, verb='POST')\n\n    def create_scaling_policy(self, scaling_policy):\n        \"\"\"\n        Creates a new Scaling Policy.\n\n        :type scaling_policy: :class:`boto.ec2.autoscale.policy.ScalingPolicy`\n        :param scaling_policy: ScalingPolicy object.\n        \"\"\"\n        params = {'AdjustmentType'      : scaling_policy.adjustment_type,\n                  'AutoScalingGroupName': scaling_policy.as_name,\n                  'PolicyName'          : scaling_policy.name,\n                  'ScalingAdjustment'   : scaling_policy.scaling_adjustment,}\n\n        if scaling_policy.cooldown is not None:\n            params['Cooldown'] = scaling_policy.cooldown\n\n        return self.get_object('PutScalingPolicy', params, Request)\n\n    def delete_launch_configuration(self, launch_config_name):\n        \"\"\"\n        Deletes the specified LaunchConfiguration.\n\n        The specified launch configuration must not be attached to an Auto\n        Scaling group. Once this call completes, the launch configuration is no\n        longer available for use.\n        \"\"\"\n        params = {'LaunchConfigurationName' : launch_config_name}\n        return self.get_object('DeleteLaunchConfiguration', params, Request)\n\n    def get_all_groups(self, names=None, max_records=None, next_token=None):\n        \"\"\"\n        Returns a full description of each Auto Scaling group in the given\n        list. This includes all Amazon EC2 instances that are members of the\n        group. If a list of names is not provided, the service returns the full\n        details of all Auto Scaling groups.\n\n        This action supports pagination by returning a token if there are more\n        pages to retrieve. To get the next page, call this action again with\n        the returned token as the NextToken parameter.\n\n        :type names: list\n        :param names: List of group names which should be searched for.\n\n        :type max_records: int\n        :param max_records: Maximum amount of groups to return.\n\n        :rtype: list\n        :returns: List of :class:`boto.ec2.autoscale.group.AutoScalingGroup` instances.\n        \"\"\"\n        params = {}\n        if max_records:\n            params['MaxRecords'] = max_records\n        if next_token:\n            params['NextToken'] = next_token\n        if names:\n            self.build_list_params(params, names, 'AutoScalingGroupNames')\n        return self.get_list('DescribeAutoScalingGroups', params,\n                             [('member', AutoScalingGroup)])\n\n    def get_all_launch_configurations(self, **kwargs):\n        \"\"\"\n        Returns a full description of the launch configurations given the\n        specified names.\n\n        If no names are specified, then the full details of all launch\n        configurations are returned.\n\n        :type names: list\n        :param names: List of configuration names which should be searched for.\n\n        :type max_records: int\n        :param max_records: Maximum amount of configurations to return.\n\n        :type next_token: str\n        :param next_token: If you have more results than can be returned at once, pass in this\n                           parameter to page through all results.\n\n        :rtype: list\n        :returns: List of :class:`boto.ec2.autoscale.launchconfig.LaunchConfiguration` instances.\n        \"\"\"\n        params = {}\n        max_records = kwargs.get('max_records', None)\n        names = kwargs.get('names', None)\n        if max_records is not None:\n            params['MaxRecords'] = max_records\n        if names:\n            self.build_list_params(params, names, 'LaunchConfigurationNames')\n        next_token = kwargs.get('next_token')\n        if next_token:\n            params['NextToken'] = next_token\n        return self.get_list('DescribeLaunchConfigurations', params,\n                             [('member', LaunchConfiguration)])\n\n    def get_all_activities(self, autoscale_group, activity_ids=None, max_records=None, next_token=None):\n        \"\"\"\n        Get all activities for the given autoscaling group.\n\n        This action supports pagination by returning a token if there are more\n        pages to retrieve. To get the next page, call this action again with\n        the returned token as the NextToken parameter\n\n        :type autoscale_group: str or :class:`boto.ec2.autoscale.group.AutoScalingGroup` object\n        :param autoscale_group: The auto scaling group to get activities on.\n\n        :type max_records: int\n        :param max_records: Maximum amount of activities to return.\n\n        :rtype: list\n        :returns: List of :class:`boto.ec2.autoscale.activity.Activity` instances.\n        \"\"\"\n        name = autoscale_group\n        if isinstance(autoscale_group, AutoScalingGroup):\n            name = autoscale_group.name\n        params = {'AutoScalingGroupName' : name}\n        if max_records:\n            params['MaxRecords'] = max_records\n        if next_token:\n            params['NextToken'] = next_token\n        if activity_ids:\n            self.build_list_params(params, activity_ids, 'ActivityIds')\n        return self.get_list('DescribeScalingActivities',\n                             params, [('member', Activity)])\n\n    def delete_scheduled_action(self, scheduled_action_name,\n                                autoscale_group=None):\n        \"\"\"\n        Deletes a previously scheduled action.\n\n        :param str scheduled_action_name: The name of the action you want\n            to delete.\n        :param str autoscale_group: The name of the autoscale group.\n        \"\"\"\n        params = {'ScheduledActionName' : scheduled_action_name}\n        if autoscale_group:\n            params['AutoScalingGroupName'] = autoscale_group\n        return self.get_status('DeleteScheduledAction', params)\n\n    def terminate_instance(self, instance_id, decrement_capacity=True):\n        \"\"\"\n        Terminates the specified instance. The desired group size can\n        also be adjusted, if desired.\n\n        :param str instance_id: The ID of the instance to be terminated.\n        :param bool decrement_capacity: Whether to decrement the size of the\n            autoscaling group or not.\n        \"\"\"\n        params = {'InstanceId' : instance_id}\n        if decrement_capacity:\n            params['ShouldDecrementDesiredCapacity'] = 'true'\n        else:\n            params['ShouldDecrementDesiredCapacity'] = 'false'\n        return self.get_object('TerminateInstanceInAutoScalingGroup', params,\n                               Activity)\n\n    def delete_policy(self, policy_name, autoscale_group=None):\n        \"\"\"\n        Delete a policy.\n\n        :type policy_name: str\n        :param policy_name: The name or ARN of the policy to delete.\n\n        :type autoscale_group: str\n        :param autoscale_group: The name of the autoscale group.\n        \"\"\"\n        params = {'PolicyName': policy_name}\n        if autoscale_group:\n            params['AutoScalingGroupName'] = autoscale_group\n        return self.get_status('DeletePolicy', params)\n\n    def get_all_adjustment_types(self):\n        return self.get_list('DescribeAdjustmentTypes', {}, [('member', AdjustmentType)])\n\n    def get_all_autoscaling_instances(self, instance_ids=None,\n                                      max_records=None, next_token=None):\n        \"\"\"\n        Returns a description of each Auto Scaling instance in the instance_ids\n        list. If a list is not provided, the service returns the full details\n        of all instances up to a maximum of fifty.\n\n        This action supports pagination by returning a token if there are more\n        pages to retrieve. To get the next page, call this action again with\n        the returned token as the NextToken parameter.\n\n        :type instance_ids: list\n        :param instance_ids: List of Autoscaling Instance IDs which should be\n                             searched for.\n\n        :type max_records: int\n        :param max_records: Maximum number of results to return.\n\n        :rtype: list\n        :returns: List of :class:`boto.ec2.autoscale.activity.Activity` instances.\n        \"\"\"\n        params = {}\n        if instance_ids:\n            self.build_list_params(params, instance_ids, 'InstanceIds')\n        if max_records:\n            params['MaxRecords'] = max_records\n        if next_token:\n            params['NextToken'] = next_token\n        return self.get_list('DescribeAutoScalingInstances',\n                             params, [('member', Instance)])\n\n    def get_all_metric_collection_types(self):\n        \"\"\"\n        Returns a list of metrics and a corresponding list of granularities\n        for each metric.\n        \"\"\"\n        return self.get_object('DescribeMetricCollectionTypes',\n                               {}, MetricCollectionTypes)\n\n    def get_all_policies(self, as_group=None, policy_names=None,\n                         max_records=None, next_token=None):\n        \"\"\"\n        Returns descriptions of what each policy does. This action supports\n        pagination. If the response includes a token, there are more records\n        available. To get the additional records, repeat the request with the\n        response token as the NextToken parameter.\n\n        If no group name or list of policy names are provided, all available policies\n        are returned.\n\n        :type as_name: str\n        :param as_name: the name of the :class:`boto.ec2.autoscale.group.AutoScalingGroup` to filter for.\n\n        :type names: list\n        :param names: List of policy names which should be searched for.\n\n        :type max_records: int\n        :param max_records: Maximum amount of groups to return.\n        \"\"\"\n        params = {}\n        if as_group:\n            params['AutoScalingGroupName'] = as_group\n        if policy_names:\n            self.build_list_params(params, policy_names, 'PolicyNames')\n        if max_records:\n            params['MaxRecords'] = max_records\n        if next_token:\n            params['NextToken'] = next_token\n        return self.get_list('DescribePolicies', params,\n                             [('member', ScalingPolicy)])\n\n    def get_all_scaling_process_types(self):\n        \"\"\" Returns scaling process types for use in the ResumeProcesses and\n        SuspendProcesses actions.\n        \"\"\"\n        return self.get_list('DescribeScalingProcessTypes', {},\n                             [('member', ProcessType)])\n\n    def suspend_processes(self, as_group, scaling_processes=None):\n        \"\"\" Suspends Auto Scaling processes for an Auto Scaling group.\n\n        :type as_group: string\n        :param as_group: The auto scaling group to suspend processes on.\n\n        :type scaling_processes: list\n        :param scaling_processes: Processes you want to suspend. If omitted, all\n                                  processes will be suspended.\n        \"\"\"\n        params = {'AutoScalingGroupName' : as_group}\n        if scaling_processes:\n            self.build_list_params(params, scaling_processes, 'ScalingProcesses')\n        return self.get_status('SuspendProcesses', params)\n\n    def resume_processes(self, as_group, scaling_processes=None):\n        \"\"\" Resumes Auto Scaling processes for an Auto Scaling group.\n\n        :type as_group: string\n        :param as_group: The auto scaling group to resume processes on.\n\n        :type scaling_processes: list\n        :param scaling_processes: Processes you want to resume. If omitted, all\n                                  processes will be resumed.\n        \"\"\"\n        params = {\n                    'AutoScalingGroupName'      :   as_group\n                 }\n        if scaling_processes:\n            self.build_list_params(params, scaling_processes, 'ScalingProcesses')\n        return self.get_status('ResumeProcesses', params)\n\n    def create_scheduled_group_action(self, as_group, name, time, desired_capacity=None,\n                                      min_size=None, max_size=None):\n        \"\"\" Creates a scheduled scaling action for a Auto Scaling group. If you\n        leave a parameter unspecified, the corresponding value remains\n        unchanged in the affected Auto Scaling group.\n\n        :type as_group: string\n        :param as_group: The auto scaling group to get activities on.\n\n        :type name: string\n        :param name: Scheduled action name.\n\n        :type time: datetime.datetime\n        :param time: The time for this action to start.\n\n        :type desired_capacity: int\n        :param desired_capacity: The number of EC2 instances that should be running in\n                                this group.\n\n        :type min_size: int\n        :param min_size: The minimum size for the new auto scaling group.\n\n        :type max_size: int\n        :param max_size: The minimum size for the new auto scaling group.\n        \"\"\"\n        params = {\n                    'AutoScalingGroupName'      :   as_group,\n                    'ScheduledActionName'       :   name,\n                    'Time'                      :   time.isoformat(),\n                 }\n        if desired_capacity is not None:\n            params['DesiredCapacity'] = desired_capacity\n        if min_size is not None:\n            params['MinSize'] = min_size\n        if max_size is not None:\n            params['MaxSize'] = max_size\n        return self.get_status('PutScheduledUpdateGroupAction', params)\n\n    def get_all_scheduled_actions(self, as_group=None, start_time=None, end_time=None, scheduled_actions=None,\n                                  max_records=None, next_token=None):\n        params = {}\n        if as_group:\n            params['AutoScalingGroupName'] = as_group\n        if scheduled_actions:\n            self.build_list_params(params, scheduled_actions, 'ScheduledActionNames')\n        if max_records:\n            params['MaxRecords'] = max_records\n        if next_token:\n            params['NextToken'] = next_token\n        return self.get_list('DescribeScheduledActions', params, [('member', ScheduledUpdateGroupAction)])\n\n    def disable_metrics_collection(self, as_group, metrics=None):\n        \"\"\"\n        Disables monitoring of group metrics for the Auto Scaling group\n        specified in AutoScalingGroupName. You can specify the list of affected\n        metrics with the Metrics parameter.\n        \"\"\"\n        params = {\n                    'AutoScalingGroupName'      :   as_group,\n                 }\n        if metrics:\n            self.build_list_params(params, metrics, 'Metrics')\n        return self.get_status('DisableMetricsCollection', params)\n\n    def enable_metrics_collection(self, as_group, granularity, metrics=None):\n        \"\"\"\n        Enables monitoring of group metrics for the Auto Scaling group\n        specified in AutoScalingGroupName. You can specify the list of enabled\n        metrics with the Metrics parameter.\n\n        Auto scaling metrics collection can be turned on only if the\n        InstanceMonitoring.Enabled flag, in the Auto Scaling group's launch\n        configuration, is set to true.\n\n        :type autoscale_group: string\n        :param autoscale_group: The auto scaling group to get activities on.\n\n        :type granularity: string\n        :param granularity: The granularity to associate with the metrics to\n                            collect. Currently, the only legal granularity is \"1Minute\".\n\n        :type metrics: string list\n        :param metrics: The list of metrics to collect. If no metrics are\n                        specified, all metrics are enabled.\n        \"\"\"\n        params = {\n                    'AutoScalingGroupName'      :   as_group,\n                    'Granularity'               :   granularity,\n                 }\n        if metrics:\n            self.build_list_params(params, metrics, 'Metrics')\n        return self.get_status('EnableMetricsCollection', params)\n\n    def execute_policy(self, policy_name, as_group=None, honor_cooldown=None):\n        params = {\n                    'PolicyName'        :   policy_name,\n                 }\n        if as_group:\n            params['AutoScalingGroupName'] = as_group\n        if honor_cooldown:\n            params['HonorCooldown'] = honor_cooldown\n        return self.get_status('ExecutePolicy', params)\n\n    def set_instance_health(self, instance_id, health_status,\n                            should_respect_grace_period=True):\n        \"\"\"\n        Explicitly set the health status of an instance.\n\n        :type instance_id: str\n        :param instance_id: The identifier of the EC2 instance.\n\n        :type health_status: str\n        :param health_status: The health status of the instance.\n                              \"Healthy\" means that the instance is\n                              healthy and should remain in service.\n                              \"Unhealthy\" means that the instance is\n                              unhealthy. Auto Scaling should terminate\n                              and replace it.\n\n        :type should_respect_grace_period: bool\n        :param should_respect_grace_period: If True, this call should\n                                            respect the grace period\n                                            associated with the group.\n        \"\"\"\n        params = {'InstanceId' : instance_id,\n                  'HealthStatus' : health_status}\n        if should_respect_grace_period:\n            params['ShouldRespectGracePeriod'] = 'true'\n        else:\n            params['ShouldRespectGracePeriod'] = 'false'\n        return self.get_status('SetInstanceHealth', params)\n\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/ec2/autoscale/activity.py",
    "content": "# Copyright (c) 2009-2011 Reza Lotun http://reza.lotun.name/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nfrom datetime import datetime\n\n\nclass Activity(object):\n    def __init__(self, connection=None):\n        self.connection = connection\n        self.start_time = None\n        self.end_time = None\n        self.activity_id = None\n        self.progress = None\n        self.status_code = None\n        self.cause = None\n        self.description = None\n        self.status_message = None\n        self.group_name = None\n\n    def __repr__(self):\n        return 'Activity<%s>: For group:%s, progress:%s, cause:%s' % (self.activity_id,\n                                                                      self.group_name,\n                                                                      self.status_message,\n                                                                      self.cause)\n\n    def startElement(self, name, attrs, connection):\n        return None\n\n    def endElement(self, name, value, connection):\n        if name == 'ActivityId':\n            self.activity_id = value\n        elif name == 'AutoScalingGroupName':\n            self.group_name = value\n        elif name == 'StartTime':\n            try:\n                self.start_time = datetime.strptime(value, '%Y-%m-%dT%H:%M:%S.%fZ')\n            except ValueError:\n                self.start_time = datetime.strptime(value, '%Y-%m-%dT%H:%M:%SZ')\n        elif name == 'EndTime':\n            try:\n                self.end_time = datetime.strptime(value, '%Y-%m-%dT%H:%M:%S.%fZ')\n            except ValueError:\n                self.end_time = datetime.strptime(value, '%Y-%m-%dT%H:%M:%SZ')\n        elif name == 'Progress':\n            self.progress = value\n        elif name == 'Cause':\n            self.cause = value\n        elif name == 'Description':\n            self.description = value\n        elif name == 'StatusMessage':\n            self.status_message = value\n        elif name == 'StatusCode':\n            self.status_code = value\n        else:\n            setattr(self, name, value)\n\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/ec2/autoscale/group.py",
    "content": "# Copyright (c) 2009-2011 Reza Lotun http://reza.lotun.name/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\n\nfrom boto.ec2.elb.listelement import ListElement\nfrom boto.resultset import ResultSet\nfrom boto.ec2.autoscale.launchconfig import LaunchConfiguration\nfrom boto.ec2.autoscale.request import Request\nfrom boto.ec2.autoscale.instance import Instance\n\n\nclass ProcessType(object):\n    def __init__(self, connection=None):\n        self.connection = connection\n        self.process_name = None\n\n    def __repr__(self):\n        return 'ProcessType(%s)' % self.process_name\n\n    def startElement(self, name, attrs, connection):\n        pass\n\n    def endElement(self, name, value, connection):\n        if name == 'ProcessName':\n            self.process_name = value\n\n\nclass SuspendedProcess(object):\n    def __init__(self, connection=None):\n        self.connection = connection\n        self.process_name = None\n        self.reason = None\n\n    def __repr__(self):\n        return 'SuspendedProcess(%s, %s)' % (self.process_name, self.reason)\n\n    def startElement(self, name, attrs, connection):\n        pass\n\n    def endElement(self, name, value, connection):\n        if name == 'ProcessName':\n            self.process_name = value\n        elif name == 'SuspensionReason':\n            self.reason = value\n\n\nclass EnabledMetric(object):\n    def __init__(self, connection=None, metric=None, granularity=None):\n        self.connection = connection\n        self.metric = metric\n        self.granularity = granularity\n\n    def __repr__(self):\n        return 'EnabledMetric(%s, %s)' % (self.metric, self.granularity)\n\n    def startElement(self, name, attrs, connection):\n        pass\n\n    def endElement(self, name, value, connection):\n        if name == 'Granularity':\n            self.granularity = value\n        elif name == 'Metric':\n            self.metric = value\n\n\nclass AutoScalingGroup(object):\n    def __init__(self, connection=None, name=None,\n                 launch_config=None, availability_zones=None,\n                 load_balancers=None, default_cooldown=None,\n                 health_check_type=None, health_check_period=None,\n                 placement_group=None, vpc_zone_identifier=None, desired_capacity=None,\n                 min_size=None, max_size=None, **kwargs):\n        \"\"\"\n        Creates a new AutoScalingGroup with the specified name.\n\n        You must not have already used up your entire quota of\n        AutoScalingGroups in order for this call to be successful. Once the\n        creation request is completed, the AutoScalingGroup is ready to be\n        used in other calls.\n\n        :type name: str\n        :param name: Name of autoscaling group (required).\n\n        :type availability_zones: list\n        :param availability_zones: List of availability zones (required).\n\n        :type default_cooldown: int\n        :param default_cooldown: Number of seconds after a Scaling Activity completes\n                                 before any further scaling activities can start.\n\n        :type desired_capacity: int\n        :param desired_capacity: The desired capacity for the group.\n\n        :type health_check_period: str\n        :param health_check_period: Length of time in seconds after a new EC2 instance\n                                    comes into service that Auto Scaling starts checking its\n                                    health.\n\n        :type health_check_type: str\n        :param health_check_type: The service you want the health status from,\n                                   Amazon EC2 or Elastic Load Balancer.\n\n        :type launch_config: str or LaunchConfiguration\n        :param launch_config: Name of launch configuration (required).\n\n\n        :type load_balancers: list\n        :param load_balancers: List of load balancers.\n\n        :type max_size: int\n        :param maxsize: Maximum size of group (required).\n\n        :type min_size: int\n        :param minsize: Minimum size of group (required).\n\n        :type placement_group: str\n        :param placement_group: Physical location of your cluster placement\n                                group created in Amazon EC2.\n\n        :type vpc_zone_identifier: str\n        :param vpc_zone_identifier: The subnet identifier of the Virtual Private Cloud.\n\n        :rtype: :class:`boto.ec2.autoscale.group.AutoScalingGroup`\n        :return: An autoscale group.\n        \"\"\"\n        self.name = name or kwargs.get('group_name')   # backwards compatibility\n        self.connection = connection\n        self.min_size = int(min_size) if min_size is not None else None\n        self.max_size = int(max_size) if max_size is not None else None\n        self.created_time = None\n        default_cooldown = default_cooldown or kwargs.get('cooldown')  # backwards compatibility\n        self.default_cooldown = int(default_cooldown) if default_cooldown is not None else None\n        self.launch_config_name = launch_config\n        if launch_config and isinstance(launch_config, LaunchConfiguration):\n            self.launch_config_name = launch_config.name\n        self.desired_capacity = desired_capacity\n        lbs = load_balancers or []\n        self.load_balancers = ListElement(lbs)\n        zones = availability_zones or []\n        self.availability_zones = ListElement(zones)\n        self.health_check_period = health_check_period\n        self.health_check_type = health_check_type\n        self.placement_group = placement_group\n        self.autoscaling_group_arn = None\n        self.vpc_zone_identifier = vpc_zone_identifier\n        self.instances = None\n\n    # backwards compatible access to 'cooldown' param\n    def _get_cooldown(self):\n        return self.default_cooldown\n    def _set_cooldown(self, val):\n        self.default_cooldown = val\n    cooldown = property(_get_cooldown, _set_cooldown)\n\n    def __repr__(self):\n        return 'AutoScalingGroup<%s>: created:%s, minsize:%s, maxsize:%s, capacity:%s' % (self.name,\n                                                                                          self.created_time,\n                                                                                          self.min_size,\n                                                                                          self.max_size,\n                                                                                          self.desired_capacity)\n\n    def startElement(self, name, attrs, connection):\n        if name == 'Instances':\n            self.instances = ResultSet([('member', Instance)])\n            return self.instances\n        elif name == 'LoadBalancerNames':\n            return self.load_balancers\n        elif name == 'AvailabilityZones':\n            return self.availability_zones\n        elif name == 'EnabledMetrics':\n            self.enabled_metrics = ResultSet([('member', EnabledMetric)])\n            return self.enabled_metrics\n        elif name == 'SuspendedProcesses':\n            self.suspended_processes = ResultSet([('member', SuspendedProcess)])\n            return self.suspended_processes\n        else:\n            return\n\n    def endElement(self, name, value, connection):\n        if name == 'MinSize':\n            self.min_size = int(value)\n        elif name == 'AutoScalingGroupARN':\n            self.autoscaling_group_arn = value\n        elif name == 'CreatedTime':\n            self.created_time = value\n        elif name == 'DefaultCooldown':\n            self.default_cooldown = int(value)\n        elif name == 'LaunchConfigurationName':\n            self.launch_config_name = value\n        elif name == 'DesiredCapacity':\n            self.desired_capacity = int(value)\n        elif name == 'MaxSize':\n            self.max_size = int(value)\n        elif name == 'AutoScalingGroupName':\n            self.name = value\n        elif name == 'PlacementGroup':\n            self.placement_group = value\n        elif name == 'HealthCheckGracePeriod':\n            self.health_check_period = int(value)\n        elif name == 'HealthCheckType':\n            self.health_check_type = value\n        elif name == 'VPCZoneIdentifier':\n            self.vpc_zone_identifier = value\n        else:\n            setattr(self, name, value)\n\n    def set_capacity(self, capacity):\n        \"\"\" Set the desired capacity for the group. \"\"\"\n        params = {\n                  'AutoScalingGroupName' : self.name,\n                  'DesiredCapacity'      : capacity,\n                 }\n        req = self.connection.get_object('SetDesiredCapacity', params,\n                                            Request)\n        self.connection.last_request = req\n        return req\n\n    def update(self):\n        \"\"\" Sync local changes with AutoScaling group. \"\"\"\n        return self.connection._update_group('UpdateAutoScalingGroup', self)\n\n    def shutdown_instances(self):\n        \"\"\" Convenience method which shuts down all instances associated with\n        this group.\n        \"\"\"\n        self.min_size = 0\n        self.max_size = 0\n        self.desired_capacity = 0\n        self.update()\n\n    def delete(self, force_delete=False):\n        \"\"\" Delete this auto-scaling group if no instances attached or no\n        scaling activities in progress.\n        \"\"\"\n        return self.connection.delete_auto_scaling_group(self.name, force_delete)\n\n    def get_activities(self, activity_ids=None, max_records=50):\n        \"\"\"\n        Get all activies for this group.\n        \"\"\"\n        return self.connection.get_all_activities(self, activity_ids, max_records)\n\n    def suspend_processes(self, scaling_processes=None):\n        \"\"\" Suspends Auto Scaling processes for an Auto Scaling group. \"\"\"\n        return self.connection.suspend_processes(self.name, scaling_processes)\n\n    def resume_processes(self, scaling_processes=None):\n        \"\"\" Resumes Auto Scaling processes for an Auto Scaling group. \"\"\"\n        return self.connection.resume_processes(self.name, scaling_processes)\n\n\nclass AutoScalingGroupMetric(object):\n    def __init__(self, connection=None):\n\n        self.connection = connection\n        self.metric = None\n        self.granularity = None\n\n    def __repr__(self):\n        return 'AutoScalingGroupMetric:%s' % self.metric\n\n    def startElement(self, name, attrs, connection):\n        return\n\n    def endElement(self, name, value, connection):\n        if name == 'Metric':\n            self.metric = value\n        elif name == 'Granularity':\n            self.granularity = value\n        else:\n            setattr(self, name, value)\n\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/ec2/autoscale/instance.py",
    "content": "# Copyright (c) 2009 Reza Lotun http://reza.lotun.name/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\n\nclass Instance(object):\n    def __init__(self, connection=None):\n        self.connection = connection\n        self.instance_id = None\n        self.health_status = None\n        self.launch_config_name = None\n        self.lifecycle_state = None\n        self.availability_zone = None\n        self.group_name = None\n\n    def __repr__(self):\n        r = 'Instance<id:%s, state:%s, health:%s' % (self.instance_id,\n                                                     self.lifecycle_state,\n                                                     self.health_status)\n        if self.group_name:\n            r += ' group:%s' % self.group_name\n        r += '>'\n        return r\n\n    def startElement(self, name, attrs, connection):\n        return None\n\n    def endElement(self, name, value, connection):\n        if name == 'InstanceId':\n            self.instance_id = value\n        elif name == 'HealthStatus':\n            self.health_status = value\n        elif name == 'LaunchConfigurationName':\n            self.launch_config_name = value\n        elif name == 'LifecycleState':\n            self.lifecycle_state = value\n        elif name == 'AvailabilityZone':\n            self.availability_zone = value\n        elif name == 'AutoScalingGroupName':\n            self.group_name = value\n        else:\n            setattr(self, name, value)\n\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/ec2/autoscale/launchconfig.py",
    "content": "# Copyright (c) 2009 Reza Lotun http://reza.lotun.name/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\n\nfrom datetime import datetime\nimport base64\nfrom boto.resultset import ResultSet\nfrom boto.ec2.elb.listelement import ListElement\n\n# this should use the corresponding object from boto.ec2\nclass Ebs(object):\n    def __init__(self, connection=None, snapshot_id=None, volume_size=None):\n        self.connection = connection\n        self.snapshot_id = snapshot_id\n        self.volume_size = volume_size\n\n    def __repr__(self):\n        return 'Ebs(%s, %s)' % (self.snapshot_id, self.volume_size)\n\n    def startElement(self, name, attrs, connection):\n        pass\n\n    def endElement(self, name, value, connection):\n        if name == 'SnapshotId':\n            self.snapshot_id = value\n        elif name == 'VolumeSize':\n            self.volume_size = value\n\n\nclass InstanceMonitoring(object):\n    def __init__(self, connection=None, enabled='false'):\n        self.connection = connection\n        self.enabled = enabled\n\n    def __repr__(self):\n        return 'InstanceMonitoring(%s)' % self.enabled\n\n    def startElement(self, name, attrs, connection):\n        pass\n\n    def endElement(self, name, value, connection):\n        if name == 'Enabled':\n            self.enabled = value\n\n\n# this should use the BlockDeviceMapping from boto.ec2.blockdevicemapping\nclass BlockDeviceMapping(object):\n    def __init__(self, connection=None, device_name=None, virtual_name=None):\n        self.connection = connection\n        self.device_name = None\n        self.virtual_name = None\n        self.ebs = None\n\n    def __repr__(self):\n        return 'BlockDeviceMapping(%s, %s)' % (self.device_name, self.virtual_name)\n\n    def startElement(self, name, attrs, connection):\n        if name == 'Ebs':\n            self.ebs = Ebs(self)\n            return self.ebs\n\n    def endElement(self, name, value, connection):\n        if name == 'DeviceName':\n            self.device_name = value\n        elif name == 'VirtualName':\n            self.virtual_name = value\n\n\nclass LaunchConfiguration(object):\n    def __init__(self, connection=None, name=None, image_id=None,\n                 key_name=None, security_groups=None, user_data=None,\n                 instance_type='m1.small', kernel_id=None,\n                 ramdisk_id=None, block_device_mappings=None,\n                 instance_monitoring=False):\n        \"\"\"\n        A launch configuration.\n\n        :type name: str\n        :param name: Name of the launch configuration to create.\n\n        :type image_id: str\n        :param image_id: Unique ID of the Amazon Machine Image (AMI) which was\n                         assigned during registration.\n\n        :type key_name: str\n        :param key_name: The name of the EC2 key pair.\n\n        :type security_groups: list\n        :param security_groups: Names of the security groups with which to\n                                associate the EC2 instances.\n\n        :type user_data: str\n        :param user_data: The user data available to launched EC2 instances.\n\n        :type instance_type: str\n        :param instance_type: The instance type\n\n        :type kern_id: str\n        :param kern_id: Kernel id for instance\n\n        :type ramdisk_id: str\n        :param ramdisk_id: RAM disk id for instance\n\n        :type block_device_mappings: list\n        :param block_device_mappings: Specifies how block devices are exposed\n                                      for instances\n\n        :type instance_monitoring: bool\n        :param instance_monitoring: Whether instances in group are launched\n                                    with detailed monitoring.\n        \"\"\"\n        self.connection = connection\n        self.name = name\n        self.instance_type = instance_type\n        self.block_device_mappings = block_device_mappings\n        self.key_name = key_name\n        sec_groups = security_groups or []\n        self.security_groups = ListElement(sec_groups)\n        self.image_id = image_id\n        self.ramdisk_id = ramdisk_id\n        self.created_time = None\n        self.kernel_id = kernel_id\n        self.user_data = user_data\n        self.created_time = None\n        self.instance_monitoring = instance_monitoring\n        self.launch_configuration_arn = None\n\n    def __repr__(self):\n        return 'LaunchConfiguration:%s' % self.name\n\n    def startElement(self, name, attrs, connection):\n        if name == 'SecurityGroups':\n            return self.security_groups\n        elif name == 'BlockDeviceMappings':\n            self.block_device_mappings = ResultSet([('member', BlockDeviceMapping)])\n            return self.block_device_mappings\n        elif name == 'InstanceMonitoring':\n            self.instance_monitoring = InstanceMonitoring(self)\n            return self.instance_monitoring\n\n    def endElement(self, name, value, connection):\n        if name == 'InstanceType':\n            self.instance_type = value\n        elif name == 'LaunchConfigurationName':\n            self.name = value\n        elif name == 'KeyName':\n            self.key_name = value\n        elif name == 'ImageId':\n            self.image_id = value\n        elif name == 'CreatedTime':\n            try:\n                self.created_time = datetime.strptime(value, '%Y-%m-%dT%H:%M:%S.%fZ')\n            except ValueError:\n                self.created_time = datetime.strptime(value, '%Y-%m-%dT%H:%M:%SZ')\n        elif name == 'KernelId':\n            self.kernel_id = value\n        elif name == 'RamdiskId':\n            self.ramdisk_id = value\n        elif name == 'UserData':\n            self.user_data = base64.b64decode(value)\n        elif name == 'LaunchConfigurationARN':\n            self.launch_configuration_arn = value\n        elif name == 'InstanceMonitoring':\n            self.instance_monitoring = value\n        else:\n            setattr(self, name, value)\n\n    def delete(self):\n        \"\"\" Delete this launch configuration. \"\"\"\n        return self.connection.delete_launch_configuration(self.name)\n\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/ec2/autoscale/policy.py",
    "content": "# Copyright (c) 2009-2010 Reza Lotun http://reza.lotun.name/\n# Copyright (c) 2011 Jann Kleen\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nfrom boto.resultset import ResultSet\nfrom boto.ec2.elb.listelement import ListElement\n\nclass Alarm(object):\n    def __init__(self, connection=None):\n        self.connection = connection\n        self.name = None\n        self.alarm_arn = None\n\n    def __repr__(self):\n        return 'Alarm:%s' % self.name\n\n    def startElement(self, name, attrs, connection):\n        return None\n\n    def endElement(self, name, value, connection):\n        if name == 'AlarmName':\n            self.name = value\n        elif name == 'AlarmARN':\n            self.alarm_arn = value\n        else:\n            setattr(self, name, value)\n\n\nclass AdjustmentType(object):\n    def __init__(self, connection=None):\n        self.connection = connection\n        self.adjustment_types = ListElement([])\n\n    def __repr__(self):\n        return 'AdjustmentType:%s' % self.adjustment_types\n\n    def startElement(self, name, attrs, connection):\n        if name == 'AdjustmentType':\n            return self.adjustment_types\n\n    def endElement(self, name, value, connection):\n        return\n\n\nclass MetricCollectionTypes(object):\n    class BaseType(object):\n        arg = ''\n        def __init__(self, connection):\n            self.connection = connection\n            self.val = None\n        def __repr__(self):\n            return '%s:%s' % (self.arg, self.val)\n        def startElement(self, name, attrs, connection):\n            return\n        def endElement(self, name, value, connection):\n            if name == self.arg:\n                self.val = value\n    class Metric(BaseType):\n        arg = 'Metric'\n    class Granularity(BaseType):\n        arg = 'Granularity'\n\n    def __init__(self, connection=None):\n        self.connection = connection\n        self.metrics = []\n        self.granularities = []\n\n    def __repr__(self):\n        return 'MetricCollectionTypes:<%s, %s>' % (self.metrics, self.granularities)\n\n    def startElement(self, name, attrs, connection):\n        if name == 'Granularities':\n            self.granularities = ResultSet([('member', self.Granularity)])\n            return self.granularities\n        elif name == 'Metrics':\n            self.metrics = ResultSet([('member', self.Metric)])\n            return self.metrics\n\n    def endElement(self, name, value, connection):\n        return\n\n\nclass ScalingPolicy(object):\n    def __init__(self, connection=None, **kwargs):\n        \"\"\"\n        Scaling Policy\n\n        :type name: str\n        :param name: Name of scaling policy.\n\n        :type adjustment_type: str\n        :param adjustment_type: Specifies the type of adjustment. Valid values are `ChangeInCapacity`, `ExactCapacity` and `PercentChangeInCapacity`.\n\n        :type as_name: str or int\n        :param as_name: Name or ARN of the Auto Scaling Group.\n\n        :type scaling_adjustment: int\n        :param scaling_adjustment: Value of adjustment (type specified in `adjustment_type`).\n\n        :type cooldown: int\n        :param cooldown: Time (in seconds) before Alarm related Scaling Activities can start after the previous Scaling Activity ends.\n\n        \"\"\"\n        self.name = kwargs.get('name', None)\n        self.adjustment_type = kwargs.get('adjustment_type', None)\n        self.as_name = kwargs.get('as_name', None)\n        self.scaling_adjustment = kwargs.get('scaling_adjustment', None)\n        self.cooldown = kwargs.get('cooldown', None)\n        self.connection = connection\n\n    def __repr__(self):\n        return 'ScalingPolicy(%s group:%s adjustment:%s)' % (self.name,\n                                                             self.as_name,\n                                                             self.adjustment_type)\n\n    def startElement(self, name, attrs, connection):\n        if name == 'Alarms':\n            self.alarms = ResultSet([('member', Alarm)])\n            return self.alarms\n\n    def endElement(self, name, value, connection):\n        if name == 'PolicyName':\n            self.name = value\n        elif name == 'AutoScalingGroupName':\n            self.as_name = value\n        elif name == 'PolicyARN':\n            self.policy_arn = value\n        elif name == 'ScalingAdjustment':\n            self.scaling_adjustment = int(value)\n        elif name == 'Cooldown':\n            self.cooldown = int(value)\n        elif name == 'AdjustmentType':\n            self.adjustment_type = value\n\n    def delete(self):\n        return self.connection.delete_policy(self.name, self.as_name)\n\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/ec2/autoscale/request.py",
    "content": "# Copyright (c) 2009 Reza Lotun http://reza.lotun.name/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nclass Request(object):\n    def __init__(self, connection=None):\n        self.connection = connection\n        self.request_id = ''\n\n    def __repr__(self):\n        return 'Request:%s' % self.request_id\n\n    def startElement(self, name, attrs, connection):\n        return None\n\n    def endElement(self, name, value, connection):\n        if name == 'RequestId':\n            self.request_id = value\n        else:\n            setattr(self, name, value)\n\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/ec2/autoscale/scheduled.py",
    "content": "# Copyright (c) 2009-2010 Reza Lotun http://reza.lotun.name/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\n\nfrom datetime import datetime\n\n\nclass ScheduledUpdateGroupAction(object):\n    def __init__(self, connection=None):\n        self.connection = connection\n        self.name = None\n        self.action_arn = None\n        self.time = None\n        self.desired_capacity = None\n        self.max_size = None\n        self.min_size = None\n\n    def __repr__(self):\n        return 'ScheduledUpdateGroupAction:%s' % self.name\n\n    def startElement(self, name, attrs, connection):\n        return None\n\n    def endElement(self, name, value, connection):\n        if name == 'DesiredCapacity':\n            self.desired_capacity = value\n        elif name == 'ScheduledActionName':\n            self.name = value\n        elif name == 'MaxSize':\n            self.max_size = int(value)\n        elif name == 'MinSize':\n            self.min_size = int(value)\n        elif name == 'ScheduledActionARN':\n            self.action_arn = value\n        elif name == 'Time':\n            try:\n                self.time = datetime.strptime(value, '%Y-%m-%dT%H:%M:%S.%fZ')\n            except ValueError:\n                self.time = datetime.strptime(value, '%Y-%m-%dT%H:%M:%SZ')\n        else:\n            setattr(self, name, value)\n\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/ec2/blockdevicemapping.py",
    "content": "# Copyright (c) 2009 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n#\n\nclass BlockDeviceType(object):\n\n    def __init__(self,\n                 connection=None,\n                 ephemeral_name=None,\n                 no_device=False,\n                 volume_id=None,\n                 snapshot_id=None,\n                 status=None,\n                 attach_time=None,\n                 delete_on_termination=False,\n                 size=None):\n        self.connection = connection\n        self.ephemeral_name = ephemeral_name\n        self.no_device = no_device\n        self.volume_id = volume_id\n        self.snapshot_id = snapshot_id\n        self.status = status\n        self.attach_time = attach_time\n        self.delete_on_termination = delete_on_termination\n        self.size = size\n\n    def startElement(self, name, attrs, connection):\n        pass\n\n    def endElement(self, name, value, connection):\n        if name =='volumeId':\n            self.volume_id = value\n        elif name == 'virtualName':\n            self.ephemeral_name = value\n        elif name =='NoDevice':\n            self.no_device = (value == 'true')\n        elif name =='snapshotId':\n            self.snapshot_id = value\n        elif name == 'volumeSize':\n            self.size = int(value)\n        elif name == 'status':\n            self.status = value\n        elif name == 'attachTime':\n            self.attach_time = value\n        elif name == 'deleteOnTermination':\n            if value == 'true':\n                self.delete_on_termination = True\n            else:\n                self.delete_on_termination = False\n        else:\n            setattr(self, name, value)\n\n# for backwards compatibility\nEBSBlockDeviceType = BlockDeviceType\n\nclass BlockDeviceMapping(dict):\n\n    def __init__(self, connection=None):\n        dict.__init__(self)\n        self.connection = connection\n        self.current_name = None\n        self.current_value = None\n\n    def startElement(self, name, attrs, connection):\n        if name == 'ebs' or name == 'virtualName':\n            self.current_value = BlockDeviceType(self)\n            return self.current_value\n\n    def endElement(self, name, value, connection):\n        if name == 'device' or name == 'deviceName':\n            self.current_name = value\n        elif name == 'item':\n            self[self.current_name] = self.current_value\n\n    def build_list_params(self, params, prefix=''):\n        i = 1\n        for dev_name in self:\n            pre = '%sBlockDeviceMapping.%d' % (prefix, i)\n            params['%s.DeviceName' % pre] = dev_name\n            block_dev = self[dev_name]\n            if block_dev.ephemeral_name:\n                params['%s.VirtualName' % pre] = block_dev.ephemeral_name\n            else:\n                if block_dev.no_device:\n                    params['%s.Ebs.NoDevice' % pre] = 'true'\n                if block_dev.snapshot_id:\n                    params['%s.Ebs.SnapshotId' % pre] = block_dev.snapshot_id\n                if block_dev.size:\n                    params['%s.Ebs.VolumeSize' % pre] = block_dev.size\n                if block_dev.delete_on_termination:\n                    params['%s.Ebs.DeleteOnTermination' % pre] = 'true'\n                else:\n                    params['%s.Ebs.DeleteOnTermination' % pre] = 'false'\n            i += 1\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/ec2/bundleinstance.py",
    "content": "# Copyright (c) 2010 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\n\"\"\"\nRepresents an EC2 Bundle Task \n\"\"\"\n\nfrom boto.ec2.ec2object import EC2Object\n\nclass BundleInstanceTask(EC2Object):\n    \n    def __init__(self, connection=None):\n        EC2Object.__init__(self, connection)\n        self.id = None\n        self.instance_id = None\n        self.progress = None\n        self.start_time = None\n        self.state = None\n        self.bucket = None\n        self.prefix = None\n        self.upload_policy = None\n        self.upload_policy_signature = None\n        self.update_time = None \n        self.code = None\n        self.message = None\n\n    def __repr__(self):\n        return 'BundleInstanceTask:%s' % self.id\n\n    def startElement(self, name, attrs, connection):\n        return None\n\n    def endElement(self, name, value, connection):\n        if name == 'bundleId':\n            self.id = value\n        elif name == 'instanceId':\n            self.instance_id = value\n        elif name == 'progress':\n            self.progress = value\n        elif name == 'startTime':\n            self.start_time = value\n        elif name == 'state':\n            self.state = value\n        elif name == 'bucket':\n            self.bucket = value\n        elif name == 'prefix':\n            self.prefix = value\n        elif name == 'uploadPolicy':\n            self.upload_policy = value\n        elif name == 'uploadPolicySignature':\n            self.upload_policy_signature = value\n        elif name == 'updateTime':\n            self.update_time = value\n        elif name == 'code':\n            self.code = value\n        elif name == 'message':\n            self.message = value\n        else:\n            setattr(self, name, value)\n\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/ec2/buyreservation.py",
    "content": "# Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nimport boto.ec2\nfrom boto.sdb.db.property import StringProperty, IntegerProperty\nfrom boto.manage import propget\n\nInstanceTypes = ['m1.small', 'm1.large', 'm1.xlarge',\n                 'c1.medium', 'c1.xlarge', 'm2.xlarge',\n                 'm2.2xlarge', 'm2.4xlarge', 'cc1.4xlarge',\n                 't1.micro']\n\nclass BuyReservation(object):\n\n    def get_region(self, params):\n        if not params.get('region', None):\n            prop = StringProperty(name='region', verbose_name='EC2 Region',\n                                  choices=boto.ec2.regions)\n            params['region'] = propget.get(prop, choices=boto.ec2.regions)\n\n    def get_instance_type(self, params):\n        if not params.get('instance_type', None):\n            prop = StringProperty(name='instance_type', verbose_name='Instance Type',\n                                  choices=InstanceTypes)\n            params['instance_type'] = propget.get(prop)\n\n    def get_quantity(self, params):\n        if not params.get('quantity', None):\n            prop = IntegerProperty(name='quantity', verbose_name='Number of Instances')\n            params['quantity'] = propget.get(prop)\n\n    def get_zone(self, params):\n        if not params.get('zone', None):\n            prop = StringProperty(name='zone', verbose_name='EC2 Availability Zone',\n                                  choices=self.ec2.get_all_zones)\n            params['zone'] = propget.get(prop)\n            \n    def get(self, params):\n        self.get_region(params)\n        self.ec2 = params['region'].connect()\n        self.get_instance_type(params)\n        self.get_zone(params)\n        self.get_quantity(params)\n\nif __name__ == \"__main__\":\n    obj = BuyReservation()\n    params = {}\n    obj.get(params)\n    offerings = obj.ec2.get_all_reserved_instances_offerings(instance_type=params['instance_type'],\n                                                             availability_zone=params['zone'].name)\n    print '\\nThe following Reserved Instances Offerings are available:\\n'\n    for offering in offerings:\n        offering.describe()\n    prop = StringProperty(name='offering', verbose_name='Offering',\n                          choices=offerings)\n    offering = propget.get(prop)\n    print '\\nYou have chosen this offering:'\n    offering.describe()\n    unit_price = float(offering.fixed_price)\n    total_price = unit_price * params['quantity']\n    print '!!! You are about to purchase %d of these offerings for a total of $%.2f !!!' % (params['quantity'], total_price)\n    answer = raw_input('Are you sure you want to do this?  If so, enter YES: ')\n    if answer.strip().lower() == 'yes':\n        offering.purchase(params['quantity'])\n    else:\n        print 'Purchase cancelled'\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/ec2/cloudwatch/__init__.py",
    "content": "# Copyright (c) 2006-2011 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n#\n\"\"\"\nThis module provides an interface to the Elastic Compute Cloud (EC2)\nCloudWatch service from AWS.\n\nThe 5 Minute How-To Guide\n-------------------------\nFirst, make sure you have something to monitor.  You can either create a\nLoadBalancer or enable monitoring on an existing EC2 instance.  To enable\nmonitoring, you can either call the monitor_instance method on the\nEC2Connection object or call the monitor method on the Instance object.\n\nIt takes a while for the monitoring data to start accumulating but once\nit does, you can do this:\n\n>>> import boto\n>>> c = boto.connect_cloudwatch()\n>>> metrics = c.list_metrics()\n>>> metrics\n[Metric:NetworkIn,\n Metric:NetworkOut,\n Metric:NetworkOut(InstanceType,m1.small),\n Metric:NetworkIn(InstanceId,i-e573e68c),\n Metric:CPUUtilization(InstanceId,i-e573e68c),\n Metric:DiskWriteBytes(InstanceType,m1.small),\n Metric:DiskWriteBytes(ImageId,ami-a1ffb63),\n Metric:NetworkOut(ImageId,ami-a1ffb63),\n Metric:DiskWriteOps(InstanceType,m1.small),\n Metric:DiskReadBytes(InstanceType,m1.small),\n Metric:DiskReadOps(ImageId,ami-a1ffb63),\n Metric:CPUUtilization(InstanceType,m1.small),\n Metric:NetworkIn(ImageId,ami-a1ffb63),\n Metric:DiskReadOps(InstanceType,m1.small),\n Metric:DiskReadBytes,\n Metric:CPUUtilization,\n Metric:DiskWriteBytes(InstanceId,i-e573e68c),\n Metric:DiskWriteOps(InstanceId,i-e573e68c),\n Metric:DiskWriteOps,\n Metric:DiskReadOps,\n Metric:CPUUtilization(ImageId,ami-a1ffb63),\n Metric:DiskReadOps(InstanceId,i-e573e68c),\n Metric:NetworkOut(InstanceId,i-e573e68c),\n Metric:DiskReadBytes(ImageId,ami-a1ffb63),\n Metric:DiskReadBytes(InstanceId,i-e573e68c),\n Metric:DiskWriteBytes,\n Metric:NetworkIn(InstanceType,m1.small),\n Metric:DiskWriteOps(ImageId,ami-a1ffb63)]\n\nThe list_metrics call will return a list of all of the available metrics\nthat you can query against.  Each entry in the list is a Metric object.\nAs you can see from the list above, some of the metrics are generic metrics\nand some have Dimensions associated with them (e.g. InstanceType=m1.small).\nThe Dimension can be used to refine your query.  So, for example, I could\nquery the metric Metric:CPUUtilization which would create the desired statistic\nby aggregating cpu utilization data across all sources of information available\nor I could refine that by querying the metric\nMetric:CPUUtilization(InstanceId,i-e573e68c) which would use only the data\nassociated with the instance identified by the instance ID i-e573e68c.\n\nBecause for this example, I'm only monitoring a single instance, the set\nof metrics available to me are fairly limited.  If I was monitoring many\ninstances, using many different instance types and AMI's and also several\nload balancers, the list of available metrics would grow considerably.\n\nOnce you have the list of available metrics, you can actually\nquery the CloudWatch system for that metric.  Let's choose the CPU utilization\nmetric for our instance.\n\n>>> m = metrics[5]\n>>> m\nMetric:CPUUtilization(InstanceId,i-e573e68c)\n\nThe Metric object has a query method that lets us actually perform\nthe query against the collected data in CloudWatch.  To call that,\nwe need a start time and end time to control the time span of data\nthat we are interested in.  For this example, let's say we want the\ndata for the previous hour:\n\n>>> import datetime\n>>> end = datetime.datetime.now()\n>>> start = end - datetime.timedelta(hours=1)\n\nWe also need to supply the Statistic that we want reported and\nthe Units to use for the results.  The Statistic can be one of these\nvalues:\n\n['Minimum', 'Maximum', 'Sum', 'Average', 'SampleCount']\n\nAnd Units must be one of the following:\n\n['Seconds', 'Percent', 'Bytes', 'Bits', 'Count',\n'Bytes/Second', 'Bits/Second', 'Count/Second']\n\nThe query method also takes an optional parameter, period.  This\nparameter controls the granularity (in seconds) of the data returned.\nThe smallest period is 60 seconds and the value must be a multiple\nof 60 seconds.  So, let's ask for the average as a percent:\n\n>>> datapoints = m.query(start, end, 'Average', 'Percent')\n>>> len(datapoints)\n60\n\nOur period was 60 seconds and our duration was one hour so\nwe should get 60 data points back and we can see that we did.\nEach element in the datapoints list is a DataPoint object\nwhich is a simple subclass of a Python dict object.  Each\nDatapoint object contains all of the information available\nabout that particular data point.\n\n>>> d = datapoints[0]\n>>> d\n{u'Average': 0.0,\n u'SampleCount': 1.0,\n u'Timestamp': u'2009-05-21T19:55:00Z',\n u'Unit': u'Percent'}\n\nMy server obviously isn't very busy right now!\n\"\"\"\ntry:\n    import simplejson as json\nexcept ImportError:\n    import json\n\nfrom boto.connection import AWSQueryConnection\nfrom boto.ec2.cloudwatch.metric import Metric\nfrom boto.ec2.cloudwatch.alarm import MetricAlarm, AlarmHistoryItem\nfrom boto.ec2.cloudwatch.datapoint import Datapoint\nfrom boto.regioninfo import RegionInfo\nimport boto\n\nRegionData = {\n    'us-east-1' : 'monitoring.us-east-1.amazonaws.com',\n    'us-west-1' : 'monitoring.us-west-1.amazonaws.com',\n    'eu-west-1' : 'monitoring.eu-west-1.amazonaws.com',\n    'ap-northeast-1' : 'monitoring.ap-northeast-1.amazonaws.com',\n    'ap-southeast-1' : 'monitoring.ap-southeast-1.amazonaws.com'}\n\ndef regions():\n    \"\"\"\n    Get all available regions for the CloudWatch service.\n\n    :rtype: list\n    :return: A list of :class:`boto.RegionInfo` instances\n    \"\"\"\n    regions = []\n    for region_name in RegionData:\n        region = RegionInfo(name=region_name,\n                            endpoint=RegionData[region_name],\n                            connection_cls=CloudWatchConnection)\n        regions.append(region)\n    return regions\n\ndef connect_to_region(region_name, **kw_params):\n    \"\"\"\n    Given a valid region name, return a\n    :class:`boto.ec2.cloudwatch.CloudWatchConnection`.\n\n    :param str region_name: The name of the region to connect to.\n\n    :rtype: :class:`boto.ec2.CloudWatchConnection` or ``None``\n    :return: A connection to the given region, or None if an invalid region\n        name is given\n    \"\"\"\n    for region in regions():\n        if region.name == region_name:\n            return region.connect(**kw_params)\n    return None\n\n\nclass CloudWatchConnection(AWSQueryConnection):\n\n    APIVersion = boto.config.get('Boto', 'cloudwatch_version', '2010-08-01')\n    DefaultRegionName = boto.config.get('Boto', 'cloudwatch_region_name',\n                                        'us-east-1')\n    DefaultRegionEndpoint = boto.config.get('Boto',\n                                            'cloudwatch_region_endpoint',\n                                            'monitoring.amazonaws.com')\n\n\n    def __init__(self, aws_access_key_id=None, aws_secret_access_key=None,\n                 is_secure=True, port=None, proxy=None, proxy_port=None,\n                 proxy_user=None, proxy_pass=None, debug=0,\n                 https_connection_factory=None, region=None, path='/'):\n        \"\"\"\n        Init method to create a new connection to EC2 Monitoring Service.\n\n        B{Note:} The host argument is overridden by the host specified in the\n        boto configuration file.\n        \"\"\"\n        if not region:\n            region = RegionInfo(self, self.DefaultRegionName,\n                                self.DefaultRegionEndpoint)\n        self.region = region\n\n        AWSQueryConnection.__init__(self, aws_access_key_id,\n                                    aws_secret_access_key, \n                                    is_secure, port, proxy, proxy_port,\n                                    proxy_user, proxy_pass,\n                                    self.region.endpoint, debug,\n                                    https_connection_factory, path)\n\n    def _required_auth_capability(self):\n        return ['ec2']\n\n    def build_dimension_param(self, dimension, params):\n        for dim_name in dimension:\n            dim_value = dimension[dim_name]\n            if isinstance(dim_value, basestring):\n                dim_value = [dim_value]\n            for i, value in enumerate(dim_value):\n                params['Dimensions.member.%d.Name' % (i+1)] = dim_name\n                params['Dimensions.member.%d.Value' % (i+1)] = value\n    \n    def build_list_params(self, params, items, label):\n        if isinstance(items, basestring):\n            items = [items]\n        for index, item in enumerate(items):\n            i = index + 1\n            if isinstance(item, dict):\n                for k,v in item.iteritems():\n                    params[label % (i, 'Name')] = k\n                    if v is not None:\n                        params[label % (i, 'Value')] = v\n            else:\n                params[label % i] = item\n\n    def build_put_params(self, params, name, value=None, timestamp=None, \n                        unit=None, dimensions=None, statistics=None):\n        args = (name, value, unit, dimensions, statistics)\n        length = max(map(lambda a: len(a) if isinstance(a, list) else 1, args))\n\n        def aslist(a):\n            if isinstance(a, list):\n                if len(a) != length:\n                    raise Exception('Must specify equal number of elements; expected %d.' % length)\n                return a\n            return [a] * length\n\n        for index, (n, v, u, d, s) in enumerate(zip(*map(aslist, args))):\n            metric_data = {'MetricName': n}\n\n            if timestamp:\n                metric_data['Timestamp'] = timestamp.isoformat()\n            \n            if unit:\n                metric_data['Unit'] = u\n            \n            if dimensions:\n                self.build_dimension_param(d, metric_data)\n            \n            if statistics:\n                metric_data['StatisticValues.Maximum'] = s['maximum']\n                metric_data['StatisticValues.Minimum'] = s['minimum']\n                metric_data['StatisticValues.SampleCount'] = s['samplecount']\n                metric_data['StatisticValues.Sum'] = s['sum']\n                if value != None:\n                    msg = 'You supplied a value and statistics for a metric.'\n                    msg += 'Posting statistics and not value.'\n                    boto.log.warn(msg)\n            elif value != None:\n                metric_data['Value'] = v\n            else:\n                raise Exception('Must specify a value or statistics to put.')\n\n            for key, value in metric_data.iteritems():\n                params['MetricData.member.%d.%s' % (index + 1, key)] = value\n\n    def get_metric_statistics(self, period, start_time, end_time, metric_name,\n                              namespace, statistics, dimensions=None,\n                              unit=None):\n        \"\"\"\n        Get time-series data for one or more statistics of a given metric.\n\n        :type period: integer\n        :param period: The granularity, in seconds, of the returned datapoints.\n                       Period must be at least 60 seconds and must be a multiple\n                       of 60. The default value is 60.\n\n        :type start_time: datetime\n        :param start_time: The time stamp to use for determining the first\n                           datapoint to return. The value specified is\n                           inclusive; results include datapoints with the\n                           time stamp specified.\n\n        :type end_time: datetime\n        :param end_time: The time stamp to use for determining the last\n                         datapoint to return. The value specified is\n                         exclusive; results will include datapoints up to\n                         the time stamp specified.\n\n        :type metric_name: string\n        :param metric_name: The metric name.\n\n        :type namespace: string\n        :param namespace: The metric's namespace.\n\n        :type statistics: list\n        :param statistics: A list of statistics names Valid values:\n                           Average | Sum | SampleCount | Maximum | Minimum\n\n        :type dimensions: dict\n        :param dimensions: A dictionary of dimension key/values where\n                           the key is the dimension name and the value\n                           is either a scalar value or an iterator\n                           of values to be associated with that\n                           dimension.\n        :rtype: list\n        \"\"\"\n        params = {'Period' : period,\n                  'MetricName' : metric_name,\n                  'Namespace' : namespace,\n                  'StartTime' : start_time.isoformat(),\n                  'EndTime' : end_time.isoformat()}\n        self.build_list_params(params, statistics, 'Statistics.member.%d')\n        if dimensions:\n            self.build_dimension_param(dimensions, params)\n        return self.get_list('GetMetricStatistics', params,\n                             [('member', Datapoint)])\n\n    def list_metrics(self, next_token=None, dimensions=None,\n                     metric_name=None, namespace=None):\n        \"\"\"\n        Returns a list of the valid metrics for which there is recorded\n        data available.\n\n        :type next_token: str\n        :param next_token: A maximum of 500 metrics will be returned at one\n                           time.  If more results are available, the\n                           ResultSet returned will contain a non-Null\n                           next_token attribute.  Passing that token as a\n                           parameter to list_metrics will retrieve the\n                           next page of metrics.\n\n        :type dimension: dict\n        :param dimension_filters: A dictionary containing name/value pairs\n                                  that will be used to filter the results.\n                                  The key in the dictionary is the name of\n                                  a Dimension.  The value in the dictionary\n                                  is either a scalar value of that Dimension\n                                  name that you want to filter on, a list\n                                  of values to filter on or None if\n                                  you want all metrics with that Dimension name.\n\n        :type metric_name: str\n        :param metric_name: The name of the Metric to filter against.  If None,\n                            all Metric names will be returned.\n\n        :type namespace: str\n        :param namespace: A Metric namespace to filter against (e.g. AWS/EC2).\n                          If None, Metrics from all namespaces will be returned.\n        \"\"\"\n        params = {}\n        if next_token:\n            params['NextToken'] = next_token\n        if dimensions:\n            self.build_dimension_param(dimensions, params)\n        if metric_name:\n            params['MetricName'] = metric_name\n        if namespace:\n            params['Namespace'] = namespace\n        \n        return self.get_list('ListMetrics', params, [('member', Metric)])\n    \n    def put_metric_data(self, namespace, name, value=None, timestamp=None, \n                        unit=None, dimensions=None, statistics=None):\n        \"\"\"\n        Publishes metric data points to Amazon CloudWatch. Amazon Cloudwatch \n        associates the data points with the specified metric. If the specified \n        metric does not exist, Amazon CloudWatch creates the metric. If a list \n        is specified for some, but not all, of the arguments, the remaining \n        arguments are repeated a corresponding number of times.\n\n        :type namespace: str\n        :param namespace: The namespace of the metric.\n\n        :type name: str or list\n        :param name: The name of the metric.\n\n        :type value: float or list\n        :param value: The value for the metric.\n\n        :type timestamp: datetime or list\n        :param timestamp: The time stamp used for the metric. If not specified, \n            the default value is set to the time the metric data was received.\n        \n        :type unit: string or list\n        :param unit: The unit of the metric.  Valid Values: Seconds | \n            Microseconds | Milliseconds | Bytes | Kilobytes |\n            Megabytes | Gigabytes | Terabytes | Bits | Kilobits |\n            Megabits | Gigabits | Terabits | Percent | Count |\n            Bytes/Second | Kilobytes/Second | Megabytes/Second |\n            Gigabytes/Second | Terabytes/Second | Bits/Second |\n            Kilobits/Second | Megabits/Second | Gigabits/Second |\n            Terabits/Second | Count/Second | None\n        \n        :type dimensions: dict\n        :param dimensions: Add extra name value pairs to associate \n            with the metric, i.e.:\n            {'name1': value1, 'name2': (value2, value3)}\n        \n        :type statistics: dict or list\n        :param statistics: Use a statistic set instead of a value, for example::\n\n            {'maximum': 30, 'minimum': 1, 'samplecount': 100, 'sum': 10000}\n        \"\"\"\n        params = {'Namespace': namespace}\n        self.build_put_params(params, name, value=value, timestamp=timestamp,\n            unit=unit, dimensions=dimensions, statistics=statistics)\n\n        return self.get_status('PutMetricData', params)\n\n\n    def describe_alarms(self, action_prefix=None, alarm_name_prefix=None,\n                        alarm_names=None, max_records=None, state_value=None,\n                        next_token=None):\n        \"\"\"\n        Retrieves alarms with the specified names. If no name is specified, all\n        alarms for the user are returned. Alarms can be retrieved by using only\n        a prefix for the alarm name, the alarm state, or a prefix for any\n        action.\n\n        :type action_prefix: string\n        :param action_name: The action name prefix.\n\n        :type alarm_name_prefix: string\n        :param alarm_name_prefix: The alarm name prefix. AlarmNames cannot\n                                  be specified if this parameter is specified.\n\n        :type alarm_names: list\n        :param alarm_names: A list of alarm names to retrieve information for.\n\n        :type max_records: int\n        :param max_records: The maximum number of alarm descriptions\n                            to retrieve.\n\n        :type state_value: string\n        :param state_value: The state value to be used in matching alarms.\n\n        :type next_token: string\n        :param next_token: The token returned by a previous call to\n                           indicate that there is more data.\n\n        :rtype list\n        \"\"\"\n        params = {}\n        if action_prefix:\n            params['ActionPrefix'] = action_prefix\n        if alarm_name_prefix:\n            params['AlarmNamePrefix'] = alarm_name_prefix\n        elif alarm_names:\n            self.build_list_params(params, alarm_names, 'AlarmNames.member.%s')\n        if max_records:\n            params['MaxRecords'] = max_records\n        if next_token:\n            params['NextToken'] = next_token\n        if state_value:\n            params['StateValue'] = state_value\n        return self.get_list('DescribeAlarms', params,\n                             [('member', MetricAlarm)])\n\n    def describe_alarm_history(self, alarm_name=None,\n                               start_date=None, end_date=None,\n                               max_records=None, history_item_type=None,\n                               next_token=None):\n        \"\"\"\n        Retrieves history for the specified alarm. Filter alarms by date range\n        or item type. If an alarm name is not specified, Amazon CloudWatch\n        returns histories for all of the owner's alarms.\n\n        Amazon CloudWatch retains the history of deleted alarms for a period of\n        six weeks. If an alarm has been deleted, its history can still be\n        queried.\n\n        :type alarm_name: string\n        :param alarm_name: The name of the alarm.\n\n        :type start_date: datetime\n        :param start_date: The starting date to retrieve alarm history.\n\n        :type end_date: datetime\n        :param end_date: The starting date to retrieve alarm history.\n\n        :type history_item_type: string\n        :param history_item_type: The type of alarm histories to retreive\n                                  (ConfigurationUpdate | StateUpdate | Action)\n\n        :type max_records: int\n        :param max_records: The maximum number of alarm descriptions\n                            to retrieve.\n\n        :type next_token: string\n        :param next_token: The token returned by a previous call to indicate\n                           that there is more data.\n\n        :rtype list\n        \"\"\"\n        params = {}\n        if alarm_name:\n            params['AlarmName'] = alarm_name\n        if start_date:\n            params['StartDate'] = start_date.isoformat()\n        if end_date:\n            params['EndDate'] = end_date.isoformat()\n        if history_item_type:\n            params['HistoryItemType'] = history_item_type\n        if max_records:\n            params['MaxRecords'] = max_records\n        if next_token:\n            params['NextToken'] = next_token\n        return self.get_list('DescribeAlarmHistory', params,\n                             [('member', AlarmHistoryItem)])\n\n    def describe_alarms_for_metric(self, metric_name, namespace, period=None,\n                                   statistic=None, dimensions=None, unit=None):\n        \"\"\"\n        Retrieves all alarms for a single metric. Specify a statistic, period,\n        or unit to filter the set of alarms further.\n\n        :type metric_name: string\n        :param metric_name: The name of the metric\n\n        :type namespace: string\n        :param namespace: The namespace of the metric.\n\n        :type period: int\n        :param period: The period in seconds over which the statistic\n                       is applied.\n\n        :type statistic: string\n        :param statistic: The statistic for the metric.\n\n        :param dimension_filters: A dictionary containing name/value pairs\n                                  that will be used to filter the results.\n                                  The key in the dictionary is the name of\n                                  a Dimension.  The value in the dictionary\n                                  is either a scalar value of that Dimension\n                                  name that you want to filter on, a list\n                                  of values to filter on or None if\n                                  you want all metrics with that Dimension name.\n\n        :type unit: string\n\n        :rtype list\n        \"\"\"\n        params = {'MetricName' : metric_name,\n                  'Namespace' : namespace}\n        if period:\n            params['Period'] = period\n        if statistic:\n            params['Statistic'] = statistic\n        if dimensions:\n            self.build_dimension_param(dimensions, params)\n        if unit:\n            params['Unit'] = unit\n        return self.get_list('DescribeAlarmsForMetric', params,\n                             [('member', MetricAlarm)])\n\n    def put_metric_alarm(self, alarm):\n        \"\"\"\n        Creates or updates an alarm and associates it with the specified Amazon\n        CloudWatch metric. Optionally, this operation can associate one or more\n        Amazon Simple Notification Service resources with the alarm.\n\n        When this operation creates an alarm, the alarm state is immediately\n        set to INSUFFICIENT_DATA. The alarm is evaluated and its StateValue is\n        set appropriately. Any actions associated with the StateValue is then\n        executed.\n\n        When updating an existing alarm, its StateValue is left unchanged.\n\n        :type alarm: boto.ec2.cloudwatch.alarm.MetricAlarm\n        :param alarm: MetricAlarm object.\n        \"\"\"\n        params = {\n                    'AlarmName'             :       alarm.name,\n                    'MetricName'            :       alarm.metric,\n                    'Namespace'             :       alarm.namespace,\n                    'Statistic'             :       alarm.statistic,\n                    'ComparisonOperator'    :       alarm.comparison,\n                    'Threshold'             :       alarm.threshold,\n                    'EvaluationPeriods'     :       alarm.evaluation_periods,\n                    'Period'                :       alarm.period,\n                 }\n        if alarm.actions_enabled is not None:\n            params['ActionsEnabled'] = alarm.actions_enabled\n        if alarm.alarm_actions:\n            self.build_list_params(params, alarm.alarm_actions,\n                                   'AlarmActions.member.%s')\n        if alarm.description:\n            params['AlarmDescription'] = alarm.description\n        if alarm.dimensions:\n            self.build_dimension_param(alarm.dimensions, params)\n        if alarm.insufficient_data_actions:\n            self.build_list_params(params, alarm.insufficient_data_actions,\n                                   'InsufficientDataActions.member.%s')\n        if alarm.ok_actions:\n            self.build_list_params(params, alarm.ok_actions,\n                                   'OKActions.member.%s')\n        if alarm.unit:\n            params['Unit'] = alarm.unit\n        alarm.connection = self\n        return self.get_status('PutMetricAlarm', params)\n    create_alarm = put_metric_alarm\n    update_alarm = put_metric_alarm\n\n    def delete_alarms(self, alarms):\n        \"\"\"\n        Deletes all specified alarms. In the event of an error, no\n        alarms are deleted.\n\n        :type alarms: list\n        :param alarms: List of alarm names.\n        \"\"\"\n        params = {}\n        self.build_list_params(params, alarms, 'AlarmNames.member.%s')\n        return self.get_status('DeleteAlarms', params)\n\n    def set_alarm_state(self, alarm_name, state_reason, state_value,\n                        state_reason_data=None):\n        \"\"\"\n        Temporarily sets the state of an alarm. When the updated StateValue\n        differs from the previous value, the action configured for the\n        appropriate state is invoked. This is not a permanent change. The next\n        periodic alarm check (in about a minute) will set the alarm to its\n        actual state.\n\n        :type alarm_name: string\n        :param alarm_name: Descriptive name for alarm.\n\n        :type state_reason: string\n        :param state_reason: Human readable reason.\n\n        :type state_value: string\n        :param state_value: OK | ALARM | INSUFFICIENT_DATA\n\n        :type state_reason_data: string\n        :param state_reason_data: Reason string (will be jsonified).\n        \"\"\"\n        params = {'AlarmName' : alarm_name,\n                  'StateReason' : state_reason,\n                  'StateValue' : state_value}\n        if state_reason_data:\n            params['StateReasonData'] = json.dumps(state_reason_data)\n\n        return self.get_status('SetAlarmState', params)\n\n    def enable_alarm_actions(self, alarm_names):\n        \"\"\"\n        Enables actions for the specified alarms.\n\n        :type alarms: list\n        :param alarms: List of alarm names.\n        \"\"\"\n        params = {}\n        self.build_list_params(params, alarm_names, 'AlarmNames.member.%s')\n        return self.get_status('EnableAlarmActions', params)\n\n    def disable_alarm_actions(self, alarm_names):\n        \"\"\"\n        Disables actions for the specified alarms.\n\n        :type alarms: list\n        :param alarms: List of alarm names.\n        \"\"\"\n        params = {}\n        self.build_list_params(params, alarm_names, 'AlarmNames.member.%s')\n        return self.get_status('DisableAlarmActions', params)\n\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/ec2/cloudwatch/alarm.py",
    "content": "# Copyright (c) 2010 Reza Lotun http://reza.lotun.name\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n#\n\nfrom datetime import datetime\nfrom boto.resultset import ResultSet\nfrom boto.ec2.cloudwatch.listelement import ListElement\ntry:\n    import simplejson as json\nexcept ImportError:\n    import json\n\nclass MetricAlarm(object):\n\n    OK = 'OK'\n    ALARM = 'ALARM'\n    INSUFFICIENT_DATA = 'INSUFFICIENT_DATA'\n\n    _cmp_map = {\n                    '>='    :   'GreaterThanOrEqualToThreshold',\n                    '>'     :   'GreaterThanThreshold',\n                    '<'     :   'LessThanThreshold',\n                    '<='    :   'LessThanOrEqualToThreshold',\n               }\n    _rev_cmp_map = dict((v, k) for (k, v) in _cmp_map.iteritems())\n\n    def __init__(self, connection=None, name=None, metric=None,\n                 namespace=None, statistic=None, comparison=None,\n                 threshold=None, period=None, evaluation_periods=None,\n                 unit=None, description='', dimensions=None,\n                 alarm_actions=None, insufficient_data_actions=None,\n                 ok_actions=None):\n        \"\"\"\n        Creates a new Alarm.\n\n        :type name: str\n        :param name: Name of alarm.\n\n        :type metric: str\n        :param metric: Name of alarm's associated metric.\n\n        :type namespace: str\n        :param namespace: The namespace for the alarm's metric.\n\n        :type statistic: str\n        :param statistic: The statistic to apply to the alarm's associated\n                          metric.\n                          Valid values: SampleCount|Average|Sum|Minimum|Maximum\n\n        :type comparison: str\n        :param comparison: Comparison used to compare statistic with threshold.\n                           Valid values: >= | > | < | <=\n\n        :type threshold: float\n        :param threshold: The value against which the specified statistic\n                          is compared.\n\n        :type period: int\n        :param period: The period in seconds over which teh specified\n                       statistic is applied.\n\n        :type evaluation_periods: int\n        :param evaluation_period: The number of periods over which data is\n                                  compared to the specified threshold.\n\n        :type unit: str\n        :param unit: Allowed Values are:\n                     Seconds|Microseconds|Milliseconds,\n                     Bytes|Kilobytes|Megabytes|Gigabytes|Terabytes,\n                     Bits|Kilobits|Megabits|Gigabits|Terabits,\n                     Percent|Count|\n                     Bytes/Second|Kilobytes/Second|Megabytes/Second|\n                     Gigabytes/Second|Terabytes/Second,\n                     Bits/Second|Kilobits/Second|Megabits/Second,\n                     Gigabits/Second|Terabits/Second|Count/Second|None\n\n        :type description: str\n        :param description: Description of MetricAlarm\n\n        :type dimensions: list of dicts\n        :param description: Dimensions of alarm, such as:\n                            [{'InstanceId':['i-0123456,i-0123457']}]\n        \n        :type alarm_actions: list of strs\n        :param alarm_actions: A list of the ARNs of the actions to take in\n                              ALARM state\n        \n        :type insufficient_data_actions: list of strs\n        :param insufficient_data_actions: A list of the ARNs of the actions to\n                                          take in INSUFFICIENT_DATA state\n        \n        :type ok_actions: list of strs\n        :param ok_actions: A list of the ARNs of the actions to take in OK state\n        \"\"\"\n        self.name = name\n        self.connection = connection\n        self.metric = metric\n        self.namespace = namespace\n        self.statistic = statistic\n        if threshold is not None:\n            self.threshold = float(threshold)\n        else:\n            self.threshold = None\n        self.comparison = self._cmp_map.get(comparison)\n        if period is not None:\n            self.period = int(period)\n        else:\n            self.period = None\n        if evaluation_periods is not None:\n            self.evaluation_periods = int(evaluation_periods)\n        else:\n            self.evaluation_periods = None\n        self.actions_enabled = None\n        self.alarm_arn = None\n        self.last_updated = None\n        self.description = description\n        self.dimensions = dimensions\n        self.state_reason = None\n        self.state_value = None\n        self.unit = unit\n        self.alarm_actions = alarm_actions\n        self.insufficient_data_actions = insufficient_data_actions\n        self.ok_actions = ok_actions\n\n    def __repr__(self):\n        return 'MetricAlarm:%s[%s(%s) %s %s]' % (self.name, self.metric,\n                                                 self.statistic,\n                                                 self.comparison,\n                                                 self.threshold)\n\n    def startElement(self, name, attrs, connection):\n        if name == 'AlarmActions':\n            self.alarm_actions = ListElement()\n            return self.alarm_actions\n        elif name == 'InsufficientDataActions':\n            self.insufficient_data_actions = ListElement()\n            return self.insufficient_data_actions\n        elif name == 'OKActions':\n            self.ok_actions = ListElement()\n            return self.ok_actions\n        else:\n            pass\n\n    def endElement(self, name, value, connection):\n        if name == 'ActionsEnabled':\n            self.actions_enabled = value\n        elif name == 'AlarmArn':\n            self.alarm_arn = value\n        elif name == 'AlarmConfigurationUpdatedTimestamp':\n            self.last_updated = value\n        elif name == 'AlarmDescription':\n            self.description = value\n        elif name == 'AlarmName':\n            self.name = value\n        elif name == 'ComparisonOperator':\n            setattr(self, 'comparison', self._rev_cmp_map[value])\n        elif name == 'EvaluationPeriods':\n            self.evaluation_periods = int(value)\n        elif name == 'MetricName':\n            self.metric = value\n        elif name == 'Namespace':\n            self.namespace = value\n        elif name == 'Period':\n            self.period = int(value)\n        elif name == 'StateReason':\n            self.state_reason = value\n        elif name == 'StateValue':\n            self.state_value = value\n        elif name == 'Statistic':\n            self.statistic = value\n        elif name == 'Threshold':\n            self.threshold = float(value)\n        elif name == 'Unit':\n            self.unit = value\n        else:\n            setattr(self, name, value)\n\n    def set_state(self, value, reason, data=None):\n        \"\"\" Temporarily sets the state of an alarm.\n\n        :type value: str\n        :param value: OK | ALARM | INSUFFICIENT_DATA\n\n        :type reason: str\n        :param reason: Reason alarm set (human readable).\n\n        :type data: str\n        :param data: Reason data (will be jsonified).\n        \"\"\"\n        return self.connection.set_alarm_state(self.name, reason, value, data)\n\n    def update(self):\n        return self.connection.update_alarm(self)\n\n    def enable_actions(self):\n        return self.connection.enable_alarm_actions([self.name])\n\n    def disable_actions(self):\n        return self.connection.disable_alarm_actions([self.name])\n\n    def describe_history(self, start_date=None, end_date=None, max_records=None,\n                         history_item_type=None, next_token=None):\n        return self.connection.describe_alarm_history(self.name, start_date,\n                                                      end_date, max_records,\n                                                      history_item_type,\n                                                      next_token)\n\n    def add_alarm_action(self, action_arn=None):\n        \"\"\"\n        Adds an alarm action, represented as an SNS topic, to this alarm. \n        What do do when alarm is triggered.\n\n        :type action_arn: str\n        :param action_arn: SNS topics to which notification should be \n                           sent if the alarm goes to state ALARM.\n        \"\"\"\n        if not action_arn:\n            return # Raise exception instead?\n        self.actions_enabled = 'true'\n        self.alarm_actions.append(action_arn)\n\n    def add_insufficient_data_action(self, action_arn=None):\n        \"\"\"\n        Adds an insufficient_data action, represented as an SNS topic, to\n        this alarm. What to do when the insufficient_data state is reached.\n\n        :type action_arn: str\n        :param action_arn: SNS topics to which notification should be \n                           sent if the alarm goes to state INSUFFICIENT_DATA.\n        \"\"\"\n        if not action_arn:\n            return\n        self.actions_enabled = 'true'\n        self.insufficient_data_actions.append(action_arn)\n    \n    def add_ok_action(self, action_arn=None):\n        \"\"\"\n        Adds an ok action, represented as an SNS topic, to this alarm. What\n        to do when the ok state is reached.\n\n        :type action_arn: str\n        :param action_arn: SNS topics to which notification should be \n                           sent if the alarm goes to state INSUFFICIENT_DATA.\n        \"\"\"\n        if not action_arn:\n            return\n        self.actions_enabled = 'true'\n        self.ok_actions.append(action_arn)\n\n    def delete(self):\n        self.connection.delete_alarms([self])\n\nclass AlarmHistoryItem(object):\n    def __init__(self, connection=None):\n        self.connection = connection\n\n    def __repr__(self):\n        return 'AlarmHistory:%s[%s at %s]' % (self.name, self.summary, self.timestamp)\n\n    def startElement(self, name, attrs, connection):\n        pass\n\n    def endElement(self, name, value, connection):\n        if name == 'AlarmName':\n            self.name = value\n        elif name == 'HistoryData':\n            self.data = json.loads(value)\n        elif name == 'HistoryItemType':\n            self.tem_type = value\n        elif name == 'HistorySummary':\n            self.summary = value\n        elif name == 'Timestamp':\n            self.timestamp = datetime.strptime(value, '%Y-%m-%dT%H:%M:%S.%fZ')\n\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/ec2/cloudwatch/datapoint.py",
    "content": "# Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n#\nfrom datetime import datetime\n\nclass Datapoint(dict):\n\n    def __init__(self, connection=None):\n        dict.__init__(self)\n        self.connection = connection\n\n    def startElement(self, name, attrs, connection):\n        pass\n\n    def endElement(self, name, value, connection):\n        if name in ['Average', 'Maximum', 'Minimum', 'Sum', 'SampleCount']:\n            self[name] = float(value)\n        elif name == 'Timestamp':\n            self[name] = datetime.strptime(value, '%Y-%m-%dT%H:%M:%SZ')\n        elif name != 'member':\n            self[name] = value\n\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/ec2/cloudwatch/listelement.py",
    "content": "# Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nclass ListElement(list):\n\n    def startElement(self, name, attrs, connection):\n        pass\n\n    def endElement(self, name, value, connection):\n        if name == 'member':\n            self.append(value)\n    \n    \n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/ec2/cloudwatch/metric.py",
    "content": "# Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n#\n\nfrom boto.ec2.cloudwatch.alarm import MetricAlarm\n\nclass Dimension(dict):\n\n    def startElement(self, name, attrs, connection):\n        pass\n\n    def endElement(self, name, value, connection):\n        if name == 'Name':\n            self._name = value\n        elif name == 'Value':\n            if self._name in self:\n                self[self._name].append(value)\n            else:\n                self[self._name] = [value]\n        else:\n            setattr(self, name, value)\n\nclass Metric(object):\n\n    Statistics = ['Minimum', 'Maximum', 'Sum', 'Average', 'SampleCount']\n    Units = ['Seconds', 'Microseconds', 'Milliseconds', 'Bytes', 'Kilobytes',\n             'Megabytes', 'Gigabytes', 'Terabytes', 'Bits', 'Kilobits',\n             'Megabits', 'Gigabits', 'Terabits', 'Percent', 'Count',\n             'Bytes/Second', 'Kilobytes/Second', 'Megabytes/Second',\n             'Gigabytes/Second', 'Terabytes/Second', 'Bits/Second',\n             'Kilobits/Second', 'Megabits/Second', 'Gigabits/Second',\n             'Terabits/Second', 'Count/Second', None]\n\n    def __init__(self, connection=None):\n        self.connection = connection\n        self.name = None\n        self.namespace = None\n        self.dimensions = None\n\n    def __repr__(self):\n        return 'Metric:%s' % self.name\n\n    def startElement(self, name, attrs, connection):\n        if name == 'Dimensions':\n            self.dimensions = Dimension()\n            return self.dimensions\n\n    def endElement(self, name, value, connection):\n        if name == 'MetricName':\n            self.name = value\n        elif name == 'Namespace':\n            self.namespace = value\n        else:\n            setattr(self, name, value)\n\n    def query(self, start_time, end_time, statistics, unit=None, period=60):\n        if not isinstance(statistics, list):\n            statistics = [statistics]\n        return self.connection.get_metric_statistics(period,\n                                                     start_time,\n                                                     end_time,\n                                                     self.name,\n                                                     self.namespace,\n                                                     statistics,\n                                                     self.dimensions,\n                                                     unit)\n\n    def create_alarm(self, name, comparison, threshold,\n                     period, evaluation_periods,\n                     statistic, enabled=True, description=None,\n                     dimensions=None, alarm_actions=None, ok_actions=None,\n                     insufficient_data_actions=None, unit=None):\n        if not dimensions:\n            dimensions = self.dimensions\n        alarm = MetricAlarm(self.connection, name, self.name,\n                            self.namespace, statistic, comparison,\n                            threshold, period, evaluation_periods,\n                            unit, description, dimensions,\n                            alarm_actions, insufficient_data_actions,\n                            ok_actions)\n        if self.connection.put_metric_alarm(alarm):\n            return alarm\n\n    def describe_alarms(self, period=None, statistic=None,\n                        dimensions=None, unit=None):\n        return self.connection.describe_alarms_for_metric(self.name,\n                                                          self.namespace,\n                                                          period,\n                                                          statistic,\n                                                          dimensions,\n                                                          unit)\n\n\n    \n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/ec2/connection.py",
    "content": "# Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/\n# Copyright (c) 2010, Eucalyptus Systems, Inc.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\n\"\"\"\nRepresents a connection to the EC2 service.\n\"\"\"\n\nimport base64\nimport warnings\nfrom datetime import datetime\nfrom datetime import timedelta\nimport boto\nfrom boto.connection import AWSQueryConnection\nfrom boto.resultset import ResultSet\nfrom boto.ec2.image import Image, ImageAttribute\nfrom boto.ec2.instance import Reservation, Instance\nfrom boto.ec2.instance import ConsoleOutput, InstanceAttribute\nfrom boto.ec2.keypair import KeyPair\nfrom boto.ec2.address import Address\nfrom boto.ec2.volume import Volume\nfrom boto.ec2.snapshot import Snapshot\nfrom boto.ec2.snapshot import SnapshotAttribute\nfrom boto.ec2.zone import Zone\nfrom boto.ec2.securitygroup import SecurityGroup\nfrom boto.ec2.regioninfo import RegionInfo\nfrom boto.ec2.instanceinfo import InstanceInfo\nfrom boto.ec2.reservedinstance import ReservedInstancesOffering\nfrom boto.ec2.reservedinstance import ReservedInstance\nfrom boto.ec2.spotinstancerequest import SpotInstanceRequest\nfrom boto.ec2.spotpricehistory import SpotPriceHistory\nfrom boto.ec2.spotdatafeedsubscription import SpotDatafeedSubscription\nfrom boto.ec2.bundleinstance import BundleInstanceTask\nfrom boto.ec2.placementgroup import PlacementGroup\nfrom boto.ec2.tag import Tag\nfrom boto.exception import EC2ResponseError\n\n#boto.set_stream_logger('ec2')\n\nclass EC2Connection(AWSQueryConnection):\n\n    APIVersion = boto.config.get('Boto', 'ec2_version', '2011-01-01')\n    DefaultRegionName = boto.config.get('Boto', 'ec2_region_name', 'us-east-1')\n    DefaultRegionEndpoint = boto.config.get('Boto', 'ec2_region_endpoint',\n                                            'ec2.amazonaws.com')\n    ResponseError = EC2ResponseError\n\n    def __init__(self, aws_access_key_id=None, aws_secret_access_key=None,\n                 is_secure=True, host=None, port=None,\n                 proxy=None, proxy_port=None,\n                 proxy_user=None, proxy_pass=None, debug=0,\n                 https_connection_factory=None, region=None, path='/',\n                 api_version=None, security_token=None):\n        \"\"\"\n        Init method to create a new connection to EC2.\n\n        B{Note:} The host argument is overridden by the host specified in the\n                 boto configuration file.\n        \"\"\"\n        if not region:\n            region = RegionInfo(self, self.DefaultRegionName,\n                                self.DefaultRegionEndpoint)\n        self.region = region\n        AWSQueryConnection.__init__(self, aws_access_key_id,\n                                    aws_secret_access_key,\n                                    is_secure, port, proxy, proxy_port,\n                                    proxy_user, proxy_pass,\n                                    self.region.endpoint, debug,\n                                    https_connection_factory, path,\n                                    security_token)\n        if api_version:\n            self.APIVersion = api_version\n\n    def _required_auth_capability(self):\n        return ['ec2']\n\n    def get_params(self):\n        \"\"\"\n        Returns a dictionary containing the value of of all of the keyword\n        arguments passed when constructing this connection.\n        \"\"\"\n        param_names = ['aws_access_key_id', 'aws_secret_access_key',\n                       'is_secure', 'port', 'proxy', 'proxy_port',\n                       'proxy_user', 'proxy_pass',\n                       'debug', 'https_connection_factory']\n        params = {}\n        for name in param_names:\n            params[name] = getattr(self, name)\n        return params\n\n    def build_filter_params(self, params, filters):\n        i = 1\n        for name in filters:\n            aws_name = name\n            if not aws_name.startswith('tag:'):\n                aws_name = name.replace('_', '-')\n            params['Filter.%d.Name' % i] = aws_name\n            value = filters[name]\n            if not isinstance(value, list):\n                value = [value]\n            j = 1\n            for v in value:\n                params['Filter.%d.Value.%d' % (i,j)] = v\n                j += 1\n            i += 1\n\n    # Image methods\n\n    def get_all_images(self, image_ids=None, owners=None,\n                       executable_by=None, filters=None):\n        \"\"\"\n        Retrieve all the EC2 images available on your account.\n\n        :type image_ids: list\n        :param image_ids: A list of strings with the image IDs wanted\n\n        :type owners: list\n        :param owners: A list of owner IDs\n\n        :type executable_by: list\n        :param executable_by: Returns AMIs for which the specified\n                              user ID has explicit launch permissions\n\n        :type filters: dict\n        :param filters: Optional filters that can be used to limit\n                        the results returned.  Filters are provided\n                        in the form of a dictionary consisting of\n                        filter names as the key and filter values\n                        as the value.  The set of allowable filter\n                        names/values is dependent on the request\n                        being performed.  Check the EC2 API guide\n                        for details.\n\n        :rtype: list\n        :return: A list of :class:`boto.ec2.image.Image`\n        \"\"\"\n        params = {}\n        if image_ids:\n            self.build_list_params(params, image_ids, 'ImageId')\n        if owners:\n            self.build_list_params(params, owners, 'Owner')\n        if executable_by:\n            self.build_list_params(params, executable_by, 'ExecutableBy')\n        if filters:\n            self.build_filter_params(params, filters)\n        return self.get_list('DescribeImages', params,\n                             [('item', Image)], verb='POST')\n\n    def get_all_kernels(self, kernel_ids=None, owners=None):\n        \"\"\"\n        Retrieve all the EC2 kernels available on your account.\n        Constructs a filter to allow the processing to happen server side.\n\n        :type kernel_ids: list\n        :param kernel_ids: A list of strings with the image IDs wanted\n\n        :type owners: list\n        :param owners: A list of owner IDs\n\n        :rtype: list\n        :return: A list of :class:`boto.ec2.image.Image`\n        \"\"\"\n        params = {}\n        if kernel_ids:\n            self.build_list_params(params, kernel_ids, 'ImageId')\n        if owners:\n            self.build_list_params(params, owners, 'Owner')\n        filter = {'image-type' : 'kernel'}\n        self.build_filter_params(params, filter)\n        return self.get_list('DescribeImages', params,\n                             [('item', Image)], verb='POST')\n\n    def get_all_ramdisks(self, ramdisk_ids=None, owners=None):\n        \"\"\"\n        Retrieve all the EC2 ramdisks available on your account.\n        Constructs a filter to allow the processing to happen server side.\n\n        :type ramdisk_ids: list\n        :param ramdisk_ids: A list of strings with the image IDs wanted\n\n        :type owners: list\n        :param owners: A list of owner IDs\n\n        :rtype: list\n        :return: A list of :class:`boto.ec2.image.Image`\n        \"\"\"\n        params = {}\n        if ramdisk_ids:\n            self.build_list_params(params, ramdisk_ids, 'ImageId')\n        if owners:\n            self.build_list_params(params, owners, 'Owner')\n        filter = {'image-type' : 'ramdisk'}\n        self.build_filter_params(params, filter)\n        return self.get_list('DescribeImages', params,\n                             [('item', Image)], verb='POST')\n\n    def get_image(self, image_id):\n        \"\"\"\n        Shortcut method to retrieve a specific image (AMI).\n\n        :type image_id: string\n        :param image_id: the ID of the Image to retrieve\n\n        :rtype: :class:`boto.ec2.image.Image`\n        :return: The EC2 Image specified or None if the image is not found\n        \"\"\"\n        try:\n            return self.get_all_images(image_ids=[image_id])[0]\n        except IndexError: # None of those images available\n            return None\n\n    def register_image(self, name=None, description=None, image_location=None,\n                       architecture=None, kernel_id=None, ramdisk_id=None,\n                       root_device_name=None, block_device_map=None):\n        \"\"\"\n        Register an image.\n\n        :type name: string\n        :param name: The name of the AMI.  Valid only for EBS-based images.\n\n        :type description: string\n        :param description: The description of the AMI.\n\n        :type image_location: string\n        :param image_location: Full path to your AMI manifest in\n                               Amazon S3 storage.\n                               Only used for S3-based AMI's.\n\n        :type architecture: string\n        :param architecture: The architecture of the AMI.  Valid choices are:\n                             i386 | x86_64\n\n        :type kernel_id: string\n        :param kernel_id: The ID of the kernel with which to launch\n                          the instances\n\n        :type root_device_name: string\n        :param root_device_name: The root device name (e.g. /dev/sdh)\n\n        :type block_device_map: :class:`boto.ec2.blockdevicemapping.BlockDeviceMapping`\n        :param block_device_map: A BlockDeviceMapping data structure\n                                 describing the EBS volumes associated\n                                 with the Image.\n\n        :rtype: string\n        :return: The new image id\n        \"\"\"\n        params = {}\n        if name:\n            params['Name'] = name\n        if description:\n            params['Description'] = description\n        if architecture:\n            params['Architecture'] = architecture\n        if kernel_id:\n            params['KernelId'] = kernel_id\n        if ramdisk_id:\n            params['RamdiskId'] = ramdisk_id\n        if image_location:\n            params['ImageLocation'] = image_location\n        if root_device_name:\n            params['RootDeviceName'] = root_device_name\n        if block_device_map:\n            block_device_map.build_list_params(params)\n        rs = self.get_object('RegisterImage', params, ResultSet, verb='POST')\n        image_id = getattr(rs, 'imageId', None)\n        return image_id\n\n    def deregister_image(self, image_id, delete_snapshot=False):\n        \"\"\"\n        Unregister an AMI.\n\n        :type image_id: string\n        :param image_id: the ID of the Image to unregister\n\n        :type delete_snapshot: bool\n        :param delete_snapshot: Set to True if we should delete the\n                                snapshot associated with an EBS volume\n                                mounted at /dev/sda1\n\n        :rtype: bool\n        :return: True if successful\n        \"\"\"\n        snapshot_id = None\n        if delete_snapshot:\n            image = self.get_image(image_id)\n            for key in image.block_device_mapping:\n                if key == \"/dev/sda1\":\n                    snapshot_id = image.block_device_mapping[key].snapshot_id\n                    break\n\n        result = self.get_status('DeregisterImage',\n                                 {'ImageId':image_id}, verb='POST')\n        if result and snapshot_id:\n            return result and self.delete_snapshot(snapshot_id)\n        return result\n\n    def create_image(self, instance_id, name,\n                     description=None, no_reboot=False):\n        \"\"\"\n        Will create an AMI from the instance in the running or stopped\n        state.\n\n        :type instance_id: string\n        :param instance_id: the ID of the instance to image.\n\n        :type name: string\n        :param name: The name of the new image\n\n        :type description: string\n        :param description: An optional human-readable string describing\n                            the contents and purpose of the AMI.\n\n        :type no_reboot: bool\n        :param no_reboot: An optional flag indicating that the bundling process\n                          should not attempt to shutdown the instance before\n                          bundling.  If this flag is True, the responsibility\n                          of maintaining file system integrity is left to the\n                          owner of the instance.\n\n        :rtype: string\n        :return: The new image id\n        \"\"\"\n        params = {'InstanceId' : instance_id,\n                  'Name' : name}\n        if description:\n            params['Description'] = description\n        if no_reboot:\n            params['NoReboot'] = 'true'\n        img = self.get_object('CreateImage', params, Image, verb='POST')\n        return img.id\n\n    # ImageAttribute methods\n\n    def get_image_attribute(self, image_id, attribute='launchPermission'):\n        \"\"\"\n        Gets an attribute from an image.\n\n        :type image_id: string\n        :param image_id: The Amazon image id for which you want info about\n\n        :type attribute: string\n        :param attribute: The attribute you need information about.\n                          Valid choices are:\n                          * launchPermission\n                          * productCodes\n                          * blockDeviceMapping\n\n        :rtype: :class:`boto.ec2.image.ImageAttribute`\n        :return: An ImageAttribute object representing the value of the\n                 attribute requested\n        \"\"\"\n        params = {'ImageId' : image_id,\n                  'Attribute' : attribute}\n        return self.get_object('DescribeImageAttribute', params,\n                               ImageAttribute, verb='POST')\n\n    def modify_image_attribute(self, image_id, attribute='launchPermission',\n                               operation='add', user_ids=None, groups=None,\n                               product_codes=None):\n        \"\"\"\n        Changes an attribute of an image.\n\n        :type image_id: string\n        :param image_id: The image id you wish to change\n\n        :type attribute: string\n        :param attribute: The attribute you wish to change\n\n        :type operation: string\n        :param operation: Either add or remove (this is required for changing\n                          launchPermissions)\n\n        :type user_ids: list\n        :param user_ids: The Amazon IDs of users to add/remove attributes\n\n        :type groups: list\n        :param groups: The groups to add/remove attributes\n\n        :type product_codes: list\n        :param product_codes: Amazon DevPay product code. Currently only one\n                              product code can be associated with an AMI. Once\n                              set, the product code cannot be changed or reset.\n        \"\"\"\n        params = {'ImageId' : image_id,\n                  'Attribute' : attribute,\n                  'OperationType' : operation}\n        if user_ids:\n            self.build_list_params(params, user_ids, 'UserId')\n        if groups:\n            self.build_list_params(params, groups, 'UserGroup')\n        if product_codes:\n            self.build_list_params(params, product_codes, 'ProductCode')\n        return self.get_status('ModifyImageAttribute', params, verb='POST')\n\n    def reset_image_attribute(self, image_id, attribute='launchPermission'):\n        \"\"\"\n        Resets an attribute of an AMI to its default value.\n\n        :type image_id: string\n        :param image_id: ID of the AMI for which an attribute will be described\n\n        :type attribute: string\n        :param attribute: The attribute to reset\n\n        :rtype: bool\n        :return: Whether the operation succeeded or not\n        \"\"\"\n        params = {'ImageId' : image_id,\n                  'Attribute' : attribute}\n        return self.get_status('ResetImageAttribute', params, verb='POST')\n\n    # Instance methods\n\n    def get_all_instances(self, instance_ids=None, filters=None):\n        \"\"\"\n        Retrieve all the instances associated with your account.\n\n        :type instance_ids: list\n        :param instance_ids: A list of strings of instance IDs\n\n        :type filters: dict\n        :param filters: Optional filters that can be used to limit\n                        the results returned.  Filters are provided\n                        in the form of a dictionary consisting of\n                        filter names as the key and filter values\n                        as the value.  The set of allowable filter\n                        names/values is dependent on the request\n                        being performed.  Check the EC2 API guide\n                        for details.\n\n        :rtype: list\n        :return: A list of  :class:`boto.ec2.instance.Reservation`\n        \"\"\"\n        params = {}\n        if instance_ids:\n            self.build_list_params(params, instance_ids, 'InstanceId')\n        if filters:\n            if 'group-id' in filters:\n                warnings.warn(\"The group-id filter now requires a security \"\n                              \"group identifier (sg-*) instead of a group \"\n                              \"name. To filter by group name use the \"\n                              \"'group-name' filter instead.\", UserWarning)\n            self.build_filter_params(params, filters)\n        return self.get_list('DescribeInstances', params,\n                             [('item', Reservation)], verb='POST')\n\n    def run_instances(self, image_id, min_count=1, max_count=1,\n                      key_name=None, security_groups=None,\n                      user_data=None, addressing_type=None,\n                      instance_type='m1.small', placement=None,\n                      kernel_id=None, ramdisk_id=None,\n                      monitoring_enabled=False, subnet_id=None,\n                      block_device_map=None,\n                      disable_api_termination=False,\n                      instance_initiated_shutdown_behavior=None,\n                      private_ip_address=None,\n                      placement_group=None, client_token=None,\n                      security_group_ids=None):\n        \"\"\"\n        Runs an image on EC2.\n\n        :type image_id: string\n        :param image_id: The ID of the image to run\n\n        :type min_count: int\n        :param min_count: The minimum number of instances to launch\n\n        :type max_count: int\n        :param max_count: The maximum number of instances to launch\n\n        :type key_name: string\n        :param key_name: The name of the key pair with which to launch instances\n\n        :type security_groups: list of strings\n        :param security_groups: The names of the security groups with which to\n                                associate instances\n\n        :type user_data: string\n        :param user_data: The user data passed to the launched instances\n\n        :type instance_type: string\n        :param instance_type: The type of instance to run:\n\n                              * m1.small\n                              * m1.large\n                              * m1.xlarge\n                              * c1.medium\n                              * c1.xlarge\n                              * m2.xlarge\n                              * m2.2xlarge\n                              * m2.4xlarge\n                              * cc1.4xlarge\n                              * t1.micro\n\n        :type placement: string\n        :param placement: The availability zone in which to launch the instances\n\n        :type kernel_id: string\n        :param kernel_id: The ID of the kernel with which to launch the\n                          instances\n\n        :type ramdisk_id: string\n        :param ramdisk_id: The ID of the RAM disk with which to launch the\n                           instances\n\n        :type monitoring_enabled: bool\n        :param monitoring_enabled: Enable CloudWatch monitoring on the instance.\n\n        :type subnet_id: string\n        :param subnet_id: The subnet ID within which to launch the instances\n                          for VPC.\n\n        :type private_ip_address: string\n        :param private_ip_address: If you're using VPC, you can optionally use\n                                   this parameter to assign the instance a\n                                   specific available IP address from the\n                                   subnet (e.g., 10.0.0.25).\n\n        :type block_device_map: :class:`boto.ec2.blockdevicemapping.BlockDeviceMapping`\n        :param block_device_map: A BlockDeviceMapping data structure\n                                 describing the EBS volumes associated\n                                 with the Image.\n\n        :type disable_api_termination: bool\n        :param disable_api_termination: If True, the instances will be locked\n                                        and will not be able to be terminated\n                                        via the API.\n\n        :type instance_initiated_shutdown_behavior: string\n        :param instance_initiated_shutdown_behavior: Specifies whether the\n                                                     instance stops or\n                                                     terminates on\n                                                     instance-initiated\n                                                     shutdown.\n                                                     Valid values are:\n\n                                                     * stop\n                                                     * terminate\n\n        :type placement_group: string\n        :param placement_group: If specified, this is the name of the placement\n                                group in which the instance(s) will be launched.\n\n        :type client_token: string\n        :param client_token: Unique, case-sensitive identifier you provide\n                             to ensure idempotency of the request.\n                             Maximum 64 ASCII characters\n\n        :rtype: Reservation\n        :return: The :class:`boto.ec2.instance.Reservation` associated with\n                 the request for machines\n\n        :type security_group_ids: list of strings\n        :param security_group_ids: The ID of the VPC security groups with\n                                   which to associate instances\n        \"\"\"\n        params = {'ImageId':image_id,\n                  'MinCount':min_count,\n                  'MaxCount': max_count}\n        if key_name:\n            params['KeyName'] = key_name\n        if security_group_ids:\n            l = []\n            for group in security_group_ids:\n                if isinstance(group, SecurityGroup):\n                    l.append(group.name)\n                else:\n                    l.append(group)\n            self.build_list_params(params, l, 'SecurityGroupId')\n        if security_groups:\n            l = []\n            for group in security_groups:\n                if isinstance(group, SecurityGroup):\n                    l.append(group.name)\n                else:\n                    l.append(group)\n            self.build_list_params(params, l, 'SecurityGroup')\n        if user_data:\n            params['UserData'] = base64.b64encode(user_data)\n        if addressing_type:\n            params['AddressingType'] = addressing_type\n        if instance_type:\n            params['InstanceType'] = instance_type\n        if placement:\n            params['Placement.AvailabilityZone'] = placement\n        if placement_group:\n            params['Placement.GroupName'] = placement_group\n        if kernel_id:\n            params['KernelId'] = kernel_id\n        if ramdisk_id:\n            params['RamdiskId'] = ramdisk_id\n        if monitoring_enabled:\n            params['Monitoring.Enabled'] = 'true'\n        if subnet_id:\n            params['SubnetId'] = subnet_id\n        if private_ip_address:\n            params['PrivateIpAddress'] = private_ip_address\n        if block_device_map:\n            block_device_map.build_list_params(params)\n        if disable_api_termination:\n            params['DisableApiTermination'] = 'true'\n        if instance_initiated_shutdown_behavior:\n            val = instance_initiated_shutdown_behavior\n            params['InstanceInitiatedShutdownBehavior'] = val\n        if client_token:\n            params['ClientToken'] = client_token\n        return self.get_object('RunInstances', params, Reservation, verb='POST')\n\n    def terminate_instances(self, instance_ids=None):\n        \"\"\"\n        Terminate the instances specified\n\n        :type instance_ids: list\n        :param instance_ids: A list of strings of the Instance IDs to terminate\n\n        :rtype: list\n        :return: A list of the instances terminated\n        \"\"\"\n        params = {}\n        if instance_ids:\n            self.build_list_params(params, instance_ids, 'InstanceId')\n        return self.get_list('TerminateInstances', params,\n                             [('item', Instance)], verb='POST')\n\n    def stop_instances(self, instance_ids=None, force=False):\n        \"\"\"\n        Stop the instances specified\n\n        :type instance_ids: list\n        :param instance_ids: A list of strings of the Instance IDs to stop\n\n        :type force: bool\n        :param force: Forces the instance to stop\n\n        :rtype: list\n        :return: A list of the instances stopped\n        \"\"\"\n        params = {}\n        if force:\n            params['Force'] = 'true'\n        if instance_ids:\n            self.build_list_params(params, instance_ids, 'InstanceId')\n        return self.get_list('StopInstances', params,\n                             [('item', Instance)], verb='POST')\n\n    def start_instances(self, instance_ids=None):\n        \"\"\"\n        Start the instances specified\n\n        :type instance_ids: list\n        :param instance_ids: A list of strings of the Instance IDs to start\n\n        :rtype: list\n        :return: A list of the instances started\n        \"\"\"\n        params = {}\n        if instance_ids:\n            self.build_list_params(params, instance_ids, 'InstanceId')\n        return self.get_list('StartInstances', params,\n                             [('item', Instance)], verb='POST')\n\n    def get_console_output(self, instance_id):\n        \"\"\"\n        Retrieves the console output for the specified instance.\n\n        :type instance_id: string\n        :param instance_id: The instance ID of a running instance on the cloud.\n\n        :rtype: :class:`boto.ec2.instance.ConsoleOutput`\n        :return: The console output as a ConsoleOutput object\n        \"\"\"\n        params = {}\n        self.build_list_params(params, [instance_id], 'InstanceId')\n        return self.get_object('GetConsoleOutput', params,\n                               ConsoleOutput, verb='POST')\n\n    def reboot_instances(self, instance_ids=None):\n        \"\"\"\n        Reboot the specified instances.\n\n        :type instance_ids: list\n        :param instance_ids: The instances to terminate and reboot\n        \"\"\"\n        params = {}\n        if instance_ids:\n            self.build_list_params(params, instance_ids, 'InstanceId')\n        return self.get_status('RebootInstances', params)\n\n    def confirm_product_instance(self, product_code, instance_id):\n        params = {'ProductCode' : product_code,\n                  'InstanceId' : instance_id}\n        rs = self.get_object('ConfirmProductInstance', params,\n                             ResultSet, verb='POST')\n        return (rs.status, rs.ownerId)\n\n    # InstanceAttribute methods\n\n    def get_instance_attribute(self, instance_id, attribute):\n        \"\"\"\n        Gets an attribute from an instance.\n\n        :type instance_id: string\n        :param instance_id: The Amazon id of the instance\n\n        :type attribute: string\n        :param attribute: The attribute you need information about\n                          Valid choices are:\n\n                          * instanceType|kernel|ramdisk|userData|\n                          * disableApiTermination|\n                          * instanceInitiatedShutdownBehavior|\n                          * rootDeviceName|blockDeviceMapping\n\n        :rtype: :class:`boto.ec2.image.InstanceAttribute`\n        :return: An InstanceAttribute object representing the value of the\n                 attribute requested\n        \"\"\"\n        params = {'InstanceId' : instance_id}\n        if attribute:\n            params['Attribute'] = attribute\n        return self.get_object('DescribeInstanceAttribute', params,\n                               InstanceAttribute, verb='POST')\n\n    def modify_instance_attribute(self, instance_id, attribute, value):\n        \"\"\"\n        Changes an attribute of an instance\n\n        :type instance_id: string\n        :param instance_id: The instance id you wish to change\n\n        :type attribute: string\n        :param attribute: The attribute you wish to change.\n\n                          * AttributeName - Expected value (default)\n                          * instanceType - A valid instance type (m1.small)\n                          * kernel - Kernel ID (None)\n                          * ramdisk - Ramdisk ID (None)\n                          * userData - Base64 encoded String (None)\n                          * disableApiTermination - Boolean (true)\n                          * instanceInitiatedShutdownBehavior - stop|terminate\n                          * rootDeviceName - device name (None)\n\n        :type value: string\n        :param value: The new value for the attribute\n\n        :rtype: bool\n        :return: Whether the operation succeeded or not\n        \"\"\"\n        # Allow a bool to be passed in for value of disableApiTermination\n        if attribute == 'disableApiTermination':\n            if isinstance(value, bool):\n                if value:\n                    value = 'true'\n                else:\n                    value = 'false'\n        params = {'InstanceId' : instance_id,\n                  'Attribute' : attribute,\n                  'Value' : value}\n        return self.get_status('ModifyInstanceAttribute', params, verb='POST')\n\n    def reset_instance_attribute(self, instance_id, attribute):\n        \"\"\"\n        Resets an attribute of an instance to its default value.\n\n        :type instance_id: string\n        :param instance_id: ID of the instance\n\n        :type attribute: string\n        :param attribute: The attribute to reset. Valid values are:\n                          kernel|ramdisk\n\n        :rtype: bool\n        :return: Whether the operation succeeded or not\n        \"\"\"\n        params = {'InstanceId' : instance_id,\n                  'Attribute' : attribute}\n        return self.get_status('ResetInstanceAttribute', params, verb='POST')\n\n    # Spot Instances\n\n    def get_all_spot_instance_requests(self, request_ids=None,\n                                       filters=None):\n        \"\"\"\n        Retrieve all the spot instances requests associated with your account.\n\n        :type request_ids: list\n        :param request_ids: A list of strings of spot instance request IDs\n\n        :type filters: dict\n        :param filters: Optional filters that can be used to limit\n                        the results returned.  Filters are provided\n                        in the form of a dictionary consisting of\n                        filter names as the key and filter values\n                        as the value.  The set of allowable filter\n                        names/values is dependent on the request\n                        being performed.  Check the EC2 API guide\n                        for details.\n\n        :rtype: list\n        :return: A list of\n                 :class:`boto.ec2.spotinstancerequest.SpotInstanceRequest`\n        \"\"\"\n        params = {}\n        if request_ids:\n            self.build_list_params(params, request_ids, 'SpotInstanceRequestId')\n        if filters:\n            if 'launch.group-id' in filters:\n                warnings.warn(\"The 'launch.group-id' filter now requires a \"\n                              \"security group id (sg-*) and no longer supports \"\n                              \"filtering by group name. Please update your \"\n                              \"filters accordingly.\", UserWarning)\n            self.build_filter_params(params, filters)\n        return self.get_list('DescribeSpotInstanceRequests', params,\n                             [('item', SpotInstanceRequest)], verb='POST')\n\n    def get_spot_price_history(self, start_time=None, end_time=None,\n                               instance_type=None, product_description=None,\n                               availability_zone=None):\n        \"\"\"\n        Retrieve the recent history of spot instances pricing.\n\n        :type start_time: str\n        :param start_time: An indication of how far back to provide price\n                           changes for. An ISO8601 DateTime string.\n\n        :type end_time: str\n        :param end_time: An indication of how far forward to provide price\n                         changes for.  An ISO8601 DateTime string.\n\n        :type instance_type: str\n        :param instance_type: Filter responses to a particular instance type.\n\n        :type product_description: str\n        :param product_description: Filter responses to a particular platform.\n                                    Valid values are currently: \"Linux/UNIX\",\n                                    \"SUSE Linux\", and \"Windows\"\n\n        :type availability_zone: str\n        :param availability_zone: The availability zone for which prices\n                                  should be returned\n\n        :rtype: list\n        :return: A list tuples containing price and timestamp.\n        \"\"\"\n        params = {}\n        if start_time:\n            params['StartTime'] = start_time\n        if end_time:\n            params['EndTime'] = end_time\n        if instance_type:\n            params['InstanceType'] = instance_type\n        if product_description:\n            params['ProductDescription'] = product_description\n        if availability_zone:\n            params['AvailabilityZone'] = availability_zone\n        return self.get_list('DescribeSpotPriceHistory', params,\n                             [('item', SpotPriceHistory)], verb='POST')\n\n    def request_spot_instances(self, price, image_id, count=1, type='one-time',\n                               valid_from=None, valid_until=None,\n                               launch_group=None, availability_zone_group=None,\n                               key_name=None, security_groups=None,\n                               user_data=None, addressing_type=None,\n                               instance_type='m1.small', placement=None,\n                               kernel_id=None, ramdisk_id=None,\n                               monitoring_enabled=False, subnet_id=None,\n                               block_device_map=None):\n        \"\"\"\n        Request instances on the spot market at a particular price.\n\n        :type price: str\n        :param price: The maximum price of your bid\n\n        :type image_id: string\n        :param image_id: The ID of the image to run\n\n        :type count: int\n        :param count: The of instances to requested\n\n        :type type: str\n        :param type: Type of request. Can be 'one-time' or 'persistent'.\n                     Default is one-time.\n\n        :type valid_from: str\n        :param valid_from: Start date of the request. An ISO8601 time string.\n\n        :type valid_until: str\n        :param valid_until: End date of the request.  An ISO8601 time string.\n\n        :type launch_group: str\n        :param launch_group: If supplied, all requests will be fulfilled\n                             as a group.\n\n        :type availability_zone_group: str\n        :param availability_zone_group: If supplied, all requests will be\n                                        fulfilled within a single\n                                        availability zone.\n\n        :type key_name: string\n        :param key_name: The name of the key pair with which to launch instances\n\n        :type security_groups: list of strings\n        :param security_groups: The names of the security groups with which to\n                                associate instances\n\n        :type user_data: string\n        :param user_data: The user data passed to the launched instances\n\n        :type instance_type: string\n        :param instance_type: The type of instance to run:\n\n                              * m1.small\n                              * m1.large\n                              * m1.xlarge\n                              * c1.medium\n                              * c1.xlarge\n                              * m2.xlarge\n                              * m2.2xlarge\n                              * m2.4xlarge\n                              * cc1.4xlarge\n                              * t1.micro\n\n        :type placement: string\n        :param placement: The availability zone in which to launch the instances\n\n        :type kernel_id: string\n        :param kernel_id: The ID of the kernel with which to launch the\n                          instances\n\n        :type ramdisk_id: string\n        :param ramdisk_id: The ID of the RAM disk with which to launch the\n                           instances\n\n        :type monitoring_enabled: bool\n        :param monitoring_enabled: Enable CloudWatch monitoring on the instance.\n\n        :type subnet_id: string\n        :param subnet_id: The subnet ID within which to launch the instances\n                          for VPC.\n\n        :type block_device_map: :class:`boto.ec2.blockdevicemapping.BlockDeviceMapping`\n        :param block_device_map: A BlockDeviceMapping data structure\n                                 describing the EBS volumes associated\n                                 with the Image.\n\n        :rtype: Reservation\n        :return: The :class:`boto.ec2.spotinstancerequest.SpotInstanceRequest`\n                 associated with the request for machines\n        \"\"\"\n        params = {'LaunchSpecification.ImageId':image_id,\n                  'Type' : type,\n                  'SpotPrice' : price}\n        if count:\n            params['InstanceCount'] = count\n        if valid_from:\n            params['ValidFrom'] = valid_from\n        if valid_until:\n            params['ValidUntil'] = valid_until\n        if launch_group:\n            params['LaunchGroup'] = launch_group\n        if availability_zone_group:\n            params['AvailabilityZoneGroup'] = availability_zone_group\n        if key_name:\n            params['LaunchSpecification.KeyName'] = key_name\n        if security_groups:\n            l = []\n            for group in security_groups:\n                if isinstance(group, SecurityGroup):\n                    l.append(group.name)\n                else:\n                    l.append(group)\n            self.build_list_params(params, l,\n                                   'LaunchSpecification.SecurityGroup')\n        if user_data:\n            params['LaunchSpecification.UserData'] = base64.b64encode(user_data)\n        if addressing_type:\n            params['LaunchSpecification.AddressingType'] = addressing_type\n        if instance_type:\n            params['LaunchSpecification.InstanceType'] = instance_type\n        if placement:\n            params['LaunchSpecification.Placement.AvailabilityZone'] = placement\n        if kernel_id:\n            params['LaunchSpecification.KernelId'] = kernel_id\n        if ramdisk_id:\n            params['LaunchSpecification.RamdiskId'] = ramdisk_id\n        if monitoring_enabled:\n            params['LaunchSpecification.Monitoring.Enabled'] = 'true'\n        if subnet_id:\n            params['LaunchSpecification.SubnetId'] = subnet_id\n        if block_device_map:\n            block_device_map.build_list_params(params, 'LaunchSpecification.')\n        return self.get_list('RequestSpotInstances', params,\n                             [('item', SpotInstanceRequest)],\n                             verb='POST')\n\n\n    def cancel_spot_instance_requests(self, request_ids):\n        \"\"\"\n        Cancel the specified Spot Instance Requests.\n\n        :type request_ids: list\n        :param request_ids: A list of strings of the Request IDs to terminate\n\n        :rtype: list\n        :return: A list of the instances terminated\n        \"\"\"\n        params = {}\n        if request_ids:\n            self.build_list_params(params, request_ids, 'SpotInstanceRequestId')\n        return self.get_list('CancelSpotInstanceRequests', params,\n                             [('item', Instance)], verb='POST')\n\n    def get_spot_datafeed_subscription(self):\n        \"\"\"\n        Return the current spot instance data feed subscription\n        associated with this account, if any.\n\n        :rtype: :class:`boto.ec2.spotdatafeedsubscription.SpotDatafeedSubscription`\n        :return: The datafeed subscription object or None\n        \"\"\"\n        return self.get_object('DescribeSpotDatafeedSubscription',\n                               None, SpotDatafeedSubscription, verb='POST')\n\n    def create_spot_datafeed_subscription(self, bucket, prefix):\n        \"\"\"\n        Create a spot instance datafeed subscription for this account.\n\n        :type bucket: str or unicode\n        :param bucket: The name of the bucket where spot instance data\n                       will be written.  The account issuing this request\n                       must have FULL_CONTROL access to the bucket\n                       specified in the request.\n\n        :type prefix: str or unicode\n        :param prefix: An optional prefix that will be pre-pended to all\n                       data files written to the bucket.\n\n        :rtype: :class:`boto.ec2.spotdatafeedsubscription.SpotDatafeedSubscription`\n        :return: The datafeed subscription object or None\n        \"\"\"\n        params = {'Bucket' : bucket}\n        if prefix:\n            params['Prefix'] = prefix\n        return self.get_object('CreateSpotDatafeedSubscription',\n                               params, SpotDatafeedSubscription, verb='POST')\n\n    def delete_spot_datafeed_subscription(self):\n        \"\"\"\n        Delete the current spot instance data feed subscription\n        associated with this account\n\n        :rtype: bool\n        :return: True if successful\n        \"\"\"\n        return self.get_status('DeleteSpotDatafeedSubscription',\n                               None, verb='POST')\n\n    # Zone methods\n\n    def get_all_zones(self, zones=None, filters=None):\n        \"\"\"\n        Get all Availability Zones associated with the current region.\n\n        :type zones: list\n        :param zones: Optional list of zones.  If this list is present,\n                      only the Zones associated with these zone names\n                      will be returned.\n\n        :type filters: dict\n        :param filters: Optional filters that can be used to limit\n                        the results returned.  Filters are provided\n                        in the form of a dictionary consisting of\n                        filter names as the key and filter values\n                        as the value.  The set of allowable filter\n                        names/values is dependent on the request\n                        being performed.  Check the EC2 API guide\n                        for details.\n\n        :rtype: list of :class:`boto.ec2.zone.Zone`\n        :return: The requested Zone objects\n        \"\"\"\n        params = {}\n        if zones:\n            self.build_list_params(params, zones, 'ZoneName')\n        if filters:\n            self.build_filter_params(params, filters)\n        return self.get_list('DescribeAvailabilityZones', params,\n                             [('item', Zone)], verb='POST')\n\n    # Address methods\n\n    def get_all_addresses(self, addresses=None, filters=None, allocation_ids=None):\n        \"\"\"\n        Get all EIP's associated with the current credentials.\n\n        :type addresses: list\n        :param addresses: Optional list of addresses.  If this list is present,\n                           only the Addresses associated with these addresses\n                           will be returned.\n\n        :type filters: dict\n        :param filters: Optional filters that can be used to limit\n                        the results returned.  Filters are provided\n                        in the form of a dictionary consisting of\n                        filter names as the key and filter values\n                        as the value.  The set of allowable filter\n                        names/values is dependent on the request\n                        being performed.  Check the EC2 API guide\n                        for details.\n\n        :type allocation_ids: list\n        :param allocation_ids: Optional list of allocation IDs.  If this list is\n                           present, only the Addresses associated with the given\n                           allocation IDs will be returned.\n\n        :rtype: list of :class:`boto.ec2.address.Address`\n        :return: The requested Address objects\n        \"\"\"\n        params = {}\n        if addresses:\n            self.build_list_params(params, addresses, 'PublicIp')\n        if allocation_ids:\n            self.build_list_params(params, allocation_ids, 'AllocationId')\n        if filters:\n            self.build_filter_params(params, filters)\n        return self.get_list('DescribeAddresses', params, [('item', Address)], verb='POST')\n\n    def allocate_address(self, domain=None):\n        \"\"\"\n        Allocate a new Elastic IP address and associate it with your account.\n\n        :rtype: :class:`boto.ec2.address.Address`\n        :return: The newly allocated Address\n        \"\"\"\n        params = {}\n\n        if domain is not None:\n            params['Domain'] = domain\n\n        return self.get_object('AllocateAddress', params, Address, verb='POST')\n\n    def associate_address(self, instance_id, public_ip=None, allocation_id=None):\n        \"\"\"\n        Associate an Elastic IP address with a currently running instance.\n        This requires one of ``public_ip`` or ``allocation_id`` depending\n        on if you're associating a VPC address or a plain EC2 address.\n\n        :type instance_id: string\n        :param instance_id: The ID of the instance\n\n        :type public_ip: string\n        :param public_ip: The public IP address for EC2 based allocations.\n\n        :type allocation_id: string\n        :param allocation_id: The allocation ID for a VPC-based elastic IP.\n\n        :rtype: bool\n        :return: True if successful\n        \"\"\"\n        params = { 'InstanceId' : instance_id }\n\n        if public_ip is not None:\n            params['PublicIp'] = public_ip\n        elif allocation_id is not None:\n            params['AllocationId'] = allocation_id\n\n        return self.get_status('AssociateAddress', params, verb='POST')\n\n    def disassociate_address(self, public_ip=None, association_id=None):\n        \"\"\"\n        Disassociate an Elastic IP address from a currently running instance.\n\n        :type public_ip: string\n        :param public_ip: The public IP address for EC2 elastic IPs.\n\n        :type association_id: string\n        :param association_id: The association ID for a VPC based elastic ip.\n\n        :rtype: bool\n        :return: True if successful\n        \"\"\"\n        params = {}\n\n        if public_ip is not None:\n            params['PublicIp'] = public_ip\n        elif association_id is not None:\n            params['AssociationId'] = association_id\n\n        return self.get_status('DisassociateAddress', params, verb='POST')\n\n    def release_address(self, public_ip=None, allocation_id=None):\n        \"\"\"\n        Free up an Elastic IP address.\n\n        :type public_ip: string\n        :param public_ip: The public IP address for EC2 elastic IPs.\n\n        :type allocation_id: string\n        :param allocation_id: The ID for VPC elastic IPs.\n\n        :rtype: bool\n        :return: True if successful\n        \"\"\"\n        params = {}\n\n        if public_ip is not None:\n            params['PublicIp'] = public_ip\n        elif allocation_id is not None:\n            params['AllocationId'] = allocation_id\n\n        return self.get_status('ReleaseAddress', params, verb='POST')\n\n    # Volume methods\n\n    def get_all_volumes(self, volume_ids=None, filters=None):\n        \"\"\"\n        Get all Volumes associated with the current credentials.\n\n        :type volume_ids: list\n        :param volume_ids: Optional list of volume ids.  If this list\n                           is present, only the volumes associated with\n                           these volume ids will be returned.\n\n        :type filters: dict\n        :param filters: Optional filters that can be used to limit\n                        the results returned.  Filters are provided\n                        in the form of a dictionary consisting of\n                        filter names as the key and filter values\n                        as the value.  The set of allowable filter\n                        names/values is dependent on the request\n                        being performed.  Check the EC2 API guide\n                        for details.\n\n        :rtype: list of :class:`boto.ec2.volume.Volume`\n        :return: The requested Volume objects\n        \"\"\"\n        params = {}\n        if volume_ids:\n            self.build_list_params(params, volume_ids, 'VolumeId')\n        if filters:\n            self.build_filter_params(params, filters)\n        return self.get_list('DescribeVolumes', params,\n                             [('item', Volume)], verb='POST')\n\n    def create_volume(self, size, zone, snapshot=None):\n        \"\"\"\n        Create a new EBS Volume.\n\n        :type size: int\n        :param size: The size of the new volume, in GiB\n\n        :type zone: string or :class:`boto.ec2.zone.Zone`\n        :param zone: The availability zone in which the Volume will be created.\n\n        :type snapshot: string or :class:`boto.ec2.snapshot.Snapshot`\n        :param snapshot: The snapshot from which the new Volume will be created.\n        \"\"\"\n        if isinstance(zone, Zone):\n            zone = zone.name\n        params = {'AvailabilityZone' : zone}\n        if size:\n            params['Size'] = size\n        if snapshot:\n            if isinstance(snapshot, Snapshot):\n                snapshot = snapshot.id\n            params['SnapshotId'] = snapshot\n        return self.get_object('CreateVolume', params, Volume, verb='POST')\n\n    def delete_volume(self, volume_id):\n        \"\"\"\n        Delete an EBS volume.\n\n        :type volume_id: str\n        :param volume_id: The ID of the volume to be delete.\n\n        :rtype: bool\n        :return: True if successful\n        \"\"\"\n        params = {'VolumeId': volume_id}\n        return self.get_status('DeleteVolume', params, verb='POST')\n\n    def attach_volume(self, volume_id, instance_id, device):\n        \"\"\"\n        Attach an EBS volume to an EC2 instance.\n\n        :type volume_id: str\n        :param volume_id: The ID of the EBS volume to be attached.\n\n        :type instance_id: str\n        :param instance_id: The ID of the EC2 instance to which it will\n                            be attached.\n\n        :type device: str\n        :param device: The device on the instance through which the\n                       volume will be exposted (e.g. /dev/sdh)\n\n        :rtype: bool\n        :return: True if successful\n        \"\"\"\n        params = {'InstanceId' : instance_id,\n                  'VolumeId' : volume_id,\n                  'Device' : device}\n        return self.get_status('AttachVolume', params, verb='POST')\n\n    def detach_volume(self, volume_id, instance_id=None,\n                      device=None, force=False):\n        \"\"\"\n        Detach an EBS volume from an EC2 instance.\n\n        :type volume_id: str\n        :param volume_id: The ID of the EBS volume to be attached.\n\n        :type instance_id: str\n        :param instance_id: The ID of the EC2 instance from which it will\n                            be detached.\n\n        :type device: str\n        :param device: The device on the instance through which the\n                       volume is exposted (e.g. /dev/sdh)\n\n        :type force: bool\n        :param force: Forces detachment if the previous detachment attempt did\n                      not occur cleanly.  This option can lead to data loss or\n                      a corrupted file system. Use this option only as a last\n                      resort to detach a volume from a failed instance. The\n                      instance will not have an opportunity to flush file system\n                      caches nor file system meta data. If you use this option,\n                      you must perform file system check and repair procedures.\n\n        :rtype: bool\n        :return: True if successful\n        \"\"\"\n        params = {'VolumeId' : volume_id}\n        if instance_id:\n            params['InstanceId'] = instance_id\n        if device:\n            params['Device'] = device\n        if force:\n            params['Force'] = 'true'\n        return self.get_status('DetachVolume', params, verb='POST')\n\n    # Snapshot methods\n\n    def get_all_snapshots(self, snapshot_ids=None,\n                          owner=None, restorable_by=None,\n                          filters=None):\n        \"\"\"\n        Get all EBS Snapshots associated with the current credentials.\n\n        :type snapshot_ids: list\n        :param snapshot_ids: Optional list of snapshot ids.  If this list is\n                             present, only the Snapshots associated with\n                             these snapshot ids will be returned.\n\n        :type owner: str\n        :param owner: If present, only the snapshots owned by the specified user\n                      will be returned.  Valid values are:\n\n                      * self\n                      * amazon\n                      * AWS Account ID\n\n        :type restorable_by: str\n        :param restorable_by: If present, only the snapshots that are restorable\n                              by the specified account id will be returned.\n\n        :type filters: dict\n        :param filters: Optional filters that can be used to limit\n                        the results returned.  Filters are provided\n                        in the form of a dictionary consisting of\n                        filter names as the key and filter values\n                        as the value.  The set of allowable filter\n                        names/values is dependent on the request\n                        being performed.  Check the EC2 API guide\n                        for details.\n\n        :rtype: list of :class:`boto.ec2.snapshot.Snapshot`\n        :return: The requested Snapshot objects\n        \"\"\"\n        params = {}\n        if snapshot_ids:\n            self.build_list_params(params, snapshot_ids, 'SnapshotId')\n        if owner:\n            params['Owner'] = owner\n        if restorable_by:\n            params['RestorableBy'] = restorable_by\n        if filters:\n            self.build_filter_params(params, filters)\n        return self.get_list('DescribeSnapshots', params,\n                             [('item', Snapshot)], verb='POST')\n\n    def create_snapshot(self, volume_id, description=None):\n        \"\"\"\n        Create a snapshot of an existing EBS Volume.\n\n        :type volume_id: str\n        :param volume_id: The ID of the volume to be snapshot'ed\n\n        :type description: str\n        :param description: A description of the snapshot.\n                            Limited to 255 characters.\n\n        :rtype: bool\n        :return: True if successful\n        \"\"\"\n        params = {'VolumeId' : volume_id}\n        if description:\n            params['Description'] = description[0:255]\n        snapshot = self.get_object('CreateSnapshot', params,\n                                   Snapshot, verb='POST')\n        volume = self.get_all_volumes([volume_id])[0]\n        volume_name = volume.tags.get('Name')\n        if volume_name:\n            snapshot.add_tag('Name', volume_name)\n        return snapshot\n\n    def delete_snapshot(self, snapshot_id):\n        params = {'SnapshotId': snapshot_id}\n        return self.get_status('DeleteSnapshot', params, verb='POST')\n\n    def trim_snapshots(self, hourly_backups = 8, daily_backups = 7,\n                       weekly_backups = 4):\n        \"\"\"\n        Trim excess snapshots, based on when they were taken. More current\n        snapshots are retained, with the number retained decreasing as you\n        move back in time.\n\n        If ebs volumes have a 'Name' tag with a value, their snapshots\n        will be assigned the same tag when they are created. The values\n        of the 'Name' tags for snapshots are used by this function to\n        group snapshots taken from the same volume (or from a series\n        of like-named volumes over time) for trimming.\n\n        For every group of like-named snapshots, this function retains\n        the newest and oldest snapshots, as well as, by default,  the\n        first snapshots taken in each of the last eight hours, the first\n        snapshots taken in each of the last seven days, the first snapshots\n        taken in the last 4 weeks (counting Midnight Sunday morning as\n        the start of the week), and the first snapshot from the first\n        Sunday of each month forever.\n\n        :type hourly_backups: int\n        :param hourly_backups: How many recent hourly backups should be saved.\n\n        :type daily_backups: int\n        :param daily_backups: How many recent daily backups should be saved.\n\n        :type weekly_backups: int\n        :param weekly_backups: How many recent weekly backups should be saved.\n        \"\"\"\n\n        # This function first builds up an ordered list of target times\n        # that snapshots should be saved for (last 8 hours, last 7 days, etc.).\n        # Then a map of snapshots is constructed, with the keys being\n        # the snapshot / volume names and the values being arrays of\n        # chronologically sorted snapshots.\n        # Finally, for each array in the map, we go through the snapshot\n        # array and the target time array in an interleaved fashion,\n        # deleting snapshots whose start_times don't immediately follow a\n        # target time (we delete a snapshot if there's another snapshot\n        # that was made closer to the preceding target time).\n\n        now = datetime.utcnow()\n        last_hour = datetime(now.year, now.month, now.day, now.hour)\n        last_midnight = datetime(now.year, now.month, now.day)\n        last_sunday = datetime(now.year, now.month, now.day) - timedelta(days = (now.weekday() + 1) % 7)\n        start_of_month = datetime(now.year, now.month, 1)\n\n        target_backup_times = []\n\n        # there are no snapshots older than 1/1/2007\n        oldest_snapshot_date = datetime(2007, 1, 1)\n\n        for hour in range(0, hourly_backups):\n            target_backup_times.append(last_hour - timedelta(hours = hour))\n\n        for day in range(0, daily_backups):\n            target_backup_times.append(last_midnight - timedelta(days = day))\n\n        for week in range(0, weekly_backups):\n            target_backup_times.append(last_sunday - timedelta(weeks = week))\n\n        one_day = timedelta(days = 1)\n        while start_of_month > oldest_snapshot_date:\n            # append the start of the month to the list of\n            # snapshot dates to save:\n            target_backup_times.append(start_of_month)\n            # there's no timedelta setting for one month, so instead:\n            # decrement the day by one, so we go to the final day of\n            # the previous month...\n            start_of_month -= one_day\n            # ... and then go to the first day of that previous month:\n            start_of_month = datetime(start_of_month.year,\n                                      start_of_month.month, 1)\n\n        temp = []\n\n        for t in target_backup_times:\n            if temp.__contains__(t) == False:\n                temp.append(t)\n\n        target_backup_times = temp\n        # make the oldeest dates first, and make sure the month start\n        # and last four week's start are in the proper order\n        target_backup_times.sort()\n\n        # get all the snapshots, sort them by date and time, and\n        # organize them into one array for each volume:\n        all_snapshots = self.get_all_snapshots(owner = 'self')\n        all_snapshots.sort(cmp = lambda x, y: cmp(x.start_time, y.start_time))\n        snaps_for_each_volume = {}\n        for snap in all_snapshots:\n            # the snapshot name and the volume name are the same.\n            # The snapshot name is set from the volume\n            # name at the time the snapshot is taken\n            volume_name = snap.tags.get('Name')\n            if volume_name:\n                # only examine snapshots that have a volume name\n                snaps_for_volume = snaps_for_each_volume.get(volume_name)\n                if not snaps_for_volume:\n                    snaps_for_volume = []\n                    snaps_for_each_volume[volume_name] = snaps_for_volume\n                snaps_for_volume.append(snap)\n\n        # Do a running comparison of snapshot dates to desired time\n        #periods, keeping the oldest snapshot in each\n        # time period and deleting the rest:\n        for volume_name in snaps_for_each_volume:\n            snaps = snaps_for_each_volume[volume_name]\n            snaps = snaps[:-1] # never delete the newest snapshot\n            time_period_number = 0\n            snap_found_for_this_time_period = False\n            for snap in snaps:\n                check_this_snap = True\n                while check_this_snap and time_period_number < target_backup_times.__len__():\n                    snap_date = datetime.strptime(snap.start_time,\n                                                  '%Y-%m-%dT%H:%M:%S.000Z')\n                    if snap_date < target_backup_times[time_period_number]:\n                        # the snap date is before the cutoff date.\n                        # Figure out if it's the first snap in this\n                        # date range and act accordingly (since both\n                        #date the date ranges and the snapshots\n                        # are sorted chronologically, we know this\n                        #snapshot isn't in an earlier date range):\n                        if snap_found_for_this_time_period == True:\n                            if not snap.tags.get('preserve_snapshot'):\n                                # as long as the snapshot wasn't marked\n                                # with the 'preserve_snapshot' tag, delete it:\n                                try:\n                                    self.delete_snapshot(snap.id)\n                                    boto.log.info('Trimmed snapshot %s (%s)' % (snap.tags['Name'], snap.start_time))\n                                except EC2ResponseError:\n                                    boto.log.error('Attempt to trim snapshot %s (%s) failed. Possible result of a race condition with trimming on another server?' % (snap.tags['Name'], snap.start_time))\n                            # go on and look at the next snapshot,\n                            #leaving the time period alone\n                        else:\n                            # this was the first snapshot found for this\n                            #time period. Leave it alone and look at the\n                            # next snapshot:\n                            snap_found_for_this_time_period = True\n                        check_this_snap = False\n                    else:\n                        # the snap is after the cutoff date. Check it\n                        # against the next cutoff date\n                        time_period_number += 1\n                        snap_found_for_this_time_period = False\n\n\n    def get_snapshot_attribute(self, snapshot_id,\n                               attribute='createVolumePermission'):\n        \"\"\"\n        Get information about an attribute of a snapshot.  Only one attribute\n        can be specified per call.\n\n        :type snapshot_id: str\n        :param snapshot_id: The ID of the snapshot.\n\n        :type attribute: str\n        :param attribute: The requested attribute.  Valid values are:\n\n                          * createVolumePermission\n\n        :rtype: list of :class:`boto.ec2.snapshotattribute.SnapshotAttribute`\n        :return: The requested Snapshot attribute\n        \"\"\"\n        params = {'Attribute' : attribute}\n        if snapshot_id:\n            params['SnapshotId'] = snapshot_id\n        return self.get_object('DescribeSnapshotAttribute', params,\n                               SnapshotAttribute, verb='POST')\n\n    def modify_snapshot_attribute(self, snapshot_id,\n                                  attribute='createVolumePermission',\n                                  operation='add', user_ids=None, groups=None):\n        \"\"\"\n        Changes an attribute of an image.\n\n        :type snapshot_id: string\n        :param snapshot_id: The snapshot id you wish to change\n\n        :type attribute: string\n        :param attribute: The attribute you wish to change.  Valid values are:\n                          createVolumePermission\n\n        :type operation: string\n        :param operation: Either add or remove (this is required for changing\n                          snapshot ermissions)\n\n        :type user_ids: list\n        :param user_ids: The Amazon IDs of users to add/remove attributes\n\n        :type groups: list\n        :param groups: The groups to add/remove attributes.  The only valid\n                       value at this time is 'all'.\n\n        \"\"\"\n        params = {'SnapshotId' : snapshot_id,\n                  'Attribute' : attribute,\n                  'OperationType' : operation}\n        if user_ids:\n            self.build_list_params(params, user_ids, 'UserId')\n        if groups:\n            self.build_list_params(params, groups, 'UserGroup')\n        return self.get_status('ModifySnapshotAttribute', params, verb='POST')\n\n    def reset_snapshot_attribute(self, snapshot_id,\n                                 attribute='createVolumePermission'):\n        \"\"\"\n        Resets an attribute of a snapshot to its default value.\n\n        :type snapshot_id: string\n        :param snapshot_id: ID of the snapshot\n\n        :type attribute: string\n        :param attribute: The attribute to reset\n\n        :rtype: bool\n        :return: Whether the operation succeeded or not\n        \"\"\"\n        params = {'SnapshotId' : snapshot_id,\n                  'Attribute' : attribute}\n        return self.get_status('ResetSnapshotAttribute', params, verb='POST')\n\n    # Keypair methods\n\n    def get_all_key_pairs(self, keynames=None, filters=None):\n        \"\"\"\n        Get all key pairs associated with your account.\n\n        :type keynames: list\n        :param keynames: A list of the names of keypairs to retrieve.\n                         If not provided, all key pairs will be returned.\n\n        :type filters: dict\n        :param filters: Optional filters that can be used to limit\n                        the results returned.  Filters are provided\n                        in the form of a dictionary consisting of\n                        filter names as the key and filter values\n                        as the value.  The set of allowable filter\n                        names/values is dependent on the request\n                        being performed.  Check the EC2 API guide\n                        for details.\n\n        :rtype: list\n        :return: A list of :class:`boto.ec2.keypair.KeyPair`\n        \"\"\"\n        params = {}\n        if keynames:\n            self.build_list_params(params, keynames, 'KeyName')\n        if filters:\n            self.build_filter_params(params, filters)\n        return self.get_list('DescribeKeyPairs', params,\n                             [('item', KeyPair)], verb='POST')\n\n    def get_key_pair(self, keyname):\n        \"\"\"\n        Convenience method to retrieve a specific keypair (KeyPair).\n\n        :type image_id: string\n        :param image_id: the ID of the Image to retrieve\n\n        :rtype: :class:`boto.ec2.keypair.KeyPair`\n        :return: The KeyPair specified or None if it is not found\n        \"\"\"\n        try:\n            return self.get_all_key_pairs(keynames=[keyname])[0]\n        except IndexError: # None of those key pairs available\n            return None\n\n    def create_key_pair(self, key_name):\n        \"\"\"\n        Create a new key pair for your account.\n        This will create the key pair within the region you\n        are currently connected to.\n\n        :type key_name: string\n        :param key_name: The name of the new keypair\n\n        :rtype: :class:`boto.ec2.keypair.KeyPair`\n        :return: The newly created :class:`boto.ec2.keypair.KeyPair`.\n                 The material attribute of the new KeyPair object\n                 will contain the the unencrypted PEM encoded RSA private key.\n        \"\"\"\n        params = {'KeyName':key_name}\n        return self.get_object('CreateKeyPair', params, KeyPair, verb='POST')\n\n    def delete_key_pair(self, key_name):\n        \"\"\"\n        Delete a key pair from your account.\n\n        :type key_name: string\n        :param key_name: The name of the keypair to delete\n        \"\"\"\n        params = {'KeyName':key_name}\n        return self.get_status('DeleteKeyPair', params, verb='POST')\n\n    def import_key_pair(self, key_name, public_key_material):\n        \"\"\"\n        mports the public key from an RSA key pair that you created\n        with a third-party tool.\n\n        Supported formats:\n\n        * OpenSSH public key format (e.g., the format\n          in ~/.ssh/authorized_keys)\n\n        * Base64 encoded DER format\n\n        * SSH public key file format as specified in RFC4716\n\n        DSA keys are not supported. Make sure your key generator is\n        set up to create RSA keys.\n\n        Supported lengths: 1024, 2048, and 4096.\n\n        :type key_name: string\n        :param key_name: The name of the new keypair\n\n        :type public_key_material: string\n        :param public_key_material: The public key. You must base64 encode\n                                    the public key material before sending\n                                    it to AWS.\n\n        :rtype: :class:`boto.ec2.keypair.KeyPair`\n        :return: The newly created :class:`boto.ec2.keypair.KeyPair`.\n                 The material attribute of the new KeyPair object\n                 will contain the the unencrypted PEM encoded RSA private key.\n        \"\"\"\n        public_key_material = base64.b64encode(public_key_material)\n        params = {'KeyName' : key_name,\n                  'PublicKeyMaterial' : public_key_material}\n        return self.get_object('ImportKeyPair', params, KeyPair, verb='POST')\n\n    # SecurityGroup methods\n\n    def get_all_security_groups(self, groupnames=None, group_ids=None, filters=None):\n        \"\"\"\n        Get all security groups associated with your account in a region.\n\n        :type groupnames: list\n        :param groupnames: A list of the names of security groups to retrieve.\n                           If not provided, all security groups will be\n                           returned.\n\n        :type group_ids: list\n        :param group_ids: A list of IDs of security groups to retrieve for\n                          security groups within a VPC.\n\n        :type filters: dict\n        :param filters: Optional filters that can be used to limit\n                        the results returned.  Filters are provided\n                        in the form of a dictionary consisting of\n                        filter names as the key and filter values\n                        as the value.  The set of allowable filter\n                        names/values is dependent on the request\n                        being performed.  Check the EC2 API guide\n                        for details.\n\n        :rtype: list\n        :return: A list of :class:`boto.ec2.securitygroup.SecurityGroup`\n        \"\"\"\n        params = {}\n        if groupnames is not None:\n            self.build_list_params(params, groupnames, 'GroupName')\n        if group_ids is not None:\n            self.build_list_params(params, group_ids, 'GroupId')\n        if filters is not None:\n            self.build_filter_params(params, filters)\n\n        return self.get_list('DescribeSecurityGroups', params,\n                             [('item', SecurityGroup)], verb='POST')\n\n    def create_security_group(self, name, description, vpc_id=None):\n        \"\"\"\n        Create a new security group for your account.\n        This will create the security group within the region you\n        are currently connected to.\n\n        :type name: string\n        :param name: The name of the new security group\n\n        :type description: string\n        :param description: The description of the new security group\n\n        :type vpc_id: string\n        :param vpc_id: The ID of the VPC to create the security group in,\n                       if any.\n\n        :rtype: :class:`boto.ec2.securitygroup.SecurityGroup`\n        :return: The newly created :class:`boto.ec2.keypair.KeyPair`.\n        \"\"\"\n        params = {\n            'GroupName': name,\n            'GroupDescription': description\n        }\n\n        if vpc_id is not None:\n            params['VpcId'] = vpc_id\n\n        group = self.get_object('CreateSecurityGroup', params,\n                                SecurityGroup, verb='POST')\n        group.name = name\n        group.description = description\n        return group\n\n    def delete_security_group(self, name=None, group_id=None):\n        \"\"\"\n        Delete a security group from your account.\n\n        :type name: string\n        :param name: The name of the security group to delete.\n\n        :type group_id: string\n        :param group_id: The ID of the security group to delete within\n          a VPC.\n\n        :rtype: bool\n        :return: True if successful.\n        \"\"\"\n        params = {}\n\n        if name is not None:\n            params['GroupName'] = name\n        elif group_id is not None:\n            params['GroupId'] = group_id\n\n        return self.get_status('DeleteSecurityGroup', params, verb='POST')\n\n    def authorize_security_group_deprecated(self, group_name,\n                                            src_security_group_name=None,\n                                            src_security_group_owner_id=None,\n                                            ip_protocol=None,\n                                            from_port=None, to_port=None,\n                                            cidr_ip=None):\n        \"\"\"\n        NOTE: This method uses the old-style request parameters\n              that did not allow a port to be specified when\n              authorizing a group.\n\n        :type group_name: string\n        :param group_name: The name of the security group you are adding\n                           the rule to.\n\n        :type src_security_group_name: string\n        :param src_security_group_name: The name of the security group you are\n                                        granting access to.\n\n        :type src_security_group_owner_id: string\n        :param src_security_group_owner_id: The ID of the owner of the security\n                                            group you are granting access to.\n\n        :type ip_protocol: string\n        :param ip_protocol: Either tcp | udp | icmp\n\n        :type from_port: int\n        :param from_port: The beginning port number you are enabling\n\n        :type to_port: int\n        :param to_port: The ending port number you are enabling\n\n        :type to_port: string\n        :param to_port: The CIDR block you are providing access to.\n                        See http://goo.gl/Yj5QC\n\n        :rtype: bool\n        :return: True if successful.\n        \"\"\"\n        params = {'GroupName':group_name}\n        if src_security_group_name:\n            params['SourceSecurityGroupName'] = src_security_group_name\n        if src_security_group_owner_id:\n            params['SourceSecurityGroupOwnerId'] = src_security_group_owner_id\n        if ip_protocol:\n            params['IpProtocol'] = ip_protocol\n        if from_port:\n            params['FromPort'] = from_port\n        if to_port:\n            params['ToPort'] = to_port\n        if cidr_ip:\n            params['CidrIp'] = cidr_ip\n        return self.get_status('AuthorizeSecurityGroupIngress', params)\n\n    def authorize_security_group(self, group_name=None,\n                                 src_security_group_name=None,\n                                 src_security_group_owner_id=None,\n                                 ip_protocol=None, from_port=None, to_port=None,\n                                 cidr_ip=None, group_id=None,\n                                 src_security_group_group_id=None):\n        \"\"\"\n        Add a new rule to an existing security group.\n        You need to pass in either src_security_group_name and\n        src_security_group_owner_id OR ip_protocol, from_port, to_port,\n        and cidr_ip.  In other words, either you are authorizing another\n        group or you are authorizing some ip-based rule.\n\n        :type group_name: string\n        :param group_name: The name of the security group you are adding\n                           the rule to.\n\n        :type src_security_group_name: string\n        :param src_security_group_name: The name of the security group you are\n                                        granting access to.\n\n        :type src_security_group_owner_id: string\n        :param src_security_group_owner_id: The ID of the owner of the security\n                                            group you are granting access to.\n\n        :type ip_protocol: string\n        :param ip_protocol: Either tcp | udp | icmp\n\n        :type from_port: int\n        :param from_port: The beginning port number you are enabling\n\n        :type to_port: int\n        :param to_port: The ending port number you are enabling\n\n        :type cidr_ip: string\n        :param cidr_ip: The CIDR block you are providing access to.\n                        See http://goo.gl/Yj5QC\n\n        :type group_id: string\n        :param group_id: ID of the EC2 or VPC security group to modify.\n                         This is required for VPC security groups and\n                         can be used instead of group_name for EC2\n                         security groups.\n\n        :type group_id: string\n        :param group_id: ID of the EC2 or VPC source security group.\n                         This is required for VPC security groups and\n                         can be used instead of group_name for EC2\n                         security groups.\n\n        :rtype: bool\n        :return: True if successful.\n        \"\"\"\n        if src_security_group_name:\n            if from_port is None and to_port is None and ip_protocol is None:\n                return self.authorize_security_group_deprecated(\n                    group_name, src_security_group_name,\n                    src_security_group_owner_id)\n\n        params = {}\n\n        if group_name:\n            params['GroupName'] = group_name\n        if group_id:\n            params['GroupId'] = group_id\n        if src_security_group_name:\n            param_name = 'IpPermissions.1.Groups.1.GroupName'\n            params[param_name] = src_security_group_name\n        if src_security_group_owner_id:\n            param_name = 'IpPermissions.1.Groups.1.UserId'\n            params[param_name] = src_security_group_owner_id\n        if src_security_group_group_id:\n            param_name = 'IpPermissions.1.Groups.1.GroupId'\n            params[param_name] = src_security_group_group_id\n        if ip_protocol:\n            params['IpPermissions.1.IpProtocol'] = ip_protocol\n        if from_port is not None:\n            params['IpPermissions.1.FromPort'] = from_port\n        if to_port is not None:\n            params['IpPermissions.1.ToPort'] = to_port\n        if cidr_ip:\n            params['IpPermissions.1.IpRanges.1.CidrIp'] = cidr_ip\n\n        return self.get_status('AuthorizeSecurityGroupIngress',\n                               params, verb='POST')\n\n    def authorize_security_group_egress(group_id,\n                                        ip_protocol,\n                                        from_port=None,\n                                        to_port=None,\n                                        src_group_id=None,\n                                        cidr_ip=None):\n        \"\"\"\n        The action adds one or more egress rules to a VPC security\n        group. Specifically, this action permits instances in a\n        security group to send traffic to one or more destination\n        CIDR IP address ranges, or to one or more destination\n        security groups in the same VPC.\n        \"\"\"\n        params = {\n            'GroupId': group_id,\n            'IpPermissions.1.IpProtocol': ip_protocol\n        }\n\n        if from_port is not None:\n            params['IpPermissions.1.FromPort'] = from_port\n        if to_port is not None:\n            params['IpPermissions.1.ToPort'] = to_port\n        if src_group_id is not None:\n            params['IpPermissions.1.Groups.1.GroupId'] = src_group_id\n        if cidr_ip is not None:\n            params['IpPermissions.1.Groups.1.CidrIp'] = cidr_ip\n\n        return self.get_status('AuthorizeSecurityGroupEgress',\n                               params, verb='POST')\n\n    def revoke_security_group_deprecated(self, group_name,\n                                         src_security_group_name=None,\n                                         src_security_group_owner_id=None,\n                                         ip_protocol=None,\n                                         from_port=None, to_port=None,\n                                         cidr_ip=None):\n        \"\"\"\n        NOTE: This method uses the old-style request parameters\n              that did not allow a port to be specified when\n              authorizing a group.\n\n        Remove an existing rule from an existing security group.\n        You need to pass in either src_security_group_name and\n        src_security_group_owner_id OR ip_protocol, from_port, to_port,\n        and cidr_ip.  In other words, either you are revoking another\n        group or you are revoking some ip-based rule.\n\n        :type group_name: string\n        :param group_name: The name of the security group you are removing\n                           the rule from.\n\n        :type src_security_group_name: string\n        :param src_security_group_name: The name of the security group you are\n                                        revoking access to.\n\n        :type src_security_group_owner_id: string\n        :param src_security_group_owner_id: The ID of the owner of the security\n                                            group you are revoking access to.\n\n        :type ip_protocol: string\n        :param ip_protocol: Either tcp | udp | icmp\n\n        :type from_port: int\n        :param from_port: The beginning port number you are disabling\n\n        :type to_port: int\n        :param to_port: The ending port number you are disabling\n\n        :type to_port: string\n        :param to_port: The CIDR block you are revoking access to.\n                        http://goo.gl/Yj5QC\n\n        :type group_id: string\n        :param group_id: ID of the EC2 or VPC security group to modify.\n                         This is required for VPC security groups and\n                         can be used instead of group_name for EC2\n                         security groups.\n\n        :type group_id: string\n        :param group_id: ID of the EC2 or VPC source security group.\n                         This is required for VPC security groups and\n                         can be used instead of group_name for EC2\n                         security groups.\n\n        :rtype: bool\n        :return: True if successful.\n        \"\"\"\n        params = {'GroupName':group_name}\n        if src_security_group_name:\n            params['SourceSecurityGroupName'] = src_security_group_name\n        if src_security_group_owner_id:\n            params['SourceSecurityGroupOwnerId'] = src_security_group_owner_id\n        if ip_protocol:\n            params['IpProtocol'] = ip_protocol\n        if from_port:\n            params['FromPort'] = from_port\n        if to_port:\n            params['ToPort'] = to_port\n        if cidr_ip:\n            params['CidrIp'] = cidr_ip\n        return self.get_status('RevokeSecurityGroupIngress', params)\n\n    def revoke_security_group(self, group_name, src_security_group_name=None,\n                              src_security_group_owner_id=None,\n                              ip_protocol=None, from_port=None, to_port=None,\n                              cidr_ip=None, group_id=None,\n                              src_security_group_group_id=None):\n        \"\"\"\n        Remove an existing rule from an existing security group.\n        You need to pass in either src_security_group_name and\n        src_security_group_owner_id OR ip_protocol, from_port, to_port,\n        and cidr_ip.  In other words, either you are revoking another\n        group or you are revoking some ip-based rule.\n\n        :type group_name: string\n        :param group_name: The name of the security group you are removing\n                           the rule from.\n\n        :type src_security_group_name: string\n        :param src_security_group_name: The name of the security group you are\n                                        revoking access to.\n\n        :type src_security_group_owner_id: string\n        :param src_security_group_owner_id: The ID of the owner of the security\n                                            group you are revoking access to.\n\n        :type ip_protocol: string\n        :param ip_protocol: Either tcp | udp | icmp\n\n        :type from_port: int\n        :param from_port: The beginning port number you are disabling\n\n        :type to_port: int\n        :param to_port: The ending port number you are disabling\n\n        :type cidr_ip: string\n        :param cidr_ip: The CIDR block you are revoking access to.\n                        See http://goo.gl/Yj5QC\n\n        :rtype: bool\n        :return: True if successful.\n        \"\"\"\n        if src_security_group_name:\n            if from_port is None and to_port is None and ip_protocol is None:\n                return self.revoke_security_group_deprecated(\n                    group_name, src_security_group_name,\n                    src_security_group_owner_id)\n        params = {}\n        if group_name:\n            params['GroupName'] = group_name\n        if src_security_group_name:\n            param_name = 'IpPermissions.1.Groups.1.GroupName'\n            params[param_name] = src_security_group_name\n        if src_security_group_owner_id:\n            param_name = 'IpPermissions.1.Groups.1.UserId'\n            params[param_name] = src_security_group_owner_id\n        if ip_protocol:\n            params['IpPermissions.1.IpProtocol'] = ip_protocol\n        if from_port is not None:\n            params['IpPermissions.1.FromPort'] = from_port\n        if to_port is not None:\n            params['IpPermissions.1.ToPort'] = to_port\n        if cidr_ip:\n            params['IpPermissions.1.IpRanges.1.CidrIp'] = cidr_ip\n        return self.get_status('RevokeSecurityGroupIngress',\n                               params, verb='POST')\n\n    #\n    # Regions\n    #\n\n    def get_all_regions(self, region_names=None, filters=None):\n        \"\"\"\n        Get all available regions for the EC2 service.\n\n        :type region_names: list of str\n        :param region_names: Names of regions to limit output\n\n        :type filters: dict\n        :param filters: Optional filters that can be used to limit\n                        the results returned.  Filters are provided\n                        in the form of a dictionary consisting of\n                        filter names as the key and filter values\n                        as the value.  The set of allowable filter\n                        names/values is dependent on the request\n                        being performed.  Check the EC2 API guide\n                        for details.\n\n        :rtype: list\n        :return: A list of :class:`boto.ec2.regioninfo.RegionInfo`\n        \"\"\"\n        params = {}\n        if region_names:\n            self.build_list_params(params, region_names, 'RegionName')\n        if filters:\n            self.build_filter_params(params, filters)\n        regions =  self.get_list('DescribeRegions', params,\n                                 [('item', RegionInfo)], verb='POST')\n        for region in regions:\n            region.connection_cls = EC2Connection\n        return regions\n\n    #\n    # Reservation methods\n    #\n\n    def get_all_reserved_instances_offerings(self, reserved_instances_id=None,\n                                             instance_type=None,\n                                             availability_zone=None,\n                                             product_description=None,\n                                             filters=None):\n        \"\"\"\n        Describes Reserved Instance offerings that are available for purchase.\n\n        :type reserved_instances_id: str\n        :param reserved_instances_id: Displays Reserved Instances with the\n                                      specified offering IDs.\n\n        :type instance_type: str\n        :param instance_type: Displays Reserved Instances of the specified\n                              instance type.\n\n        :type availability_zone: str\n        :param availability_zone: Displays Reserved Instances within the\n                                  specified Availability Zone.\n\n        :type product_description: str\n        :param product_description: Displays Reserved Instances with the\n                                    specified product description.\n\n        :type filters: dict\n        :param filters: Optional filters that can be used to limit\n                        the results returned.  Filters are provided\n                        in the form of a dictionary consisting of\n                        filter names as the key and filter values\n                        as the value.  The set of allowable filter\n                        names/values is dependent on the request\n                        being performed.  Check the EC2 API guide\n                        for details.\n\n        :rtype: list\n        :return: A list of :class:`boto.ec2.reservedinstance.ReservedInstancesOffering`\n        \"\"\"\n        params = {}\n        if reserved_instances_id:\n            params['ReservedInstancesId'] = reserved_instances_id\n        if instance_type:\n            params['InstanceType'] = instance_type\n        if availability_zone:\n            params['AvailabilityZone'] = availability_zone\n        if product_description:\n            params['ProductDescription'] = product_description\n        if filters:\n            self.build_filter_params(params, filters)\n\n        return self.get_list('DescribeReservedInstancesOfferings',\n                             params, [('item', ReservedInstancesOffering)],\n                             verb='POST')\n\n    def get_all_reserved_instances(self, reserved_instances_id=None,\n                                   filters=None):\n        \"\"\"\n        Describes Reserved Instance offerings that are available for purchase.\n\n        :type reserved_instance_ids: list\n        :param reserved_instance_ids: A list of the reserved instance ids that\n                                      will be returned. If not provided, all\n                                      reserved instances will be returned.\n\n        :type filters: dict\n        :param filters: Optional filters that can be used to limit\n                        the results returned.  Filters are provided\n                        in the form of a dictionary consisting of\n                        filter names as the key and filter values\n                        as the value.  The set of allowable filter\n                        names/values is dependent on the request\n                        being performed.  Check the EC2 API guide\n                        for details.\n\n        :rtype: list\n        :return: A list of :class:`boto.ec2.reservedinstance.ReservedInstance`\n        \"\"\"\n        params = {}\n        if reserved_instances_id:\n            self.build_list_params(params, reserved_instances_id,\n                                   'ReservedInstancesId')\n        if filters:\n            self.build_filter_params(params, filters)\n        return self.get_list('DescribeReservedInstances',\n                             params, [('item', ReservedInstance)], verb='POST')\n\n    def purchase_reserved_instance_offering(self,\n                                            reserved_instances_offering_id,\n                                            instance_count=1):\n        \"\"\"\n        Purchase a Reserved Instance for use with your account.\n        ** CAUTION **\n        This request can result in large amounts of money being charged to your\n        AWS account.  Use with caution!\n\n        :type reserved_instances_offering_id: string\n        :param reserved_instances_offering_id: The offering ID of the Reserved\n                                               Instance to purchase\n\n        :type instance_count: int\n        :param instance_count: The number of Reserved Instances to purchase.\n                               Default value is 1.\n\n        :rtype: :class:`boto.ec2.reservedinstance.ReservedInstance`\n        :return: The newly created Reserved Instance\n        \"\"\"\n        params = {\n            'ReservedInstancesOfferingId' : reserved_instances_offering_id,\n            'InstanceCount' : instance_count}\n        return self.get_object('PurchaseReservedInstancesOffering', params,\n                               ReservedInstance, verb='POST')\n\n    #\n    # Monitoring\n    #\n\n    def monitor_instances(self, instance_ids):\n        \"\"\"\n        Enable CloudWatch monitoring for the supplied instances.\n\n        :type instance_id: list of strings\n        :param instance_id: The instance ids\n\n        :rtype: list\n        :return: A list of :class:`boto.ec2.instanceinfo.InstanceInfo`\n        \"\"\"\n        params = {}\n        self.build_list_params(params, instance_ids, 'InstanceId')\n        return self.get_list('MonitorInstances', params,\n                             [('item', InstanceInfo)], verb='POST')\n\n    def monitor_instance(self, instance_id):\n        \"\"\"\n        Deprecated Version, maintained for backward compatibility.\n        Enable CloudWatch monitoring for the supplied instance.\n\n        :type instance_id: string\n        :param instance_id: The instance id\n\n        :rtype: list\n        :return: A list of :class:`boto.ec2.instanceinfo.InstanceInfo`\n        \"\"\"\n        return self.monitor_instances([instance_id])\n\n    def unmonitor_instances(self, instance_ids):\n        \"\"\"\n        Disable CloudWatch monitoring for the supplied instance.\n\n        :type instance_id: list of string\n        :param instance_id: The instance id\n\n        :rtype: list\n        :return: A list of :class:`boto.ec2.instanceinfo.InstanceInfo`\n        \"\"\"\n        params = {}\n        self.build_list_params(params, instance_ids, 'InstanceId')\n        return self.get_list('UnmonitorInstances', params,\n                             [('item', InstanceInfo)], verb='POST')\n\n    def unmonitor_instance(self, instance_id):\n        \"\"\"\n        Deprecated Version, maintained for backward compatibility.\n        Disable CloudWatch monitoring for the supplied instance.\n\n        :type instance_id: string\n        :param instance_id: The instance id\n\n        :rtype: list\n        :return: A list of :class:`boto.ec2.instanceinfo.InstanceInfo`\n        \"\"\"\n        return self.unmonitor_instances([instance_id])\n\n    #\n    # Bundle Windows Instances\n    #\n\n    def bundle_instance(self, instance_id,\n                        s3_bucket,\n                        s3_prefix,\n                        s3_upload_policy):\n        \"\"\"\n        Bundle Windows instance.\n\n        :type instance_id: string\n        :param instance_id: The instance id\n\n        :type s3_bucket: string\n        :param s3_bucket: The bucket in which the AMI should be stored.\n\n        :type s3_prefix: string\n        :param s3_prefix: The beginning of the file name for the AMI.\n\n        :type s3_upload_policy: string\n        :param s3_upload_policy: Base64 encoded policy that specifies condition\n                                 and permissions for Amazon EC2 to upload the\n                                 user's image into Amazon S3.\n        \"\"\"\n\n        params = {'InstanceId' : instance_id,\n                  'Storage.S3.Bucket' : s3_bucket,\n                  'Storage.S3.Prefix' : s3_prefix,\n                  'Storage.S3.UploadPolicy' : s3_upload_policy}\n        s3auth = boto.auth.get_auth_handler(None, boto.config,\n                                            self.provider, ['s3'])\n        params['Storage.S3.AWSAccessKeyId'] = self.aws_access_key_id\n        signature = s3auth.sign_string(s3_upload_policy)\n        params['Storage.S3.UploadPolicySignature'] = signature\n        return self.get_object('BundleInstance', params,\n                               BundleInstanceTask, verb='POST')\n\n    def get_all_bundle_tasks(self, bundle_ids=None, filters=None):\n        \"\"\"\n        Retrieve current bundling tasks. If no bundle id is specified, all\n        tasks are retrieved.\n\n        :type bundle_ids: list\n        :param bundle_ids: A list of strings containing identifiers for\n                           previously created bundling tasks.\n\n        :type filters: dict\n        :param filters: Optional filters that can be used to limit\n                        the results returned.  Filters are provided\n                        in the form of a dictionary consisting of\n                        filter names as the key and filter values\n                        as the value.  The set of allowable filter\n                        names/values is dependent on the request\n                        being performed.  Check the EC2 API guide\n                        for details.\n\n        \"\"\"\n\n        params = {}\n        if bundle_ids:\n            self.build_list_params(params, bundle_ids, 'BundleId')\n        if filters:\n            self.build_filter_params(params, filters)\n        return self.get_list('DescribeBundleTasks', params,\n                             [('item', BundleInstanceTask)], verb='POST')\n\n    def cancel_bundle_task(self, bundle_id):\n        \"\"\"\n        Cancel a previously submitted bundle task\n\n        :type bundle_id: string\n        :param bundle_id: The identifier of the bundle task to cancel.\n        \"\"\"\n\n        params = {'BundleId' : bundle_id}\n        return self.get_object('CancelBundleTask', params,\n                               BundleInstanceTask, verb='POST')\n\n    def get_password_data(self, instance_id):\n        \"\"\"\n        Get encrypted administrator password for a Windows instance.\n\n        :type instance_id: string\n        :param instance_id: The identifier of the instance to retrieve the\n                            password for.\n        \"\"\"\n\n        params = {'InstanceId' : instance_id}\n        rs = self.get_object('GetPasswordData', params, ResultSet, verb='POST')\n        return rs.passwordData\n\n    #\n    # Cluster Placement Groups\n    #\n\n    def get_all_placement_groups(self, groupnames=None, filters=None):\n        \"\"\"\n        Get all placement groups associated with your account in a region.\n\n        :type groupnames: list\n        :param groupnames: A list of the names of placement groups to retrieve.\n                           If not provided, all placement groups will be\n                           returned.\n\n        :type filters: dict\n        :param filters: Optional filters that can be used to limit\n                        the results returned.  Filters are provided\n                        in the form of a dictionary consisting of\n                        filter names as the key and filter values\n                        as the value.  The set of allowable filter\n                        names/values is dependent on the request\n                        being performed.  Check the EC2 API guide\n                        for details.\n\n        :rtype: list\n        :return: A list of :class:`boto.ec2.placementgroup.PlacementGroup`\n        \"\"\"\n        params = {}\n        if groupnames:\n            self.build_list_params(params, groupnames, 'GroupName')\n        if filters:\n            self.build_filter_params(params, filters)\n        return self.get_list('DescribePlacementGroups', params,\n                             [('item', PlacementGroup)], verb='POST')\n\n    def create_placement_group(self, name, strategy='cluster'):\n        \"\"\"\n        Create a new placement group for your account.\n        This will create the placement group within the region you\n        are currently connected to.\n\n        :type name: string\n        :param name: The name of the new placement group\n\n        :type strategy: string\n        :param strategy: The placement strategy of the new placement group.\n                         Currently, the only acceptable value is \"cluster\".\n\n        :rtype: bool\n        :return: True if successful\n        \"\"\"\n        params = {'GroupName':name, 'Strategy':strategy}\n        group = self.get_status('CreatePlacementGroup', params, verb='POST')\n        return group\n\n    def delete_placement_group(self, name):\n        \"\"\"\n        Delete a placement group from your account.\n\n        :type key_name: string\n        :param key_name: The name of the keypair to delete\n        \"\"\"\n        params = {'GroupName':name}\n        return self.get_status('DeletePlacementGroup', params, verb='POST')\n\n    # Tag methods\n\n    def build_tag_param_list(self, params, tags):\n        keys = tags.keys()\n        keys.sort()\n        i = 1\n        for key in keys:\n            value = tags[key]\n            params['Tag.%d.Key'%i] = key\n            if value is not None:\n                params['Tag.%d.Value'%i] = value\n            i += 1\n\n    def get_all_tags(self, filters=None):\n        \"\"\"\n        Retrieve all the metadata tags associated with your account.\n\n        :type filters: dict\n        :param filters: Optional filters that can be used to limit\n                        the results returned.  Filters are provided\n                        in the form of a dictionary consisting of\n                        filter names as the key and filter values\n                        as the value.  The set of allowable filter\n                        names/values is dependent on the request\n                        being performed.  Check the EC2 API guide\n                        for details.\n\n        :rtype: dict\n        :return: A dictionary containing metadata tags\n        \"\"\"\n        params = {}\n        if filters:\n            self.build_filter_params(params, filters)\n        return self.get_list('DescribeTags', params,\n                             [('item', Tag)], verb='POST')\n\n    def create_tags(self, resource_ids, tags):\n        \"\"\"\n        Create new metadata tags for the specified resource ids.\n\n        :type resource_ids: list\n        :param resource_ids: List of strings\n\n        :type tags: dict\n        :param tags: A dictionary containing the name/value pairs.\n                     If you want to create only a tag name, the\n                     value for that tag should be the empty string\n                     (e.g. '').\n\n        \"\"\"\n        params = {}\n        self.build_list_params(params, resource_ids, 'ResourceId')\n        self.build_tag_param_list(params, tags)\n        return self.get_status('CreateTags', params, verb='POST')\n\n    def delete_tags(self, resource_ids, tags):\n        \"\"\"\n        Delete metadata tags for the specified resource ids.\n\n        :type resource_ids: list\n        :param resource_ids: List of strings\n\n        :type tags: dict or list\n        :param tags: Either a dictionary containing name/value pairs\n                     or a list containing just tag names.\n                     If you pass in a dictionary, the values must\n                     match the actual tag values or the tag will\n                     not be deleted.  If you pass in a value of None\n                     for the tag value, all tags with that name will\n                     be deleted.\n\n        \"\"\"\n        if isinstance(tags, list):\n            tags = {}.fromkeys(tags, None)\n        params = {}\n        self.build_list_params(params, resource_ids, 'ResourceId')\n        self.build_tag_param_list(params, tags)\n        return self.get_status('DeleteTags', params, verb='POST')\n\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/ec2/ec2object.py",
    "content": "# Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/\n# Copyright (c) 2010, Eucalyptus Systems, Inc.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\n\"\"\"\nRepresents an EC2 Object\n\"\"\"\nfrom boto.ec2.tag import TagSet\n\nclass EC2Object(object):\n\n    def __init__(self, connection=None):\n        self.connection = connection\n        if self.connection and hasattr(self.connection, 'region'):\n            self.region = connection.region\n        else:\n            self.region = None\n\n    def startElement(self, name, attrs, connection):\n        return None\n\n    def endElement(self, name, value, connection):\n        setattr(self, name, value)\n\n    \nclass TaggedEC2Object(EC2Object):\n    \"\"\"\n    Any EC2 resource that can be tagged should be represented\n    by a Python object that subclasses this class.  This class\n    has the mechanism in place to handle the tagSet element in\n    the Describe* responses.  If tags are found, it will create\n    a TagSet object and allow it to parse and collect the tags\n    into a dict that is stored in the \"tags\" attribute of the\n    object.\n    \"\"\"\n\n    def __init__(self, connection=None):\n        EC2Object.__init__(self, connection)\n        self.tags = TagSet()\n\n    def startElement(self, name, attrs, connection):\n        if name == 'tagSet':\n            return self.tags\n        else:\n            return None\n\n    def add_tag(self, key, value=''):\n        \"\"\"\n        Add a tag to this object.  Tag's are stored by AWS and can be used\n        to organize and filter resources.  Adding a tag involves a round-trip\n        to the EC2 service.\n\n        :type key: str\n        :param key: The key or name of the tag being stored.\n\n        :type value: str\n        :param value: An optional value that can be stored with the tag.\n                      If you want only the tag name and no value, the\n                      value should be the empty string.\n        \"\"\"\n        status = self.connection.create_tags([self.id], {key : value})\n        if self.tags is None:\n            self.tags = TagSet()\n        self.tags[key] = value\n\n    def remove_tag(self, key, value=None):\n        \"\"\"\n        Remove a tag from this object.  Removing a tag involves a round-trip\n        to the EC2 service.\n\n        :type key: str\n        :param key: The key or name of the tag being stored.\n\n        :type value: str\n        :param value: An optional value that can be stored with the tag.\n                      If a value is provided, it must match the value\n                      currently stored in EC2.  If not, the tag will not\n                      be removed.  If a value of None is provided, all\n                      tags with the specified name will be deleted.\n                      NOTE: There is an important distinction between\n                      a value of '' and a value of None.\n        \"\"\"\n        if value:\n            tags = {key : value}\n        else:\n            tags = [key]\n        status = self.connection.delete_tags([self.id], tags)\n        if key in self.tags:\n            del self.tags[key]\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/ec2/elb/__init__.py",
    "content": "# Copyright (c) 2006-2011 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n#\n\"\"\"\nThis module provides an interface to the Elastic Compute Cloud (EC2)\nload balancing service from AWS.\n\"\"\"\nfrom boto.connection import AWSQueryConnection\nfrom boto.ec2.instanceinfo import InstanceInfo\nfrom boto.ec2.elb.loadbalancer import LoadBalancer\nfrom boto.ec2.elb.instancestate import InstanceState\nfrom boto.ec2.elb.healthcheck import HealthCheck\nfrom boto.regioninfo import RegionInfo\nimport boto\n\nRegionData = {\n    'us-east-1' : 'elasticloadbalancing.us-east-1.amazonaws.com',\n    'us-west-1' : 'elasticloadbalancing.us-west-1.amazonaws.com',\n    'eu-west-1' : 'elasticloadbalancing.eu-west-1.amazonaws.com',\n    'ap-northeast-1' : 'elasticloadbalancing.ap-northeast-1.amazonaws.com',\n    'ap-southeast-1' : 'elasticloadbalancing.ap-southeast-1.amazonaws.com'}\n\ndef regions():\n    \"\"\"\n    Get all available regions for the SDB service.\n\n    :rtype: list\n    :return: A list of :class:`boto.RegionInfo` instances\n    \"\"\"\n    regions = []\n    for region_name in RegionData:\n        region = RegionInfo(name=region_name,\n                            endpoint=RegionData[region_name],\n                            connection_cls=ELBConnection)\n        regions.append(region)\n    return regions\n\ndef connect_to_region(region_name, **kw_params):\n    \"\"\"\n    Given a valid region name, return a\n    :class:`boto.ec2.elb.ELBConnection`.\n\n    :param str region_name: The name of the region to connect to.\n\n    :rtype: :class:`boto.ec2.ELBConnection` or ``None``\n    :return: A connection to the given region, or None if an invalid region\n        name is given\n    \"\"\"\n    for region in regions():\n        if region.name == region_name:\n            return region.connect(**kw_params)\n    return None\n\nclass ELBConnection(AWSQueryConnection):\n\n    APIVersion = boto.config.get('Boto', 'elb_version', '2011-04-05')\n    DefaultRegionName = boto.config.get('Boto', 'elb_region_name', 'us-east-1')\n    DefaultRegionEndpoint = boto.config.get('Boto', 'elb_region_endpoint',\n                                            'elasticloadbalancing.amazonaws.com')\n\n    def __init__(self, aws_access_key_id=None, aws_secret_access_key=None,\n                 is_secure=False, port=None, proxy=None, proxy_port=None,\n                 proxy_user=None, proxy_pass=None, debug=0,\n                 https_connection_factory=None, region=None, path='/'):\n        \"\"\"\n        Init method to create a new connection to EC2 Load Balancing Service.\n\n        B{Note:} The region argument is overridden by the region specified in\n        the boto configuration file.\n        \"\"\"\n        if not region:\n            region = RegionInfo(self, self.DefaultRegionName,\n                                self.DefaultRegionEndpoint)\n        self.region = region\n        AWSQueryConnection.__init__(self, aws_access_key_id,\n                                    aws_secret_access_key,\n                                    is_secure, port, proxy, proxy_port,\n                                    proxy_user, proxy_pass,\n                                    self.region.endpoint, debug,\n                                    https_connection_factory, path)\n\n    def _required_auth_capability(self):\n        return ['ec2']\n\n    def build_list_params(self, params, items, label):\n        if isinstance(items, str):\n            items = [items]\n        for index, item in enumerate(items):\n            params[label % (index + 1)] = item\n\n    def get_all_load_balancers(self, load_balancer_names=None):\n        \"\"\"\n        Retrieve all load balancers associated with your account.\n\n        :type load_balancer_names: list\n        :param load_balancer_names: An optional list of load balancer names\n\n        :rtype: list\n        :return: A list of :class:`boto.ec2.elb.loadbalancer.LoadBalancer`\n        \"\"\"\n        params = {}\n        if load_balancer_names:\n            self.build_list_params(params, load_balancer_names,\n                                   'LoadBalancerNames.member.%d')\n        return self.get_list('DescribeLoadBalancers', params,\n                             [('member', LoadBalancer)])\n\n    def create_load_balancer(self, name, zones, listeners):\n        \"\"\"\n        Create a new load balancer for your account.\n\n        :type name: string\n        :param name: The mnemonic name associated with the new load balancer\n\n        :type zones: List of strings\n        :param zones: The names of the availability zone(s) to add.\n\n        :type listeners: List of tuples\n        :param listeners: Each tuple contains three or four values,\n                          (LoadBalancerPortNumber, InstancePortNumber,\n                          Protocol, [SSLCertificateId])\n                          where LoadBalancerPortNumber and InstancePortNumber\n                          are integer values between 1 and 65535, Protocol is a\n                          string containing either 'TCP', 'HTTP' or 'HTTPS';\n                          SSLCertificateID is the ARN of a AWS AIM certificate,\n                          and must be specified when doing HTTPS.\n\n        :rtype: :class:`boto.ec2.elb.loadbalancer.LoadBalancer`\n        :return: The newly created :class:`boto.ec2.elb.loadbalancer.LoadBalancer`\n        \"\"\"\n        params = {'LoadBalancerName' : name}\n        for index, listener in enumerate(listeners):\n            i = index + 1\n            params['Listeners.member.%d.LoadBalancerPort' % i] = listener[0]\n            params['Listeners.member.%d.InstancePort' % i] = listener[1]\n            params['Listeners.member.%d.Protocol' % i] = listener[2]\n            if listener[2]=='HTTPS':\n                params['Listeners.member.%d.SSLCertificateId' % i] = listener[3]\n        self.build_list_params(params, zones, 'AvailabilityZones.member.%d')\n        load_balancer = self.get_object('CreateLoadBalancer',\n                                        params, LoadBalancer)\n        load_balancer.name = name\n        load_balancer.listeners = listeners\n        load_balancer.availability_zones = zones\n        return load_balancer\n\n    def create_load_balancer_listeners(self, name, listeners):\n        \"\"\"\n        Creates a Listener (or group of listeners) for an existing Load Balancer\n\n        :type name: string\n        :param name: The name of the load balancer to create the listeners for\n\n        :type listeners: List of tuples\n        :param listeners: Each tuple contains three values,\n                          (LoadBalancerPortNumber, InstancePortNumber, Protocol,\n                          [SSLCertificateId])\n                          where LoadBalancerPortNumber and InstancePortNumber are\n                          integer values between 1 and 65535, Protocol is a\n                          string containing either 'TCP', 'HTTP' or 'HTTPS';\n                          SSLCertificateID is the ARN of a AWS AIM certificate,\n                          and must be specified when doing HTTPS.\n\n        :return: The status of the request\n        \"\"\"\n        params = {'LoadBalancerName' : name}\n        for index, listener in enumerate(listeners):\n            i = index + 1\n            params['Listeners.member.%d.LoadBalancerPort' % i] = listener[0]\n            params['Listeners.member.%d.InstancePort' % i] = listener[1]\n            params['Listeners.member.%d.Protocol' % i] = listener[2]\n            if listener[2]=='HTTPS':\n                params['Listeners.member.%d.SSLCertificateId' % i] = listener[3]\n        return self.get_status('CreateLoadBalancerListeners', params)\n\n\n    def delete_load_balancer(self, name):\n        \"\"\"\n        Delete a Load Balancer from your account.\n\n        :type name: string\n        :param name: The name of the Load Balancer to delete\n        \"\"\"\n        params = {'LoadBalancerName': name}\n        return self.get_status('DeleteLoadBalancer', params)\n\n    def delete_load_balancer_listeners(self, name, ports):\n        \"\"\"\n        Deletes a load balancer listener (or group of listeners)\n\n        :type name: string\n        :param name: The name of the load balancer to create the listeners for\n\n        :type ports: List int\n        :param ports: Each int represents the port on the ELB to be removed\n\n        :return: The status of the request\n        \"\"\"\n        params = {'LoadBalancerName' : name}\n        for index, port in enumerate(ports):\n            params['LoadBalancerPorts.member.%d' % (index + 1)] = port\n        return self.get_status('DeleteLoadBalancerListeners', params)\n\n    def enable_availability_zones(self, load_balancer_name, zones_to_add):\n        \"\"\"\n        Add availability zones to an existing Load Balancer\n        All zones must be in the same region as the Load Balancer\n        Adding zones that are already registered with the Load Balancer\n        has no effect.\n\n        :type load_balancer_name: string\n        :param load_balancer_name: The name of the Load Balancer\n\n        :type zones: List of strings\n        :param zones: The name of the zone(s) to add.\n\n        :rtype: List of strings\n        :return: An updated list of zones for this Load Balancer.\n\n        \"\"\"\n        params = {'LoadBalancerName' : load_balancer_name}\n        self.build_list_params(params, zones_to_add,\n                               'AvailabilityZones.member.%d')\n        return self.get_list('EnableAvailabilityZonesForLoadBalancer',\n                             params, None)\n\n    def disable_availability_zones(self, load_balancer_name, zones_to_remove):\n        \"\"\"\n        Remove availability zones from an existing Load Balancer.\n        All zones must be in the same region as the Load Balancer.\n        Removing zones that are not registered with the Load Balancer\n        has no effect.\n        You cannot remove all zones from an Load Balancer.\n\n        :type load_balancer_name: string\n        :param load_balancer_name: The name of the Load Balancer\n\n        :type zones: List of strings\n        :param zones: The name of the zone(s) to remove.\n\n        :rtype: List of strings\n        :return: An updated list of zones for this Load Balancer.\n\n        \"\"\"\n        params = {'LoadBalancerName' : load_balancer_name}\n        self.build_list_params(params, zones_to_remove,\n                               'AvailabilityZones.member.%d')\n        return self.get_list('DisableAvailabilityZonesForLoadBalancer',\n                             params, None)\n\n    def register_instances(self, load_balancer_name, instances):\n        \"\"\"\n        Add new Instances to an existing Load Balancer.\n\n        :type load_balancer_name: string\n        :param load_balancer_name: The name of the Load Balancer\n\n        :type instances: List of strings\n        :param instances: The instance ID's of the EC2 instances to add.\n\n        :rtype: List of strings\n        :return: An updated list of instances for this Load Balancer.\n\n        \"\"\"\n        params = {'LoadBalancerName' : load_balancer_name}\n        self.build_list_params(params, instances,\n                               'Instances.member.%d.InstanceId')\n        return self.get_list('RegisterInstancesWithLoadBalancer',\n                             params, [('member', InstanceInfo)])\n\n    def deregister_instances(self, load_balancer_name, instances):\n        \"\"\"\n        Remove Instances from an existing Load Balancer.\n\n        :type load_balancer_name: string\n        :param load_balancer_name: The name of the Load Balancer\n\n        :type instances: List of strings\n        :param instances: The instance ID's of the EC2 instances to remove.\n\n        :rtype: List of strings\n        :return: An updated list of instances for this Load Balancer.\n\n        \"\"\"\n        params = {'LoadBalancerName' : load_balancer_name}\n        self.build_list_params(params, instances,\n                               'Instances.member.%d.InstanceId')\n        return self.get_list('DeregisterInstancesFromLoadBalancer',\n                             params, [('member', InstanceInfo)])\n\n    def describe_instance_health(self, load_balancer_name, instances=None):\n        \"\"\"\n        Get current state of all Instances registered to an Load Balancer.\n\n        :type load_balancer_name: string\n        :param load_balancer_name: The name of the Load Balancer\n\n        :type instances: List of strings\n        :param instances: The instance ID's of the EC2 instances\n                          to return status for.  If not provided,\n                          the state of all instances will be returned.\n\n        :rtype: List of :class:`boto.ec2.elb.instancestate.InstanceState`\n        :return: list of state info for instances in this Load Balancer.\n\n        \"\"\"\n        params = {'LoadBalancerName' : load_balancer_name}\n        if instances:\n            self.build_list_params(params, instances,\n                                   'Instances.member.%d.InstanceId')\n        return self.get_list('DescribeInstanceHealth', params,\n                             [('member', InstanceState)])\n\n    def configure_health_check(self, name, health_check):\n        \"\"\"\n        Define a health check for the EndPoints.\n\n        :type name: string\n        :param name: The mnemonic name associated with the load balancer\n\n        :type health_check: :class:`boto.ec2.elb.healthcheck.HealthCheck`\n        :param health_check: A HealthCheck object populated with the desired\n                             values.\n\n        :rtype: :class:`boto.ec2.elb.healthcheck.HealthCheck`\n        :return: The updated :class:`boto.ec2.elb.healthcheck.HealthCheck`\n        \"\"\"\n        params = {'LoadBalancerName' : name,\n                  'HealthCheck.Timeout' : health_check.timeout,\n                  'HealthCheck.Target' : health_check.target,\n                  'HealthCheck.Interval' : health_check.interval,\n                  'HealthCheck.UnhealthyThreshold' : health_check.unhealthy_threshold,\n                  'HealthCheck.HealthyThreshold' : health_check.healthy_threshold}\n        return self.get_object('ConfigureHealthCheck', params, HealthCheck)\n\n    def set_lb_listener_SSL_certificate(self, lb_name, lb_port,\n                                        ssl_certificate_id):\n        \"\"\"\n        Sets the certificate that terminates the specified listener's SSL\n        connections. The specified certificate replaces any prior certificate\n        that was used on the same LoadBalancer and port.\n        \"\"\"\n        params = {\n                    'LoadBalancerName'          :   lb_name,\n                    'LoadBalancerPort'          :   lb_port,\n                    'SSLCertificateId'          :   ssl_certificate_id,\n                 }\n        return self.get_status('SetLoadBalancerListenerSSLCertificate', params)\n\n    def create_app_cookie_stickiness_policy(self, name, lb_name, policy_name):\n        \"\"\"\n        Generates a stickiness policy with sticky session lifetimes that follow\n        that of an application-generated cookie. This policy can only be\n        associated with HTTP listeners.\n\n        This policy is similar to the policy created by\n        CreateLBCookieStickinessPolicy, except that the lifetime of the special\n        Elastic Load Balancing cookie follows the lifetime of the\n        application-generated cookie specified in the policy configuration. The\n        load balancer only inserts a new stickiness cookie when the application\n        response includes a new application cookie.\n\n        If the application cookie is explicitly removed or expires, the session\n        stops being sticky until a new application cookie is issued.\n        \"\"\"\n        params = {\n                    'CookieName'        :   name,\n                    'LoadBalancerName'  :   lb_name,\n                    'PolicyName'        :   policy_name,\n                 }\n        return self.get_status('CreateAppCookieStickinessPolicy', params)\n\n    def create_lb_cookie_stickiness_policy(self, cookie_expiration_period,\n                                           lb_name, policy_name):\n        \"\"\"\n        Generates a stickiness policy with sticky session lifetimes controlled\n        by the lifetime of the browser (user-agent) or a specified expiration\n        period. This policy can only be associated only with HTTP listeners.\n\n        When a load balancer implements this policy, the load balancer uses a\n        special cookie to track the backend server instance for each request.\n        When the load balancer receives a request, it first checks to see if\n        this cookie is present in the request. If so, the load balancer sends\n        the request to the application server specified in the cookie. If not,\n        the load balancer sends the request to a server that is chosen based on\n        the existing load balancing algorithm.\n\n        A cookie is inserted into the response for binding subsequent requests\n        from the same user to that server. The validity of the cookie is based\n        on the cookie expiration time, which is specified in the policy\n        configuration.\n        \"\"\"\n        params = {\n                    'CookieExpirationPeriod'    :   cookie_expiration_period,\n                    'LoadBalancerName'          :   lb_name,\n                    'PolicyName'                :   policy_name,\n                 }\n        return self.get_status('CreateLBCookieStickinessPolicy', params)\n\n    def delete_lb_policy(self, lb_name, policy_name):\n        \"\"\"\n        Deletes a policy from the LoadBalancer. The specified policy must not\n        be enabled for any listeners.\n        \"\"\"\n        params = {\n                    'LoadBalancerName'          : lb_name,\n                    'PolicyName'                : policy_name,\n                 }\n        return self.get_status('DeleteLoadBalancerPolicy', params)\n\n    def set_lb_policies_of_listener(self, lb_name, lb_port, policies):\n        \"\"\"\n        Associates, updates, or disables a policy with a listener on the load\n        balancer. Currently only zero (0) or one (1) policy can be associated\n        with a listener.\n        \"\"\"\n        params = {\n                    'LoadBalancerName'          : lb_name,\n                    'LoadBalancerPort'          : lb_port,\n                 }\n        self.build_list_params(params, policies, 'PolicyNames.member.%d')\n        return self.get_status('SetLoadBalancerPoliciesOfListener', params)\n\n\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/ec2/elb/healthcheck.py",
    "content": "# Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nclass HealthCheck(object):\n    \"\"\"\n    Represents an EC2 Access Point Health Check\n    \"\"\"\n\n    def __init__(self, access_point=None, interval=30, target=None,\n                 healthy_threshold=3, timeout=5, unhealthy_threshold=5):\n        self.access_point = access_point\n        self.interval = interval\n        self.target = target\n        self.healthy_threshold = healthy_threshold\n        self.timeout = timeout\n        self.unhealthy_threshold = unhealthy_threshold\n\n    def __repr__(self):\n        return 'HealthCheck:%s' % self.target\n\n    def startElement(self, name, attrs, connection):\n        return None\n\n    def endElement(self, name, value, connection):\n        if name == 'Interval':\n            self.interval = int(value)\n        elif name == 'Target':\n            self.target = value\n        elif name == 'HealthyThreshold':\n            self.healthy_threshold = int(value)\n        elif name == 'Timeout':\n            self.timeout = int(value)\n        elif name == 'UnhealthyThreshold':\n            self.unhealthy_threshold = int(value)\n        else:\n            setattr(self, name, value)\n\n    def update(self):\n        if not self.access_point:\n            return\n\n        new_hc = self.connection.configure_health_check(self.access_point, self)\n        self.interval = new_hc.interval\n        self.target = new_hc.target\n        self.healthy_threshold = new_hc.healthy_threshold\n        self.unhealthy_threshold = new_hc.unhealthy_threshold\n        self.timeout = new_hc.timeout\n\n\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/ec2/elb/instancestate.py",
    "content": "# Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nclass InstanceState(object):\n    \"\"\"\n    Represents the state of an EC2 Load Balancer Instance\n    \"\"\"\n\n    def __init__(self, load_balancer=None, description=None,\n                 state=None, instance_id=None, reason_code=None):\n        self.load_balancer = load_balancer\n        self.description = description\n        self.state = state\n        self.instance_id = instance_id\n        self.reason_code = reason_code\n\n    def __repr__(self):\n        return 'InstanceState:(%s,%s)' % (self.instance_id, self.state)\n\n    def startElement(self, name, attrs, connection):\n        return None\n\n    def endElement(self, name, value, connection):\n        if name == 'Description':\n            self.description = value\n        elif name == 'State':\n            self.state = value\n        elif name == 'InstanceId':\n            self.instance_id = value\n        elif name == 'ReasonCode':\n            self.reason_code = value\n        else:\n            setattr(self, name, value)\n\n\n\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/ec2/elb/listelement.py",
    "content": "# Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nclass ListElement(list):\n\n    def startElement(self, name, attrs, connection):\n        pass\n\n    def endElement(self, name, value, connection):\n        if name == 'member':\n            self.append(value)\n    \n    \n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/ec2/elb/listener.py",
    "content": "# Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nclass Listener(object):\n    \"\"\"\n    Represents an EC2 Load Balancer Listener tuple\n    \"\"\"\n\n    def __init__(self, load_balancer=None, load_balancer_port=0,\n                 instance_port=0, protocol='', ssl_certificate_id=None):\n        self.load_balancer = load_balancer\n        self.load_balancer_port = load_balancer_port\n        self.instance_port = instance_port\n        self.protocol = protocol\n        self.ssl_certificate_id = ssl_certificate_id\n\n    def __repr__(self):\n        r = \"(%d, %d, '%s'\" % (self.load_balancer_port, self.instance_port, self.protocol)\n        if self.ssl_certificate_id:\n            r += ', %s' % (self.ssl_certificate_id)\n        r += ')'\n        return r\n\n    def startElement(self, name, attrs, connection):\n        return None\n\n    def endElement(self, name, value, connection):\n        if name == 'LoadBalancerPort':\n            self.load_balancer_port = int(value)\n        elif name == 'InstancePort':\n            self.instance_port = int(value)\n        elif name == 'Protocol':\n            self.protocol = value\n        elif name == 'SSLCertificateId':\n            self.ssl_certificate_id = value\n        else:\n            setattr(self, name, value)\n\n    def get_tuple(self):\n        return self.load_balancer_port, self.instance_port, self.protocol\n\n    def __getitem__(self, key):\n        if key == 0:\n            return self.load_balancer_port\n        if key == 1:\n            return self.instance_port\n        if key == 2:\n            return self.protocol\n        raise KeyError\n\n\n\n\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/ec2/elb/loadbalancer.py",
    "content": "# Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nfrom boto.ec2.elb.healthcheck import HealthCheck\nfrom boto.ec2.elb.listener import Listener\nfrom boto.ec2.elb.listelement import ListElement\nfrom boto.ec2.elb.policies import Policies\nfrom boto.ec2.elb.securitygroup import SecurityGroup\nfrom boto.ec2.instanceinfo import InstanceInfo\nfrom boto.resultset import ResultSet\n\nclass LoadBalancer(object):\n    \"\"\"\n    Represents an EC2 Load Balancer\n    \"\"\"\n\n    def __init__(self, connection=None, name=None, endpoints=None):\n        self.connection = connection\n        self.name = name\n        self.listeners = None\n        self.health_check = None\n        self.policies = None\n        self.dns_name = None\n        self.created_time = None\n        self.instances = None\n        self.availability_zones = ListElement()\n        self.canonical_hosted_zone_name = None\n        self.canonical_hosted_zone_name_id = None\n        self.source_security_group = None\n\n    def __repr__(self):\n        return 'LoadBalancer:%s' % self.name\n\n    def startElement(self, name, attrs, connection):\n        if name == 'HealthCheck':\n            self.health_check = HealthCheck(self)\n            return self.health_check\n        elif name == 'ListenerDescriptions':\n            self.listeners = ResultSet([('member', Listener)])\n            return self.listeners\n        elif name == 'AvailabilityZones':\n            return self.availability_zones\n        elif name == 'Instances':\n            self.instances = ResultSet([('member', InstanceInfo)])\n            return self.instances\n        elif name == 'Policies':\n            self.policies = Policies(self)\n            return self.policies\n        elif name == 'SourceSecurityGroup':\n            self.source_security_group = SecurityGroup()\n            return self.source_security_group\n        else:\n            return None\n\n    def endElement(self, name, value, connection):\n        if name == 'LoadBalancerName':\n            self.name = value\n        elif name == 'DNSName':\n            self.dns_name = value\n        elif name == 'CreatedTime':\n            self.created_time = value\n        elif name == 'InstanceId':\n            self.instances.append(value)\n        elif name == 'CanonicalHostedZoneName':\n            self.canonical_hosted_zone_name = value\n        elif name == 'CanonicalHostedZoneNameID':\n            self.canonical_hosted_zone_name_id = value\n        else:\n            setattr(self, name, value)\n\n    def enable_zones(self, zones):\n        \"\"\"\n        Enable availability zones to this Access Point.\n        All zones must be in the same region as the Access Point.\n\n        :type zones: string or List of strings\n        :param zones: The name of the zone(s) to add.\n\n        \"\"\"\n        if isinstance(zones, str) or isinstance(zones, unicode):\n            zones = [zones]\n        new_zones = self.connection.enable_availability_zones(self.name, zones)\n        self.availability_zones = new_zones\n\n    def disable_zones(self, zones):\n        \"\"\"\n        Disable availability zones from this Access Point.\n\n        :type zones: string or List of strings\n        :param zones: The name of the zone(s) to add.\n\n        \"\"\"\n        if isinstance(zones, str) or isinstance(zones, unicode):\n            zones = [zones]\n        new_zones = self.connection.disable_availability_zones(self.name, zones)\n        self.availability_zones = new_zones\n\n    def register_instances(self, instances):\n        \"\"\"\n        Add instances to this Load Balancer\n        All instances must be in the same region as the Load Balancer.\n        Adding endpoints that are already registered with the Load Balancer\n        has no effect.\n\n        :type zones: string or List of instance id's\n        :param zones: The name of the endpoint(s) to add.\n\n        \"\"\"\n        if isinstance(instances, str) or isinstance(instances, unicode):\n            instances = [instances]\n        new_instances = self.connection.register_instances(self.name, instances)\n        self.instances = new_instances\n\n    def deregister_instances(self, instances):\n        \"\"\"\n        Remove instances from this Load Balancer.\n        Removing instances that are not registered with the Load Balancer\n        has no effect.\n\n        :type zones: string or List of instance id's\n        :param zones: The name of the endpoint(s) to add.\n\n        \"\"\"\n        if isinstance(instances, str) or isinstance(instances, unicode):\n            instances = [instances]\n        new_instances = self.connection.deregister_instances(self.name, instances)\n        self.instances = new_instances\n\n    def delete(self):\n        \"\"\"\n        Delete this load balancer\n        \"\"\"\n        return self.connection.delete_load_balancer(self.name)\n\n    def configure_health_check(self, health_check):\n        return self.connection.configure_health_check(self.name, health_check)\n\n    def get_instance_health(self, instances=None):\n        return self.connection.describe_instance_health(self.name, instances)\n\n    def create_listeners(self, listeners):\n        return self.connection.create_load_balancer_listeners(self.name, listeners)\n\n    def create_listener(self, inPort, outPort=None, proto=\"tcp\"):\n        if outPort == None:\n            outPort = inPort\n        return self.create_listeners([(inPort, outPort, proto)])\n\n    def delete_listeners(self, listeners):\n        return self.connection.delete_load_balancer_listeners(self.name, listeners)\n\n    def delete_listener(self, inPort, outPort=None, proto=\"tcp\"):\n        if outPort == None:\n            outPort = inPort\n        return self.delete_listeners([(inPort, outPort, proto)])\n\n    def delete_policy(self, policy_name):\n        \"\"\"\n        Deletes a policy from the LoadBalancer. The specified policy must not\n        be enabled for any listeners.\n        \"\"\"\n        return self.connection.delete_lb_policy(self.name, policy_name)\n\n    def set_policies_of_listener(self, lb_port, policies):\n        return self.connection.set_lb_policies_of_listener(self.name, lb_port, policies)\n\n    def create_cookie_stickiness_policy(self, cookie_expiration_period, policy_name):\n        return self.connection.create_lb_cookie_stickiness_policy(cookie_expiration_period, self.name, policy_name)\n\n    def create_app_cookie_stickiness_policy(self, name, policy_name):\n        return self.connection.create_app_cookie_stickiness_policy(name, self.name, policy_name)\n\n    def set_listener_SSL_certificate(self, lb_port, ssl_certificate_id):\n        return self.connection.set_lb_listener_SSL_certificate(self.name, lb_port, ssl_certificate_id)\n\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/ec2/elb/policies.py",
    "content": "# Copyright (c) 2010 Reza Lotun http://reza.lotun.name\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nfrom boto.resultset import ResultSet\n\n\nclass AppCookieStickinessPolicy(object):\n    def __init__(self, connection=None):\n        self.cookie_name = None\n        self.policy_name = None\n\n    def __repr__(self):\n        return 'AppCookieStickiness(%s, %s)' % (self.policy_name,\n                                                self.cookie_name)\n\n    def startElement(self, name, attrs, connection):\n        pass\n\n    def endElement(self, name, value, connection):\n        if name == 'CookieName':\n            self.cookie_name = value\n        elif name == 'PolicyName':\n            self.policy_name = value\n\n\nclass LBCookieStickinessPolicy(object):\n    def __init__(self, connection=None):\n        self.policy_name = None\n        self.cookie_expiration_period = None\n\n    def __repr__(self):\n        return 'LBCookieStickiness(%s, %s)' % (self.policy_name,\n                                               self.cookie_expiration_period)\n\n    def startElement(self, name, attrs, connection):\n        pass\n\n    def endElement(self, name, value, connection):\n        if name == 'CookieExpirationPeriod':\n            self.cookie_expiration_period = value\n        elif name == 'PolicyName':\n            self.policy_name = value\n\n\nclass Policies(object):\n    \"\"\"\n    ELB Policies\n    \"\"\"\n    def __init__(self, connection=None):\n        self.connection = connection\n        self.app_cookie_stickiness_policies = None\n        self.lb_cookie_stickiness_policies = None\n\n    def __repr__(self):\n        app = 'AppCookieStickiness%s' % self.app_cookie_stickiness_policies\n        lb = 'LBCookieStickiness%s' % self.lb_cookie_stickiness_policies\n        return 'Policies(%s,%s)' % (app, lb)\n\n    def startElement(self, name, attrs, connection):\n        if name == 'AppCookieStickinessPolicies':\n            rs = ResultSet([('member', AppCookieStickinessPolicy)])\n            self.app_cookie_stickiness_policies = rs\n        elif name == 'LBCookieStickinessPolicies':\n            rs = ResultSet([('member', LBCookieStickinessPolicy)])\n            self.lb_cookie_stickiness_policies = rs\n\n    def endElement(self, name, value, connection):\n        return\n\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/ec2/elb/securitygroup.py",
    "content": "# Copyright (c) 2010 Reza Lotun http://reza.lotun.name\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nclass SecurityGroup(object):\n    def __init__(self, connection=None):\n        self.name = None\n        self.owner_alias = None\n\n    def __repr__(self):\n        return 'SecurityGroup(%s, %s)' % (self.name, self.owner_alias)\n\n    def startElement(self, name, attrs, connection):\n        pass\n\n    def endElement(self, name, value, connection):\n        if name == 'GroupName':\n            self.name = value\n        elif name == 'OwnerAlias':\n            self.owner_alias = value\n\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/ec2/image.py",
    "content": "# Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/\n# Copyright (c) 2010, Eucalyptus Systems, Inc.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nfrom boto.ec2.ec2object import EC2Object, TaggedEC2Object\nfrom boto.ec2.blockdevicemapping import BlockDeviceMapping\n\nclass ProductCodes(list):\n\n    def startElement(self, name, attrs, connection):\n        pass\n\n    def endElement(self, name, value, connection):\n        if name == 'productCode':\n            self.append(value)\n    \nclass Image(TaggedEC2Object):\n    \"\"\"\n    Represents an EC2 Image\n    \"\"\"\n    \n    def __init__(self, connection=None):\n        TaggedEC2Object.__init__(self, connection)\n        self.id = None\n        self.location = None\n        self.state = None\n        self.ownerId = None  # for backwards compatibility\n        self.owner_id = None\n        self.owner_alias = None\n        self.is_public = False\n        self.architecture = None\n        self.platform = None\n        self.type = None\n        self.kernel_id = None\n        self.ramdisk_id = None\n        self.name = None\n        self.description = None\n        self.product_codes = ProductCodes()\n        self.block_device_mapping = None\n        self.root_device_type = None\n        self.root_device_name = None\n        self.virtualization_type = None\n        self.hypervisor = None\n        self.instance_lifecycle = None\n\n    def __repr__(self):\n        return 'Image:%s' % self.id\n\n    def startElement(self, name, attrs, connection):\n        retval = TaggedEC2Object.startElement(self, name, attrs, connection)\n        if retval is not None:\n            return retval\n        if name == 'blockDeviceMapping':\n            self.block_device_mapping = BlockDeviceMapping()\n            return self.block_device_mapping\n        elif name == 'productCodes':\n            return self.product_codes\n        else:\n            return None\n\n    def endElement(self, name, value, connection):\n        if name == 'imageId':\n            self.id = value\n        elif name == 'imageLocation':\n            self.location = value\n        elif name == 'imageState':\n            self.state = value\n        elif name == 'imageOwnerId':\n            self.ownerId = value # for backwards compatibility\n            self.owner_id = value\n        elif name == 'isPublic':\n            if value == 'false':\n                self.is_public = False\n            elif value == 'true':\n                self.is_public = True\n            else:\n                raise Exception(\n                    'Unexpected value of isPublic %s for image %s'%(\n                        value, \n                        self.id\n                    )\n                )\n        elif name == 'architecture':\n            self.architecture = value\n        elif name == 'imageType':\n            self.type = value\n        elif name == 'kernelId':\n            self.kernel_id = value\n        elif name == 'ramdiskId':\n            self.ramdisk_id = value\n        elif name == 'imageOwnerAlias':\n            self.owner_alias = value\n        elif name == 'platform':\n            self.platform = value\n        elif name == 'name':\n            self.name = value\n        elif name == 'description':\n            self.description = value\n        elif name == 'rootDeviceType':\n            self.root_device_type = value\n        elif name == 'rootDeviceName':\n            self.root_device_name = value\n        elif name == 'virtualizationType':\n            self.virtualization_type = value\n        elif name == 'hypervisor':\n            self.hypervisor = value\n        elif name == 'instanceLifecycle':\n            self.instance_lifecycle = value\n        else:\n            setattr(self, name, value)\n\n    def _update(self, updated):\n        self.__dict__.update(updated.__dict__)\n\n    def update(self, validate=False):\n        \"\"\"\n        Update the image's state information by making a call to fetch\n        the current image attributes from the service.\n\n        :type validate: bool\n        :param validate: By default, if EC2 returns no data about the\n                         image the update method returns quietly.  If\n                         the validate param is True, however, it will\n                         raise a ValueError exception if no data is\n                         returned from EC2.\n        \"\"\"\n        rs = self.connection.get_all_images([self.id])\n        if len(rs) > 0:\n            img = rs[0]\n            if img.id == self.id:\n                self._update(img)\n        elif validate:\n            raise ValueError('%s is not a valid Image ID' % self.id)\n        return self.state\n\n    def run(self, min_count=1, max_count=1, key_name=None, \n            security_groups=None, user_data=None,\n            addressing_type=None, instance_type='m1.small', placement=None,\n            kernel_id=None, ramdisk_id=None,\n            monitoring_enabled=False, subnet_id=None,\n            block_device_map=None,\n            disable_api_termination=False,\n            instance_initiated_shutdown_behavior=None,\n            private_ip_address=None,\n            placement_group=None, security_group_ids=None):\n        \"\"\"\n        Runs this instance.\n        \n        :type min_count: int\n        :param min_count: The minimum number of instances to start\n        \n        :type max_count: int\n        :param max_count: The maximum number of instances to start\n        \n        :type key_name: string\n        :param key_name: The name of the keypair to run this instance with.\n        \n        :type security_groups: \n        :param security_groups:\n        \n        :type user_data: \n        :param user_data:\n        \n        :type addressing_type: \n        :param daddressing_type:\n        \n        :type instance_type: string\n        :param instance_type: The type of instance to run.  Current choices are:\n                              m1.small | m1.large | m1.xlarge | c1.medium |\n                              c1.xlarge | m2.xlarge | m2.2xlarge |\n                              m2.4xlarge | cc1.4xlarge\n        \n        :type placement: string\n        :param placement: The availability zone in which to launch the instances\n\n        :type kernel_id: string\n        :param kernel_id: The ID of the kernel with which to launch the instances\n        \n        :type ramdisk_id: string\n        :param ramdisk_id: The ID of the RAM disk with which to launch the instances\n        \n        :type monitoring_enabled: bool\n        :param monitoring_enabled: Enable CloudWatch monitoring on the instance.\n        \n        :type subnet_id: string\n        :param subnet_id: The subnet ID within which to launch the instances for VPC.\n        \n        :type private_ip_address: string\n        :param private_ip_address: If you're using VPC, you can optionally use\n                                   this parameter to assign the instance a\n                                   specific available IP address from the\n                                   subnet (e.g., 10.0.0.25).\n\n        :type block_device_map: :class:`boto.ec2.blockdevicemapping.BlockDeviceMapping`\n        :param block_device_map: A BlockDeviceMapping data structure\n                                 describing the EBS volumes associated\n                                 with the Image.\n\n        :type disable_api_termination: bool\n        :param disable_api_termination: If True, the instances will be locked\n                                        and will not be able to be terminated\n                                        via the API.\n\n        :type instance_initiated_shutdown_behavior: string\n        :param instance_initiated_shutdown_behavior: Specifies whether the instance\n                                                     stops or terminates on instance-initiated\n                                                     shutdown. Valid values are:\n                                                     stop | terminate\n\n        :type placement_group: string\n        :param placement_group: If specified, this is the name of the placement\n                                group in which the instance(s) will be launched.\n\n        :rtype: Reservation\n        :return: The :class:`boto.ec2.instance.Reservation` associated with the request for machines\n\n        :type security_group_ids: \n        :param security_group_ids:\n        \"\"\"\n\n        return self.connection.run_instances(self.id, min_count, max_count,\n                                             key_name, security_groups,\n                                             user_data, addressing_type,\n                                             instance_type, placement,\n                                             kernel_id, ramdisk_id,\n                                             monitoring_enabled, subnet_id,\n                                             block_device_map, disable_api_termination,\n                                             instance_initiated_shutdown_behavior,\n                                             private_ip_address, placement_group, \n                                             security_group_ids=security_group_ids)\n\n    def deregister(self, delete_snapshot=False):\n        return self.connection.deregister_image(self.id, delete_snapshot)\n\n    def get_launch_permissions(self):\n        img_attrs = self.connection.get_image_attribute(self.id,\n                                                        'launchPermission')\n        return img_attrs.attrs\n\n    def set_launch_permissions(self, user_ids=None, group_names=None):\n        return self.connection.modify_image_attribute(self.id,\n                                                      'launchPermission',\n                                                      'add',\n                                                      user_ids,\n                                                      group_names)\n\n    def remove_launch_permissions(self, user_ids=None, group_names=None):\n        return self.connection.modify_image_attribute(self.id,\n                                                      'launchPermission',\n                                                      'remove',\n                                                      user_ids,\n                                                      group_names)\n\n    def reset_launch_attributes(self):\n        return self.connection.reset_image_attribute(self.id,\n                                                     'launchPermission')\n\n    def get_kernel(self):\n        img_attrs =self.connection.get_image_attribute(self.id, 'kernel')\n        return img_attrs.kernel\n\n    def get_ramdisk(self):\n        img_attrs = self.connection.get_image_attribute(self.id, 'ramdisk')\n        return img_attrs.ramdisk\n\nclass ImageAttribute:\n\n    def __init__(self, parent=None):\n        self.name = None\n        self.kernel = None\n        self.ramdisk = None\n        self.attrs = {}\n\n    def startElement(self, name, attrs, connection):\n        if name == 'blockDeviceMapping':\n            self.attrs['block_device_mapping'] = BlockDeviceMapping()\n            return self.attrs['block_device_mapping']\n        else:\n            return None\n\n    def endElement(self, name, value, connection):\n        if name == 'launchPermission':\n            self.name = 'launch_permission'\n        elif name == 'group':\n            if self.attrs.has_key('groups'):\n                self.attrs['groups'].append(value)\n            else:\n                self.attrs['groups'] = [value]\n        elif name == 'userId':\n            if self.attrs.has_key('user_ids'):\n                self.attrs['user_ids'].append(value)\n            else:\n                self.attrs['user_ids'] = [value]\n        elif name == 'productCode':\n            if self.attrs.has_key('product_codes'):\n                self.attrs['product_codes'].append(value)\n            else:\n                self.attrs['product_codes'] = [value]\n        elif name == 'imageId':\n            self.image_id = value\n        elif name == 'kernel':\n            self.kernel = value\n        elif name == 'ramdisk':\n            self.ramdisk = value\n        else:\n            setattr(self, name, value)\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/ec2/instance.py",
    "content": "# Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/\n# Copyright (c) 2010, Eucalyptus Systems, Inc.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\n\"\"\"\nRepresents an EC2 Instance\n\"\"\"\nimport boto\nfrom boto.ec2.ec2object import EC2Object, TaggedEC2Object\nfrom boto.resultset import ResultSet\nfrom boto.ec2.address import Address\nfrom boto.ec2.blockdevicemapping import BlockDeviceMapping\nfrom boto.ec2.image import ProductCodes\nimport base64\n\nclass Reservation(EC2Object):\n    \"\"\"\n    Represents a Reservation response object.\n\n    :ivar id: The unique ID of the Reservation.\n    :ivar owner_id: The unique ID of the owner of the Reservation.\n    :ivar groups: A list of Group objects representing the security\n                  groups associated with launched instances.\n    :ivar instances: A list of Instance objects launched in this\n                     Reservation.\n    \"\"\"\n    \n    def __init__(self, connection=None):\n        EC2Object.__init__(self, connection)\n        self.id = None\n        self.owner_id = None\n        self.groups = []\n        self.instances = []\n\n    def __repr__(self):\n        return 'Reservation:%s' % self.id\n\n    def startElement(self, name, attrs, connection):\n        if name == 'instancesSet':\n            self.instances = ResultSet([('item', Instance)])\n            return self.instances\n        elif name == 'groupSet':\n            self.groups = ResultSet([('item', Group)])\n            return self.groups\n        else:\n            return None\n\n    def endElement(self, name, value, connection):\n        if name == 'reservationId':\n            self.id = value\n        elif name == 'ownerId':\n            self.owner_id = value\n        else:\n            setattr(self, name, value)\n\n    def stop_all(self):\n        for instance in self.instances:\n            instance.stop()\n            \nclass Instance(TaggedEC2Object):\n    \n    def __init__(self, connection=None):\n        TaggedEC2Object.__init__(self, connection)\n        self.id = None\n        self.dns_name = None\n        self.public_dns_name = None\n        self.private_dns_name = None\n        self.state = None\n        self.state_code = None\n        self.key_name = None\n        self.shutdown_state = None\n        self.previous_state = None\n        self.instance_type = None\n        self.instance_class = None\n        self.launch_time = None\n        self.image_id = None\n        self.placement = None\n        self.kernel = None\n        self.ramdisk = None\n        self.product_codes = ProductCodes()\n        self.ami_launch_index = None\n        self.monitored = False\n        self.instance_class = None\n        self.spot_instance_request_id = None\n        self.subnet_id = None\n        self.vpc_id = None\n        self.private_ip_address = None\n        self.ip_address = None\n        self.requester_id = None\n        self._in_monitoring_element = False\n        self.persistent = False\n        self.root_device_name = None\n        self.root_device_type = None\n        self.block_device_mapping = None\n        self.state_reason = None\n        self.group_name = None\n        self.client_token = None\n        self.groups = []\n\n    def __repr__(self):\n        return 'Instance:%s' % self.id\n\n    def startElement(self, name, attrs, connection):\n        retval = TaggedEC2Object.startElement(self, name, attrs, connection)\n        if retval is not None:\n            return retval\n        if name == 'monitoring':\n            self._in_monitoring_element = True\n        elif name == 'blockDeviceMapping':\n            self.block_device_mapping = BlockDeviceMapping()\n            return self.block_device_mapping\n        elif name == 'productCodes':\n            return self.product_codes\n        elif name == 'stateReason':\n            self.state_reason = StateReason()\n            return self.state_reason\n        elif name == 'groupSet':\n            self.groups = ResultSet([('item', Group)])\n            return self.groups\n        return None\n\n    def endElement(self, name, value, connection):\n        if name == 'instanceId':\n            self.id = value\n        elif name == 'imageId':\n            self.image_id = value\n        elif name == 'dnsName' or name == 'publicDnsName':\n            self.dns_name = value           # backwards compatibility\n            self.public_dns_name = value\n        elif name == 'privateDnsName':\n            self.private_dns_name = value\n        elif name == 'keyName':\n            self.key_name = value\n        elif name == 'amiLaunchIndex':\n            self.ami_launch_index = value\n        elif name == 'shutdownState':\n            self.shutdown_state = value\n        elif name == 'previousState':\n            self.previous_state = value\n        elif name == 'name':\n            self.state = value\n        elif name == 'code':\n            try:\n                self.state_code = int(value)\n            except ValueError:\n                boto.log.warning('Error converting code (%s) to int' % value)\n                self.state_code = value\n        elif name == 'instanceType':\n            self.instance_type = value\n        elif name == 'instanceClass':\n            self.instance_class = value\n        elif name == 'rootDeviceName':\n            self.root_device_name = value\n        elif name == 'rootDeviceType':\n            self.root_device_type = value\n        elif name == 'launchTime':\n            self.launch_time = value\n        elif name == 'availabilityZone':\n            self.placement = value\n        elif name == 'placement':\n            pass\n        elif name == 'kernelId':\n            self.kernel = value\n        elif name == 'ramdiskId':\n            self.ramdisk = value\n        elif name == 'state':\n            if self._in_monitoring_element:\n                if value == 'enabled':\n                    self.monitored = True\n                self._in_monitoring_element = False\n        elif name == 'instanceClass':\n            self.instance_class = value\n        elif name == 'spotInstanceRequestId':\n            self.spot_instance_request_id = value\n        elif name == 'subnetId':\n            self.subnet_id = value\n        elif name == 'vpcId':\n            self.vpc_id = value\n        elif name == 'privateIpAddress':\n            self.private_ip_address = value\n        elif name == 'ipAddress':\n            self.ip_address = value\n        elif name == 'requesterId':\n            self.requester_id = value\n        elif name == 'persistent':\n            if value == 'true':\n                self.persistent = True\n            else:\n                self.persistent = False\n        elif name == 'groupName':\n            if self._in_monitoring_element:\n                self.group_name = value\n        elif name == 'clientToken':\n            self.client_token = value\n        else:\n            setattr(self, name, value)\n\n    def _update(self, updated):\n        self.__dict__.update(updated.__dict__)\n\n    def update(self, validate=False):\n        \"\"\"\n        Update the instance's state information by making a call to fetch\n        the current instance attributes from the service.\n\n        :type validate: bool\n        :param validate: By default, if EC2 returns no data about the\n                         instance the update method returns quietly.  If\n                         the validate param is True, however, it will\n                         raise a ValueError exception if no data is\n                         returned from EC2.\n        \"\"\"\n        rs = self.connection.get_all_instances([self.id])\n        if len(rs) > 0:\n            r = rs[0]\n            for i in r.instances:\n                if i.id == self.id:\n                    self._update(i)\n        elif validate:\n            raise ValueError('%s is not a valid Instance ID' % self.id)\n        return self.state\n\n    def terminate(self):\n        \"\"\"\n        Terminate the instance\n        \"\"\"\n        rs = self.connection.terminate_instances([self.id])\n        if len(rs) > 0:\n            self._update(rs[0])\n\n    def stop(self, force=False):\n        \"\"\"\n        Stop the instance\n\n        :type force: bool\n        :param force: Forces the instance to stop\n        \n        :rtype: list\n        :return: A list of the instances stopped\n        \"\"\"\n        rs = self.connection.stop_instances([self.id])\n        if len(rs) > 0:\n            self._update(rs[0])\n\n    def start(self):\n        \"\"\"\n        Start the instance.\n        \"\"\"\n        rs = self.connection.start_instances([self.id])\n        if len(rs) > 0:\n            self._update(rs[0])\n\n    def reboot(self):\n        return self.connection.reboot_instances([self.id])\n\n    def get_console_output(self):\n        \"\"\"\n        Retrieves the console output for the instance.\n\n        :rtype: :class:`boto.ec2.instance.ConsoleOutput`\n        :return: The console output as a ConsoleOutput object\n        \"\"\"\n        return self.connection.get_console_output(self.id)\n\n    def confirm_product(self, product_code):\n        return self.connection.confirm_product_instance(self.id, product_code)\n\n    def use_ip(self, ip_address):\n        if isinstance(ip_address, Address):\n            ip_address = ip_address.public_ip\n        return self.connection.associate_address(self.id, ip_address)\n\n    def monitor(self):\n        return self.connection.monitor_instance(self.id)\n\n    def unmonitor(self):\n        return self.connection.unmonitor_instance(self.id)\n\n    def get_attribute(self, attribute):\n        \"\"\"\n        Gets an attribute from this instance.\n\n        :type attribute: string\n        :param attribute: The attribute you need information about\n                          Valid choices are:\n                          instanceType|kernel|ramdisk|userData|\n                          disableApiTermination|\n                          instanceInitiatedShutdownBehavior|\n                          rootDeviceName|blockDeviceMapping\n\n        :rtype: :class:`boto.ec2.image.InstanceAttribute`\n        :return: An InstanceAttribute object representing the value of the\n                 attribute requested\n        \"\"\"\n        return self.connection.get_instance_attribute(self.id, attribute)\n\n    def modify_attribute(self, attribute, value):\n        \"\"\"\n        Changes an attribute of this instance\n\n        :type attribute: string\n        :param attribute: The attribute you wish to change.\n                          AttributeName - Expected value (default)\n                          instanceType - A valid instance type (m1.small)\n                          kernel - Kernel ID (None)\n                          ramdisk - Ramdisk ID (None)\n                          userData - Base64 encoded String (None)\n                          disableApiTermination - Boolean (true)\n                          instanceInitiatedShutdownBehavior - stop|terminate\n                          rootDeviceName - device name (None)\n\n        :type value: string\n        :param value: The new value for the attribute\n\n        :rtype: bool\n        :return: Whether the operation succeeded or not\n        \"\"\"\n        return self.connection.modify_instance_attribute(self.id, attribute,\n                                                         value)\n\n    def reset_attribute(self, attribute):\n        \"\"\"\n        Resets an attribute of this instance to its default value.\n\n        :type attribute: string\n        :param attribute: The attribute to reset. Valid values are:\n                          kernel|ramdisk\n\n        :rtype: bool\n        :return: Whether the operation succeeded or not\n        \"\"\"\n        return self.connection.reset_instance_attribute(self.id, attribute)\n\nclass Group:\n\n    def __init__(self, parent=None):\n        self.id = None\n        self.name = None\n\n    def startElement(self, name, attrs, connection):\n        return None\n\n    def endElement(self, name, value, connection):\n        if name == 'groupId':\n            self.id = value\n        elif name == 'groupName':\n            self.name = value\n        else:\n            setattr(self, name, value)\n    \nclass ConsoleOutput:\n\n    def __init__(self, parent=None):\n        self.parent = parent\n        self.instance_id = None\n        self.timestamp = None\n        self.output = None\n\n    def startElement(self, name, attrs, connection):\n        return None\n\n    def endElement(self, name, value, connection):\n        if name == 'instanceId':\n            self.instance_id = value\n        elif name == 'timestamp':\n            self.timestamp = value\n        elif name == 'output':\n            self.output = base64.b64decode(value)\n        else:\n            setattr(self, name, value)\n\nclass InstanceAttribute(dict):\n\n    ValidValues = ['instanceType', 'kernel', 'ramdisk', 'userData',\n                   'disableApiTermination', 'instanceInitiatedShutdownBehavior',\n                   'rootDeviceName', 'blockDeviceMapping', 'sourceDestCheck',\n                   'groupSet']\n\n    def __init__(self, parent=None):\n        dict.__init__(self)\n        self.instance_id = None\n        self.request_id = None\n        self._current_value = None\n\n    def startElement(self, name, attrs, connection):\n        if name == 'blockDeviceMapping':\n            self[name] = BlockDeviceMapping()\n            return self[name]\n        elif name == 'groupSet':\n            self[name] = ResultSet([('item', Group)])\n            return self[name]\n        else:\n            return None\n\n    def endElement(self, name, value, connection):\n        if name == 'instanceId':\n            self.instance_id = value\n        elif name == 'requestId':\n            self.request_id = value\n        elif name == 'value':\n            self._current_value = value\n        elif name in self.ValidValues:\n            self[name] = self._current_value\n\nclass StateReason(dict):\n\n    def __init__(self, parent=None):\n        dict.__init__(self)\n\n    def startElement(self, name, attrs, connection):\n        return None\n\n    def endElement(self, name, value, connection):\n        if name != 'stateReason':\n            self[name] = value\n            \n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/ec2/instanceinfo.py",
    "content": "# Copyright (c) 2006-2008 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nclass InstanceInfo(object):\n    \"\"\"\n    Represents an EC2 Instance status response from CloudWatch\n    \"\"\"\n    \n    def __init__(self, connection=None, id=None, state=None):\n        self.connection = connection\n        self.id = id\n        self.state = state\n\n    def __repr__(self):\n        return 'InstanceInfo:%s' % self.id\n\n    def startElement(self, name, attrs, connection):\n        return None\n\n    def endElement(self, name, value, connection):\n        if name == 'instanceId' or name == 'InstanceId':\n            self.id = value\n        elif name == 'state':\n            self.state = value\n        else:\n            setattr(self, name, value)\n\n            \n\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/ec2/keypair.py",
    "content": "# Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\n\"\"\"\nRepresents an EC2 Keypair\n\"\"\"\n\nimport os\nfrom boto.ec2.ec2object import EC2Object\nfrom boto.exception import BotoClientError\n\nclass KeyPair(EC2Object):\n    \n    def __init__(self, connection=None):\n        EC2Object.__init__(self, connection)\n        self.name = None\n        self.fingerprint = None\n        self.material = None\n\n    def __repr__(self):\n        return 'KeyPair:%s' % self.name\n\n    def endElement(self, name, value, connection):\n        if name == 'keyName':\n            self.name = value\n        elif name == 'keyFingerprint':\n            self.fingerprint = value\n        elif name == 'keyMaterial':\n            self.material = value\n        else:\n            setattr(self, name, value)\n\n    def delete(self):\n        \"\"\"\n        Delete the KeyPair.\n        \n        :rtype: bool\n        :return: True if successful, otherwise False.\n        \"\"\"\n        return self.connection.delete_key_pair(self.name)\n\n    def save(self, directory_path):\n        \"\"\"\n        Save the material (the unencrypted PEM encoded RSA private key)\n        of a newly created KeyPair to a local file.\n        \n        :type directory_path: string\n        :param directory_path: The fully qualified path to the directory\n                               in which the keypair will be saved.  The\n                               keypair file will be named using the name\n                               of the keypair as the base name and .pem\n                               for the file extension.  If a file of that\n                               name already exists in the directory, an\n                               exception will be raised and the old file\n                               will not be overwritten.\n        \n        :rtype: bool\n        :return: True if successful.\n        \"\"\"\n        if self.material:\n            directory_path = os.path.expanduser(directory_path)\n            file_path = os.path.join(directory_path, '%s.pem' % self.name)\n            if os.path.exists(file_path):\n                raise BotoClientError('%s already exists, it will not be overwritten' % file_path)\n            fp = open(file_path, 'wb')\n            fp.write(self.material)\n            fp.close()\n            os.chmod(file_path, 0600)\n            return True\n        else:\n            raise BotoClientError('KeyPair contains no material')\n\n    def copy_to_region(self, region):\n        \"\"\"\n        Create a new key pair of the same new in another region.\n        Note that the new key pair will use a different ssh\n        cert than the this key pair.  After doing the copy,\n        you will need to save the material associated with the\n        new key pair (use the save method) to a local file.\n\n        :type region: :class:`boto.ec2.regioninfo.RegionInfo`\n        :param region: The region to which this security group will be copied.\n\n        :rtype: :class:`boto.ec2.keypair.KeyPair`\n        :return: The new key pair\n        \"\"\"\n        if region.name == self.region:\n            raise BotoClientError('Unable to copy to the same Region')\n        conn_params = self.connection.get_params()\n        rconn = region.connect(**conn_params)\n        kp = rconn.create_key_pair(self.name)\n        return kp\n\n\n\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/ec2/launchspecification.py",
    "content": "# Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\n\"\"\"\nRepresents a launch specification for Spot instances.\n\"\"\"\n\nfrom boto.ec2.ec2object import EC2Object\nfrom boto.resultset import ResultSet\nfrom boto.ec2.blockdevicemapping import BlockDeviceMapping\nfrom boto.ec2.instance import Group\n\nclass GroupList(list):\n\n    def startElement(self, name, attrs, connection):\n        pass\n\n    def endElement(self, name, value, connection):\n        if name == 'groupId':\n            self.append(value)\n            \nclass LaunchSpecification(EC2Object):\n    \n    def __init__(self, connection=None):\n        EC2Object.__init__(self, connection)\n        self.key_name = None\n        self.instance_type = None\n        self.image_id = None\n        self.groups = []\n        self.placement = None\n        self.kernel = None\n        self.ramdisk = None\n        self.monitored = False\n        self.subnet_id = None\n        self._in_monitoring_element = False\n        self.block_device_mapping = None\n\n    def __repr__(self):\n        return 'LaunchSpecification(%s)' % self.image_id\n\n    def startElement(self, name, attrs, connection):\n        if name == 'groupSet':\n            self.groups = ResultSet([('item', Group)])\n            return self.groups\n        elif name == 'monitoring':\n            self._in_monitoring_element = True\n        elif name == 'blockDeviceMapping':\n            self.block_device_mapping = BlockDeviceMapping()\n            return self.block_device_mapping\n        else:\n            return None\n\n    def endElement(self, name, value, connection):\n        if name == 'imageId':\n            self.image_id = value\n        elif name == 'keyName':\n            self.key_name = value\n        elif name == 'instanceType':\n            self.instance_type = value\n        elif name == 'availabilityZone':\n            self.placement = value\n        elif name == 'placement':\n            pass\n        elif name == 'kernelId':\n            self.kernel = value\n        elif name == 'ramdiskId':\n            self.ramdisk = value\n        elif name == 'subnetId':\n            self.subnet_id = value\n        elif name == 'state':\n            if self._in_monitoring_element:\n                if value == 'enabled':\n                    self.monitored = True\n                self._in_monitoring_element = False\n        else:\n            setattr(self, name, value)\n\n\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/ec2/placementgroup.py",
    "content": "# Copyright (c) 2010 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\"\"\"\nRepresents an EC2 Placement Group\n\"\"\"\nfrom boto.ec2.ec2object import EC2Object\nfrom boto.exception import BotoClientError\n\nclass PlacementGroup(EC2Object):\n    \n    def __init__(self, connection=None, name=None, strategy=None, state=None):\n        EC2Object.__init__(self, connection)\n        self.name = name\n        self.strategy = strategy\n        self.state = state\n\n    def __repr__(self):\n        return 'PlacementGroup:%s' % self.name\n\n    def endElement(self, name, value, connection):\n        if name == 'groupName':\n            self.name = value\n        elif name == 'strategy':\n            self.strategy = value\n        elif name == 'state':\n            self.state = value\n        else:\n            setattr(self, name, value)\n\n    def delete(self):\n        return self.connection.delete_placement_group(self.name)\n\n\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/ec2/regioninfo.py",
    "content": "# Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/\n# Copyright (c) 2010, Eucalyptus Systems, Inc.\n# All rights reserved.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nfrom boto.regioninfo import RegionInfo\n\nclass EC2RegionInfo(RegionInfo):\n    \"\"\"\n    Represents an EC2 Region\n    \"\"\"\n    \n    def __init__(self, connection=None, name=None, endpoint=None):\n        from boto.ec2.connection import EC2Connection\n        RegionInfo.__init__(self, connection, name, endpoint,\n                            EC2Connection)\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/ec2/reservedinstance.py",
    "content": "# Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nfrom boto.ec2.ec2object import EC2Object\n\nclass ReservedInstancesOffering(EC2Object):\n    \n    def __init__(self, connection=None, id=None, instance_type=None,\n                 availability_zone=None, duration=None, fixed_price=None,\n                 usage_price=None, description=None):\n        EC2Object.__init__(self, connection)\n        self.id = id\n        self.instance_type = instance_type\n        self.availability_zone = availability_zone\n        self.duration = duration\n        self.fixed_price = fixed_price\n        self.usage_price = usage_price\n        self.description = description\n\n    def __repr__(self):\n        return 'ReservedInstanceOffering:%s' % self.id\n\n    def startElement(self, name, attrs, connection):\n        return None\n\n    def endElement(self, name, value, connection):\n        if name == 'reservedInstancesOfferingId':\n            self.id = value\n        elif name == 'instanceType':\n            self.instance_type = value\n        elif name == 'availabilityZone':\n            self.availability_zone = value\n        elif name == 'duration':\n            self.duration = value\n        elif name == 'fixedPrice':\n            self.fixed_price = value\n        elif name == 'usagePrice':\n            self.usage_price = value\n        elif name == 'productDescription':\n            self.description = value\n        else:\n            setattr(self, name, value)\n\n    def describe(self):\n        print 'ID=%s' % self.id\n        print '\\tInstance Type=%s' % self.instance_type\n        print '\\tZone=%s' % self.availability_zone\n        print '\\tDuration=%s' % self.duration\n        print '\\tFixed Price=%s' % self.fixed_price\n        print '\\tUsage Price=%s' % self.usage_price\n        print '\\tDescription=%s' % self.description\n\n    def purchase(self, instance_count=1):\n        return self.connection.purchase_reserved_instance_offering(self.id, instance_count)\n\nclass ReservedInstance(ReservedInstancesOffering):\n\n    def __init__(self, connection=None, id=None, instance_type=None,\n                 availability_zone=None, duration=None, fixed_price=None,\n                 usage_price=None, description=None,\n                 instance_count=None, state=None):\n        ReservedInstancesOffering.__init__(self, connection, id, instance_type,\n                                           availability_zone, duration, fixed_price,\n                                           usage_price, description)\n        self.instance_count = instance_count\n        self.state = state\n\n    def __repr__(self):\n        return 'ReservedInstance:%s' % self.id\n\n    def endElement(self, name, value, connection):\n        if name == 'reservedInstancesId':\n            self.id = value\n        if name == 'instanceCount':\n            self.instance_count = int(value)\n        elif name == 'state':\n            self.state = value\n        else:\n            ReservedInstancesOffering.endElement(self, name, value, connection)\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/ec2/securitygroup.py",
    "content": "# Copyright (c) 2006-2011 Mitch Garnaat http://garnaat.org/\n# Copyright (c) 2011, Eucalyptus Systems, Inc.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\n\"\"\"\nRepresents an EC2 Security Group\n\"\"\"\nfrom boto.ec2.ec2object import TaggedEC2Object\nfrom boto.exception import BotoClientError\n\nclass SecurityGroup(TaggedEC2Object):\n    \n    def __init__(self, connection=None, owner_id=None,\n                 name=None, description=None, id=None):\n        TaggedEC2Object.__init__(self, connection)\n        self.id = id\n        self.owner_id = owner_id\n        self.name = name\n        self.description = description\n        self.vpc_id = None\n        self.rules = IPPermissionsList()\n        self.rules_egress = IPPermissionsList()\n\n    def __repr__(self):\n        return 'SecurityGroup:%s' % self.name\n\n    def startElement(self, name, attrs, connection):\n        retval = TaggedEC2Object.startElement(self, name, attrs, connection)\n        if retval is not None:\n            return retval\n        if name == 'ipPermissions':\n            return self.rules\n        elif name == 'ipPermissionsEgress':\n            return self.rules_egress\n        else:\n            return None\n\n    def endElement(self, name, value, connection):\n        if name == 'ownerId':\n            self.owner_id = value\n        elif name == 'groupId':\n            self.id = value\n        elif name == 'groupName':\n            self.name = value\n        elif name == 'vpcId':\n            self.vpc_id = value\n        elif name == 'groupDescription':\n            self.description = value\n        elif name == 'ipRanges':\n            pass\n        elif name == 'return':\n            if value == 'false':\n                self.status = False\n            elif value == 'true':\n                self.status = True\n            else:\n                raise Exception(\n                    'Unexpected value of status %s for group %s'%(\n                        value, \n                        self.name\n                    )\n                )\n        else:\n            setattr(self, name, value)\n\n    def delete(self):\n        return self.connection.delete_security_group(self.name)\n\n    def add_rule(self, ip_protocol, from_port, to_port,\n                 src_group_name, src_group_owner_id, cidr_ip):\n        \"\"\"\n        Add a rule to the SecurityGroup object.  Note that this method\n        only changes the local version of the object.  No information\n        is sent to EC2.\n        \"\"\"\n        rule = IPPermissions(self)\n        rule.ip_protocol = ip_protocol\n        rule.from_port = from_port\n        rule.to_port = to_port\n        self.rules.append(rule)\n        rule.add_grant(src_group_name, src_group_owner_id, cidr_ip)\n\n    def remove_rule(self, ip_protocol, from_port, to_port,\n                    src_group_name, src_group_owner_id, cidr_ip):\n        \"\"\"\n        Remove a rule to the SecurityGroup object.  Note that this method\n        only changes the local version of the object.  No information\n        is sent to EC2.\n        \"\"\"\n        target_rule = None\n        for rule in self.rules:\n            if rule.ip_protocol == ip_protocol:\n                if rule.from_port == from_port:\n                    if rule.to_port == to_port:\n                        target_rule = rule\n                        target_grant = None\n                        for grant in rule.grants:\n                            if grant.name == src_group_name:\n                                if grant.owner_id == src_group_owner_id:\n                                    if grant.cidr_ip == cidr_ip:\n                                        target_grant = grant\n                        if target_grant:\n                            rule.grants.remove(target_grant)\n        if len(rule.grants) == 0:\n            self.rules.remove(target_rule)\n\n    def authorize(self, ip_protocol=None, from_port=None, to_port=None,\n                  cidr_ip=None, src_group=None):\n        \"\"\"\n        Add a new rule to this security group.\n        You need to pass in either src_group_name\n        OR ip_protocol, from_port, to_port,\n        and cidr_ip.  In other words, either you are authorizing another\n        group or you are authorizing some ip-based rule.\n        \n        :type ip_protocol: string\n        :param ip_protocol: Either tcp | udp | icmp\n\n        :type from_port: int\n        :param from_port: The beginning port number you are enabling\n\n        :type to_port: int\n        :param to_port: The ending port number you are enabling\n\n        :type cidr_ip: string\n        :param cidr_ip: The CIDR block you are providing access to.\n                        See http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing\n\n        :type src_group: :class:`boto.ec2.securitygroup.SecurityGroup` or\n                         :class:`boto.ec2.securitygroup.GroupOrCIDR`\n        :param src_group: The Security Group you are granting access to.\n                         \n        :rtype: bool\n        :return: True if successful.\n        \"\"\"\n        if src_group:\n            cidr_ip = None\n            src_group_name = src_group.name\n            src_group_owner_id = src_group.owner_id\n        else:\n            src_group_name = None\n            src_group_owner_id = None\n        status = self.connection.authorize_security_group(self.name,\n                                                          src_group_name,\n                                                          src_group_owner_id,\n                                                          ip_protocol,\n                                                          from_port,\n                                                          to_port,\n                                                          cidr_ip)\n        if status:\n            self.add_rule(ip_protocol, from_port, to_port, src_group_name,\n                          src_group_owner_id, cidr_ip)\n        return status\n\n    def revoke(self, ip_protocol=None, from_port=None, to_port=None,\n               cidr_ip=None, src_group=None):\n        if src_group:\n            cidr_ip=None\n            src_group_name = src_group.name\n            src_group_owner_id = src_group.owner_id\n        else:\n            src_group_name = None\n            src_group_owner_id = None\n        status = self.connection.revoke_security_group(self.name,\n                                                       src_group_name,\n                                                       src_group_owner_id,\n                                                       ip_protocol,\n                                                       from_port,\n                                                       to_port,\n                                                       cidr_ip)\n        if status:\n            self.remove_rule(ip_protocol, from_port, to_port, src_group_name,\n                             src_group_owner_id, cidr_ip)\n        return status\n\n    def copy_to_region(self, region, name=None):\n        \"\"\"\n        Create a copy of this security group in another region.\n        Note that the new security group will be a separate entity\n        and will not stay in sync automatically after the copy\n        operation.\n\n        :type region: :class:`boto.ec2.regioninfo.RegionInfo`\n        :param region: The region to which this security group will be copied.\n\n        :type name: string\n        :param name: The name of the copy.  If not supplied, the copy\n                     will have the same name as this security group.\n        \n        :rtype: :class:`boto.ec2.securitygroup.SecurityGroup`\n        :return: The new security group.\n        \"\"\"\n        if region.name == self.region:\n            raise BotoClientError('Unable to copy to the same Region')\n        conn_params = self.connection.get_params()\n        rconn = region.connect(**conn_params)\n        sg = rconn.create_security_group(name or self.name, self.description)\n        source_groups = []\n        for rule in self.rules:\n            grant = rule.grants[0]\n            for grant in rule.grants:\n                if grant.name:\n                    if grant.name not in source_groups:\n                        source_groups.append(grant.name)\n                        sg.authorize(None, None, None, None, grant)\n                else:\n                    sg.authorize(rule.ip_protocol, rule.from_port, rule.to_port,\n                                 grant.cidr_ip)\n        return sg\n\n    def instances(self):\n        \"\"\"\n        Find all of the current instances that are running within this\n        security group.\n\n        :rtype: list of :class:`boto.ec2.instance.Instance`\n        :return: A list of Instance objects\n        \"\"\"\n        # It would be more efficient to do this with filters now\n        # but not all services that implement EC2 API support filters.\n        instances = []\n        rs = self.connection.get_all_instances()\n        for reservation in rs:\n            uses_group = [g.name for g in reservation.groups if g.name == self.name]\n            if uses_group:\n                instances.extend(reservation.instances)\n        return instances\n\nclass IPPermissionsList(list):\n    \n    def startElement(self, name, attrs, connection):\n        if name == 'item':\n            self.append(IPPermissions(self))\n            return self[-1]\n        return None\n\n    def endElement(self, name, value, connection):\n        pass\n            \nclass IPPermissions(object):\n\n    def __init__(self, parent=None):\n        self.parent = parent\n        self.ip_protocol = None\n        self.from_port = None\n        self.to_port = None\n        self.grants = []\n\n    def __repr__(self):\n        return 'IPPermissions:%s(%s-%s)' % (self.ip_protocol,\n                                            self.from_port, self.to_port)\n\n    def startElement(self, name, attrs, connection):\n        if name == 'item':\n            self.grants.append(GroupOrCIDR(self))\n            return self.grants[-1]\n        return None\n\n    def endElement(self, name, value, connection):\n        if name == 'ipProtocol':\n            self.ip_protocol = value\n        elif name == 'fromPort':\n            self.from_port = value\n        elif name == 'toPort':\n            self.to_port = value\n        else:\n            setattr(self, name, value)\n\n    def add_grant(self, name=None, owner_id=None, cidr_ip=None):\n        grant = GroupOrCIDR(self)\n        grant.owner_id = owner_id\n        grant.name = name\n        grant.cidr_ip = cidr_ip\n        self.grants.append(grant)\n        return grant\n\nclass GroupOrCIDR(object):\n\n    def __init__(self, parent=None):\n        self.owner_id = None\n        self.name = None\n        self.cidr_ip = None\n\n    def __repr__(self):\n        if self.cidr_ip:\n            return '%s' % self.cidr_ip\n        else:\n            return '%s-%s' % (self.name, self.owner_id)\n\n    def startElement(self, name, attrs, connection):\n        return None\n\n    def endElement(self, name, value, connection):\n        if name == 'userId':\n            self.owner_id = value\n        elif name == 'groupName':\n            self.name = value\n        if name == 'cidrIp':\n            self.cidr_ip = value\n        else:\n            setattr(self, name, value)\n\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/ec2/snapshot.py",
    "content": "# Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/\n# Copyright (c) 2010, Eucalyptus Systems, Inc.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\n\"\"\"\nRepresents an EC2 Elastic Block Store Snapshot\n\"\"\"\nfrom boto.ec2.ec2object import TaggedEC2Object\n\nclass Snapshot(TaggedEC2Object):\n    \n    AttrName = 'createVolumePermission'\n    \n    def __init__(self, connection=None):\n        TaggedEC2Object.__init__(self, connection)\n        self.id = None\n        self.volume_id = None\n        self.status = None\n        self.progress = None\n        self.start_time = None\n        self.owner_id = None\n        self.volume_size = None\n        self.description = None\n\n    def __repr__(self):\n        return 'Snapshot:%s' % self.id\n\n    def endElement(self, name, value, connection):\n        if name == 'snapshotId':\n            self.id = value\n        elif name == 'volumeId':\n            self.volume_id = value\n        elif name == 'status':\n            self.status = value\n        elif name == 'startTime':\n            self.start_time = value\n        elif name == 'ownerId':\n            self.owner_id = value\n        elif name == 'volumeSize':\n            try:\n                self.volume_size = int(value)\n            except:\n                self.volume_size = value\n        elif name == 'description':\n            self.description = value\n        else:\n            setattr(self, name, value)\n\n    def _update(self, updated):\n        self.progress = updated.progress\n        self.status = updated.status\n\n    def update(self, validate=False):\n        \"\"\"\n        Update the data associated with this snapshot by querying EC2.\n\n        :type validate: bool\n        :param validate: By default, if EC2 returns no data about the\n                         snapshot the update method returns quietly.  If\n                         the validate param is True, however, it will\n                         raise a ValueError exception if no data is\n                         returned from EC2.\n        \"\"\"\n        rs = self.connection.get_all_snapshots([self.id])\n        if len(rs) > 0:\n            self._update(rs[0])\n        elif validate:\n            raise ValueError('%s is not a valid Snapshot ID' % self.id)\n        return self.progress\n    \n    def delete(self):\n        return self.connection.delete_snapshot(self.id)\n\n    def get_permissions(self):\n        attrs = self.connection.get_snapshot_attribute(self.id, self.AttrName)\n        return attrs.attrs\n\n    def share(self, user_ids=None, groups=None):\n        return self.connection.modify_snapshot_attribute(self.id,\n                                                         self.AttrName,\n                                                         'add',\n                                                         user_ids,\n                                                         groups)\n\n    def unshare(self, user_ids=None, groups=None):\n        return self.connection.modify_snapshot_attribute(self.id,\n                                                         self.AttrName,\n                                                         'remove',\n                                                         user_ids,\n                                                         groups)\n\n    def reset_permissions(self):\n        return self.connection.reset_snapshot_attribute(self.id,\n                                                        self.AttrName)\n\nclass SnapshotAttribute:\n\n    def __init__(self, parent=None):\n        self.snapshot_id = None\n        self.attrs = {}\n\n    def startElement(self, name, attrs, connection):\n        return None\n\n    def endElement(self, name, value, connection):\n        if name == 'createVolumePermission':\n            self.name = 'create_volume_permission'\n        elif name == 'group':\n            if self.attrs.has_key('groups'):\n                self.attrs['groups'].append(value)\n            else:\n                self.attrs['groups'] = [value]\n        elif name == 'userId':\n            if self.attrs.has_key('user_ids'):\n                self.attrs['user_ids'].append(value)\n            else:\n                self.attrs['user_ids'] = [value]\n        elif name == 'snapshotId':\n            self.snapshot_id = value\n        else:\n            setattr(self, name, value)\n\n\n            \n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/ec2/spotdatafeedsubscription.py",
    "content": "# Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\n\"\"\"\nRepresents an EC2 Spot Instance Datafeed Subscription\n\"\"\"\nfrom boto.ec2.ec2object import EC2Object\nfrom boto.ec2.spotinstancerequest import SpotInstanceStateFault\n\nclass SpotDatafeedSubscription(EC2Object):\n    \n    def __init__(self, connection=None, owner_id=None,\n                 bucket=None, prefix=None, state=None,fault=None):\n        EC2Object.__init__(self, connection)\n        self.owner_id = owner_id\n        self.bucket = bucket\n        self.prefix = prefix\n        self.state = state\n        self.fault = fault\n\n    def __repr__(self):\n        return 'SpotDatafeedSubscription:%s' % self.bucket\n\n    def startElement(self, name, attrs, connection):\n        if name == 'fault':\n            self.fault = SpotInstanceStateFault()\n            return self.fault\n        else:\n            return None\n        \n    def endElement(self, name, value, connection):\n        if name == 'ownerId':\n            self.owner_id = value\n        elif name == 'bucket':\n            self.bucket = value\n        elif name == 'prefix':\n            self.prefix = value\n        elif name == 'state':\n            self.state = value\n        else:\n            setattr(self, name, value)\n\n    def delete(self):\n        return self.connection.delete_spot_datafeed_subscription()\n\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/ec2/spotinstancerequest.py",
    "content": "# Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/\n# Copyright (c) 2010, Eucalyptus Systems, Inc.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\n\"\"\"\nRepresents an EC2 Spot Instance Request\n\"\"\"\n\nfrom boto.ec2.ec2object import TaggedEC2Object\nfrom boto.ec2.launchspecification import LaunchSpecification\n\nclass SpotInstanceStateFault(object):\n\n    def __init__(self, code=None, message=None):\n        self.code = code\n        self.message = message\n\n    def __repr__(self):\n        return '(%s, %s)' % (self.code, self.message)\n\n    def startElement(self, name, attrs, connection):\n        return None\n\n    def endElement(self, name, value, connection):\n        if name == 'code':\n            self.code = value\n        elif name == 'message':\n            self.message = value\n        setattr(self, name, value)\n\nclass SpotInstanceRequest(TaggedEC2Object):\n    \n    def __init__(self, connection=None):\n        TaggedEC2Object.__init__(self, connection)\n        self.id = None\n        self.price = None\n        self.type = None\n        self.state = None\n        self.fault = None\n        self.valid_from = None\n        self.valid_until = None\n        self.launch_group = None\n        self.product_description = None\n        self.availability_zone_group = None\n        self.create_time = None\n        self.launch_specification = None\n        self.instance_id = None\n\n    def __repr__(self):\n        return 'SpotInstanceRequest:%s' % self.id\n\n    def startElement(self, name, attrs, connection):\n        retval = TaggedEC2Object.startElement(self, name, attrs, connection)\n        if retval is not None:\n            return retval\n        if name == 'launchSpecification':\n            self.launch_specification = LaunchSpecification(connection)\n            return self.launch_specification\n        elif name == 'fault':\n            self.fault = SpotInstanceStateFault()\n            return self.fault\n        else:\n            return None\n\n    def endElement(self, name, value, connection):\n        if name == 'spotInstanceRequestId':\n            self.id = value\n        elif name == 'spotPrice':\n            self.price = float(value)\n        elif name == 'type':\n            self.type = value\n        elif name == 'state':\n            self.state = value\n        elif name == 'productDescription':\n            self.product_description = value\n        elif name == 'validFrom':\n            self.valid_from = value\n        elif name == 'validUntil':\n            self.valid_until = value\n        elif name == 'launchGroup':\n            self.launch_group = value\n        elif name == 'availabilityZoneGroup':\n            self.availability_zone_group = value\n        elif name == 'createTime':\n            self.create_time = value\n        elif name == 'instanceId':\n            self.instance_id = value\n        else:\n            setattr(self, name, value)\n\n    def cancel(self):\n        self.connection.cancel_spot_instance_requests([self.id])\n\n\n    \n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/ec2/spotpricehistory.py",
    "content": "# Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\n\"\"\"\nRepresents an EC2 Spot Instance Request\n\"\"\"\n\nfrom boto.ec2.ec2object import EC2Object\n\nclass SpotPriceHistory(EC2Object):\n    \n    def __init__(self, connection=None):\n        EC2Object.__init__(self, connection)\n        self.price = 0.0\n        self.instance_type = None\n        self.product_description = None\n        self.timestamp = None\n        self.availability_zone = None\n\n    def __repr__(self):\n        return 'SpotPriceHistory(%s):%2f' % (self.instance_type, self.price)\n\n    def endElement(self, name, value, connection):\n        if name == 'instanceType':\n            self.instance_type = value\n        elif name == 'spotPrice':\n            self.price = float(value)\n        elif name == 'productDescription':\n            self.product_description = value\n        elif name == 'timestamp':\n            self.timestamp = value\n        elif name == 'availabilityZone':\n            self.availability_zone = value\n        else:\n            setattr(self, name, value)\n\n\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/ec2/tag.py",
    "content": "# Copyright (c) 2010 Mitch Garnaat http://garnaat.org/\n# Copyright (c) 2010, Eucalyptus Systems, Inc.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nclass TagSet(dict):\n    \"\"\"\n    A TagSet is used to collect the tags associated with a particular\n    EC2 resource.  Not all resources can be tagged but for those that\n    can, this dict object will be used to collect those values.  See\n    :class:`boto.ec2.ec2object.TaggedEC2Object` for more details.\n    \"\"\"\n    \n    def __init__(self, connection=None):\n        self.connection = connection\n        self._current_key = None\n        self._current_value = None\n\n    def startElement(self, name, attrs, connection):\n        if name == 'item':\n            self._current_key = None\n            self._current_value = None\n        return None\n\n    def endElement(self, name, value, connection):\n        if name == 'key':\n            self._current_key = value\n        elif name == 'value':\n            self._current_value = value\n        elif name == 'item':\n            self[self._current_key] = self._current_value\n\n\nclass Tag(object):\n    \"\"\"\n    A Tag is used when creating or listing all tags related to\n    an AWS account.  It records not only the key and value but\n    also the ID of the resource to which the tag is attached\n    as well as the type of the resource.\n    \"\"\"\n    \n    def __init__(self, connection=None, res_id=None, res_type=None,\n                 name=None, value=None):\n        self.connection = connection\n        self.res_id = res_id\n        self.res_type = res_type\n        self.name = name\n        self.value = value\n\n    def __repr__(self):\n        return 'Tag:%s' % self.name\n\n    def startElement(self, name, attrs, connection):\n        return None\n\n    def endElement(self, name, value, connection):\n        if name == 'resourceId':\n            self.res_id = value\n        elif name == 'resourceType':\n            self.res_type = value\n        elif name == 'key':\n            self.name = value\n        elif name == 'value':\n            self.value = value\n        else:\n            setattr(self, name, value)\n\n\n            \n\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/ec2/volume.py",
    "content": "# Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/\n# Copyright (c) 2010, Eucalyptus Systems, Inc.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\n\"\"\"\nRepresents an EC2 Elastic Block Storage Volume\n\"\"\"\nfrom boto.ec2.ec2object import TaggedEC2Object\n\nclass Volume(TaggedEC2Object):\n    \n    def __init__(self, connection=None):\n        TaggedEC2Object.__init__(self, connection)\n        self.id = None\n        self.create_time = None\n        self.status = None\n        self.size = None\n        self.snapshot_id = None\n        self.attach_data = None\n        self.zone = None\n\n    def __repr__(self):\n        return 'Volume:%s' % self.id\n\n    def startElement(self, name, attrs, connection):\n        retval = TaggedEC2Object.startElement(self, name, attrs, connection)\n        if retval is not None:\n            return retval\n        if name == 'attachmentSet':\n            self.attach_data = AttachmentSet()\n            return self.attach_data\n        elif name == 'tagSet':\n            self.tags = boto.resultset.ResultSet([('item', Tag)])\n            return self.tags\n        else:\n            return None\n\n    def endElement(self, name, value, connection):\n        if name == 'volumeId':\n            self.id = value\n        elif name == 'createTime':\n            self.create_time = value\n        elif name == 'status':\n            if value != '':\n                self.status = value\n        elif name == 'size':\n            self.size = int(value)\n        elif name == 'snapshotId':\n            self.snapshot_id = value\n        elif name == 'availabilityZone':\n            self.zone = value\n        else:\n            setattr(self, name, value)\n\n    def _update(self, updated):\n        self.__dict__.update(updated.__dict__)\n\n    def update(self, validate=False):\n        \"\"\"\n        Update the data associated with this volume by querying EC2.\n\n        :type validate: bool\n        :param validate: By default, if EC2 returns no data about the\n                         volume the update method returns quietly.  If\n                         the validate param is True, however, it will\n                         raise a ValueError exception if no data is\n                         returned from EC2.\n        \"\"\"\n        rs = self.connection.get_all_volumes([self.id])\n        if len(rs) > 0:\n            self._update(rs[0])\n        elif validate:\n            raise ValueError('%s is not a valid Volume ID' % self.id)\n        return self.status\n\n    def delete(self):\n        \"\"\"\n        Delete this EBS volume.\n\n        :rtype: bool\n        :return: True if successful\n        \"\"\"\n        return self.connection.delete_volume(self.id)\n\n    def attach(self, instance_id, device):\n        \"\"\"\n        Attach this EBS volume to an EC2 instance.\n\n        :type instance_id: str\n        :param instance_id: The ID of the EC2 instance to which it will\n                            be attached.\n\n        :type device: str\n        :param device: The device on the instance through which the\n                       volume will be exposed (e.g. /dev/sdh)\n\n        :rtype: bool\n        :return: True if successful\n        \"\"\"\n        return self.connection.attach_volume(self.id, instance_id, device)\n\n    def detach(self, force=False):\n        \"\"\"\n        Detach this EBS volume from an EC2 instance.\n\n        :type force: bool\n        :param force: Forces detachment if the previous detachment attempt did\n                      not occur cleanly.  This option can lead to data loss or\n                      a corrupted file system. Use this option only as a last\n                      resort to detach a volume from a failed instance. The\n                      instance will not have an opportunity to flush file system\n                      caches nor file system meta data. If you use this option,\n                      you must perform file system check and repair procedures.\n\n        :rtype: bool\n        :return: True if successful\n        \"\"\"\n        instance_id = None\n        if self.attach_data:\n            instance_id = self.attach_data.instance_id\n        device = None\n        if self.attach_data:\n            device = self.attach_data.device\n        return self.connection.detach_volume(self.id, instance_id, device, force)\n\n    def create_snapshot(self, description=None):\n        \"\"\"\n        Create a snapshot of this EBS Volume.\n\n        :type description: str\n        :param description: A description of the snapshot.  Limited to 256 characters.\n        \n        :rtype: bool\n        :return: True if successful\n        \"\"\"\n        return self.connection.create_snapshot(self.id, description)\n\n    def volume_state(self):\n        \"\"\"\n        Returns the state of the volume.  Same value as the status attribute.\n        \"\"\"\n        return self.status\n\n    def attachment_state(self):\n        \"\"\"\n        Get the attachment state.\n        \"\"\"\n        state = None\n        if self.attach_data:\n            state = self.attach_data.status\n        return state\n\n    def snapshots(self, owner=None, restorable_by=None):\n        \"\"\"\n        Get all snapshots related to this volume.  Note that this requires\n        that all available snapshots for the account be retrieved from EC2\n        first and then the list is filtered client-side to contain only\n        those for this volume.\n\n        :type owner: str\n        :param owner: If present, only the snapshots owned by the specified user\n                      will be returned.  Valid values are:\n                      self | amazon | AWS Account ID\n\n        :type restorable_by: str\n        :param restorable_by: If present, only the snapshots that are restorable\n                              by the specified account id will be returned.\n\n        :rtype: list of L{boto.ec2.snapshot.Snapshot}\n        :return: The requested Snapshot objects\n        \n        \"\"\"\n        rs = self.connection.get_all_snapshots(owner=owner,\n                                               restorable_by=restorable_by)\n        mine = []\n        for snap in rs:\n            if snap.volume_id == self.id:\n                mine.append(snap)\n        return mine\n\nclass AttachmentSet(object):\n    \n    def __init__(self):\n        self.id = None\n        self.instance_id = None\n        self.status = None\n        self.attach_time = None\n        self.device = None\n\n    def __repr__(self):\n        return 'AttachmentSet:%s' % self.id\n\n    def startElement(self, name, attrs, connection):\n        pass\n    \n    def endElement(self, name, value, connection):\n        if name == 'volumeId':\n            self.id = value\n        elif name == 'instanceId':\n            self.instance_id = value\n        elif name == 'status':\n            self.status = value\n        elif name == 'attachTime':\n            self.attach_time = value\n        elif name == 'device':\n            self.device = value\n        else:\n            setattr(self, name, value)\n\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/ec2/zone.py",
    "content": "# Copyright (c) 2006-2008 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\n\"\"\"\nRepresents an EC2 Availability Zone\n\"\"\"\nfrom boto.ec2.ec2object import EC2Object\n\nclass Zone(EC2Object):\n    \n    def __init__(self, connection=None):\n        EC2Object.__init__(self, connection)\n        self.name = None\n        self.state = None\n\n    def __repr__(self):\n        return 'Zone:%s' % self.name\n\n    def endElement(self, name, value, connection):\n        if name == 'zoneName':\n            self.name = value\n        elif name == 'zoneState':\n            self.state = value\n        else:\n            setattr(self, name, value)\n\n\n\n\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/ecs/__init__.py",
    "content": "# Copyright (c) 2010 Chris Moyer http://coredumped.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nimport boto\nfrom boto.connection import AWSQueryConnection, AWSAuthConnection\nimport time\nimport urllib\nimport xml.sax\nfrom boto.ecs.item import ItemSet\nfrom boto import handler\n\nclass ECSConnection(AWSQueryConnection):\n    \"\"\"\n    ECommerce Connection\n\n    For more information on how to use this module see:\n\n    http://blog.coredumped.org/2010/09/search-for-books-on-amazon-using-boto.html\n    \"\"\"\n\n    APIVersion = '2010-11-01'\n\n    def __init__(self, aws_access_key_id=None, aws_secret_access_key=None,\n                 is_secure=True, port=None, proxy=None, proxy_port=None,\n                 proxy_user=None, proxy_pass=None, host='ecs.amazonaws.com',\n                 debug=0, https_connection_factory=None, path='/'):\n        AWSQueryConnection.__init__(self, aws_access_key_id, aws_secret_access_key,\n                                    is_secure, port, proxy, proxy_port, proxy_user, proxy_pass,\n                                    host, debug, https_connection_factory, path)\n\n    def _required_auth_capability(self):\n        return ['ecs']\n\n    def get_response(self, action, params, page=0, itemSet=None):\n        \"\"\"\n        Utility method to handle calls to ECS and parsing of responses.\n        \"\"\"\n        params['Service'] = \"AWSECommerceService\"\n        params['Operation'] = action\n        if page:\n            params['ItemPage'] = page\n        response = self.make_request(None, params, \"/onca/xml\")\n        body = response.read()\n        boto.log.debug(body)\n\n        if response.status != 200:\n            boto.log.error('%s %s' % (response.status, response.reason))\n            boto.log.error('%s' % body)\n            raise self.ResponseError(response.status, response.reason, body)\n\n        if itemSet == None:\n            rs = ItemSet(self, action, params, page)\n        else:\n            rs = itemSet\n        h = handler.XmlHandler(rs, self)\n        xml.sax.parseString(body, h)\n        return rs\n\n    #\n    # Group methods\n    #\n    \n    def item_search(self, search_index, **params):\n        \"\"\"\n        Returns items that satisfy the search criteria, including one or more search \n        indices.\n\n        For a full list of search terms, \n        :see: http://docs.amazonwebservices.com/AWSECommerceService/2010-09-01/DG/index.html?ItemSearch.html\n        \"\"\"\n        params['SearchIndex'] = search_index\n        return self.get_response('ItemSearch', params)\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/ecs/item.py",
    "content": "# Copyright (c) 2010 Chris Moyer http://coredumped.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\n\nimport xml.sax\nimport cgi\nfrom StringIO import StringIO\n\nclass ResponseGroup(xml.sax.ContentHandler):\n    \"\"\"A Generic \"Response Group\", which can\n    be anything from the entire list of Items to \n    specific response elements within an item\"\"\"\n\n    def __init__(self, connection=None, nodename=None):\n        \"\"\"Initialize this Item\"\"\"\n        self._connection = connection\n        self._nodename = nodename\n        self._nodepath = []\n        self._curobj = None\n        self._xml = StringIO()\n\n    def __repr__(self):\n        return '<%s: %s>' % (self.__class__.__name__, self.__dict__)\n\n    #\n    # Attribute Functions\n    #\n    def get(self, name):\n        return self.__dict__.get(name)\n    \n    def set(self, name, value):\n        self.__dict__[name] = value\n\n    def to_xml(self):\n        return \"<%s>%s</%s>\" % (self._nodename, self._xml.getvalue(), self._nodename)\n\n    #\n    # XML Parser functions\n    #\n    def startElement(self, name, attrs, connection):\n        self._xml.write(\"<%s>\" % name)\n        self._nodepath.append(name)\n        if len(self._nodepath) == 1:\n            obj = ResponseGroup(self._connection)\n            self.set(name, obj)\n            self._curobj = obj\n        elif self._curobj:\n            self._curobj.startElement(name, attrs, connection)\n        return None\n\n    def endElement(self, name, value, connection):\n        self._xml.write(\"%s</%s>\" % (cgi.escape(value).replace(\"&amp;amp;\", \"&amp;\"), name))\n        if len(self._nodepath) == 0:\n            return\n        obj = None\n        curval = self.get(name)\n        if len(self._nodepath) == 1:\n            if value or not curval:\n                self.set(name, value)\n            if self._curobj:\n                self._curobj = None\n        #elif len(self._nodepath) == 2:\n            #self._curobj = None\n        elif self._curobj:\n            self._curobj.endElement(name, value, connection)\n        self._nodepath.pop()\n        return None\n\n\nclass Item(ResponseGroup):\n    \"\"\"A single Item\"\"\"\n\n    def __init__(self, connection=None):\n        \"\"\"Initialize this Item\"\"\"\n        ResponseGroup.__init__(self, connection, \"Item\")\n\nclass ItemSet(ResponseGroup):\n    \"\"\"A special ResponseGroup that has built-in paging, and\n    only creates new Items on the \"Item\" tag\"\"\"\n\n    def __init__(self, connection, action, params, page=0):\n        ResponseGroup.__init__(self, connection, \"Items\")\n        self.objs = []\n        self.iter = None\n        self.page = page\n        self.action = action\n        self.params = params\n        self.curItem = None\n        self.total_results = 0\n        self.total_pages = 0\n\n    def startElement(self, name, attrs, connection):\n        if name == \"Item\":\n            self.curItem = Item(self._connection)\n        elif self.curItem != None:\n            self.curItem.startElement(name, attrs, connection)\n        return None\n\n    def endElement(self, name, value, connection):\n        if name == 'TotalResults':\n            self.total_results = value\n        elif name == 'TotalPages':\n            self.total_pages = value\n        elif name == \"Item\":\n            self.objs.append(self.curItem)\n            self._xml.write(self.curItem.to_xml())\n            self.curItem = None\n        elif self.curItem != None:\n            self.curItem.endElement(name, value, connection)\n        return None\n\n    def next(self):\n        \"\"\"Special paging functionality\"\"\"\n        if self.iter == None:\n            self.iter = iter(self.objs)\n        try:\n            return self.iter.next()\n        except StopIteration:\n            self.iter = None\n            self.objs = []\n            if int(self.page) < int(self.total_pages):\n                self.page += 1\n                self._connection.get_response(self.action, self.params, self.page, self)\n                return self.next()\n            else:\n                raise\n\n    def __iter__(self):\n        return self\n\n    def to_xml(self):\n        \"\"\"Override to first fetch everything\"\"\"\n        for item in self:\n            pass\n        return ResponseGroup.to_xml(self)\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/emr/__init__.py",
    "content": "# Copyright (c) 2010 Spotify AB\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\n\"\"\"\nThis module provies an interface to the Elastic MapReduce (EMR)\nservice from AWS.\n\"\"\"\nfrom connection import EmrConnection\nfrom step import Step, StreamingStep, JarStep\nfrom bootstrap_action import BootstrapAction\n\n\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/emr/bootstrap_action.py",
    "content": "# Copyright (c) 2010 Spotify AB\n# Copyright (c) 2010 Yelp\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nclass BootstrapAction(object):\n    def __init__(self, name, path, bootstrap_action_args):\n        self.name = name\n        self.path = path\n\n        if isinstance(bootstrap_action_args, basestring):\n            bootstrap_action_args = [bootstrap_action_args]\n\n        self.bootstrap_action_args = bootstrap_action_args\n\n    def args(self):\n        args = []\n\n        if self.bootstrap_action_args:\n            args.extend(self.bootstrap_action_args)\n\n        return args\n\n    def __repr__(self):\n        return '%s.%s(name=%r, path=%r, bootstrap_action_args=%r)' % (\n            self.__class__.__module__, self.__class__.__name__,\n            self.name, self.path, self.bootstrap_action_args)\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/emr/connection.py",
    "content": "# Copyright (c) 2010 Spotify AB\n# Copyright (c) 2010-2011 Yelp\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\n\"\"\"\nRepresents a connection to the EMR service\n\"\"\"\nimport types\n\nimport boto\nimport boto.utils\nfrom boto.ec2.regioninfo import RegionInfo\nfrom boto.emr.emrobject import JobFlow, RunJobFlowResponse\nfrom boto.emr.emrobject import AddInstanceGroupsResponse, ModifyInstanceGroupsResponse\nfrom boto.emr.step import JarStep\nfrom boto.connection import AWSQueryConnection\nfrom boto.exception import EmrResponseError\n\nclass EmrConnection(AWSQueryConnection):\n\n    APIVersion = boto.config.get('Boto', 'emr_version', '2009-03-31')\n    DefaultRegionName = boto.config.get('Boto', 'emr_region_name', 'us-east-1')\n    DefaultRegionEndpoint = boto.config.get('Boto', 'emr_region_endpoint',\n                                            'elasticmapreduce.amazonaws.com')\n    ResponseError = EmrResponseError\n\n    # Constants for AWS Console debugging\n    DebuggingJar = 's3n://us-east-1.elasticmapreduce/libs/script-runner/script-runner.jar'\n    DebuggingArgs = 's3n://us-east-1.elasticmapreduce/libs/state-pusher/0.1/fetch'\n\n    def __init__(self, aws_access_key_id=None, aws_secret_access_key=None,\n                 is_secure=True, port=None, proxy=None, proxy_port=None,\n                 proxy_user=None, proxy_pass=None, debug=0,\n                 https_connection_factory=None, region=None, path='/'):\n        if not region:\n            region = RegionInfo(self, self.DefaultRegionName, self.DefaultRegionEndpoint)\n        self.region = region\n        AWSQueryConnection.__init__(self, aws_access_key_id,\n                                    aws_secret_access_key,\n                                    is_secure, port, proxy, proxy_port,\n                                    proxy_user, proxy_pass,\n                                    self.region.endpoint, debug,\n                                    https_connection_factory, path)\n\n    def _required_auth_capability(self):\n        return ['emr']\n\n    def describe_jobflow(self, jobflow_id):\n        \"\"\"\n        Describes a single Elastic MapReduce job flow\n\n        :type jobflow_id: str\n        :param jobflow_id: The job flow id of interest\n        \"\"\"\n        jobflows = self.describe_jobflows(jobflow_ids=[jobflow_id])\n        if jobflows:\n            return jobflows[0]\n\n    def describe_jobflows(self, states=None, jobflow_ids=None,\n                           created_after=None, created_before=None):\n        \"\"\"\n        Retrieve all the Elastic MapReduce job flows on your account\n\n        :type states: list\n        :param states: A list of strings with job flow states wanted\n\n        :type jobflow_ids: list\n        :param jobflow_ids: A list of job flow IDs\n        :type created_after: datetime\n        :param created_after: Bound on job flow creation time\n\n        :type created_before: datetime\n        :param created_before: Bound on job flow creation time\n        \"\"\"\n        params = {}\n\n        if states:\n            self.build_list_params(params, states, 'JobFlowStates.member')\n        if jobflow_ids:\n            self.build_list_params(params, jobflow_ids, 'JobFlowIds.member')\n        if created_after:\n            params['CreatedAfter'] = created_after.strftime(\n                boto.utils.ISO8601)\n        if created_before:\n            params['CreatedBefore'] = created_before.strftime(\n                boto.utils.ISO8601)\n\n        return self.get_list('DescribeJobFlows', params, [('member', JobFlow)])\n\n    def terminate_jobflow(self, jobflow_id):\n        \"\"\"\n        Terminate an Elastic MapReduce job flow\n\n        :type jobflow_id: str\n        :param jobflow_id: A jobflow id\n        \"\"\"\n        self.terminate_jobflows([jobflow_id])\n\n    def terminate_jobflows(self, jobflow_ids):\n        \"\"\"\n        Terminate an Elastic MapReduce job flow\n\n        :type jobflow_ids: list\n        :param jobflow_ids: A list of job flow IDs\n        \"\"\"\n        params = {}\n        self.build_list_params(params, jobflow_ids, 'JobFlowIds.member')\n        return self.get_status('TerminateJobFlows', params, verb='POST')\n\n    def add_jobflow_steps(self, jobflow_id, steps):\n        \"\"\"\n        Adds steps to a jobflow\n\n        :type jobflow_id: str\n        :param jobflow_id: The job flow id\n        :type steps: list(boto.emr.Step)\n        :param steps: A list of steps to add to the job\n        \"\"\"\n        if type(steps) != types.ListType:\n            steps = [steps]\n        params = {}\n        params['JobFlowId'] = jobflow_id\n\n        # Step args\n        step_args = [self._build_step_args(step) for step in steps]\n        params.update(self._build_step_list(step_args))\n\n        return self.get_object(\n            'AddJobFlowSteps', params, RunJobFlowResponse, verb='POST')\n\n    def add_instance_groups(self, jobflow_id, instance_groups):\n        \"\"\"\n        Adds instance groups to a running cluster.\n\n        :type jobflow_id: str\n        :param jobflow_id: The id of the jobflow which will take the new instance groups\n        :type instance_groups: list(boto.emr.InstanceGroup)\n        :param instance_groups: A list of instance groups to add to the job\n        \"\"\"\n        if type(instance_groups) != types.ListType:\n            instance_groups = [instance_groups]\n        params = {}\n        params['JobFlowId'] = jobflow_id\n        params.update(self._build_instance_group_list_args(instance_groups))\n\n        return self.get_object('AddInstanceGroups', params, AddInstanceGroupsResponse, verb='POST')\n\n    def modify_instance_groups(self, instance_group_ids, new_sizes):\n        \"\"\"\n        Modify the number of nodes and configuration settings in an instance group.\n\n        :type instance_group_ids: list(str)\n        :param instance_group_ids: A list of the ID's of the instance groups to be modified\n        :type new_sizes: list(int)\n        :param new_sizes: A list of the new sizes for each instance group\n        \"\"\"\n        if type(instance_group_ids) != types.ListType:\n            instance_group_ids = [instance_group_ids]\n        if type(new_sizes) != types.ListType:\n            new_sizes = [new_sizes]\n\n        instance_groups = zip(instance_group_ids, new_sizes)\n\n        params = {}\n        for k, ig in enumerate(instance_groups):\n            #could be wrong - the example amazon gives uses InstanceRequestCount,\n            #while the api documentation says InstanceCount\n            params['InstanceGroups.member.%d.InstanceGroupId' % (k+1) ] = ig[0]\n            params['InstanceGroups.member.%d.InstanceCount' % (k+1) ] = ig[1]\n\n        return self.get_object('ModifyInstanceGroups', params, ModifyInstanceGroupsResponse, verb='POST')\n\n    def run_jobflow(self, name, log_uri, ec2_keyname=None, availability_zone=None,\n                    master_instance_type='m1.small',\n                    slave_instance_type='m1.small', num_instances=1,\n                    action_on_failure='TERMINATE_JOB_FLOW', keep_alive=False,\n                    enable_debugging=False,\n                    hadoop_version='0.20',\n                    steps=[],\n                    bootstrap_actions=[],\n                    instance_groups=None,\n                    additional_info=None):\n        \"\"\"\n        Runs a job flow\n\n        :type name: str\n        :param name: Name of the job flow\n        :type log_uri: str\n        :param log_uri: URI of the S3 bucket to place logs\n        :type ec2_keyname: str\n        :param ec2_keyname: EC2 key used for the instances\n        :type availability_zone: str\n        :param availability_zone: EC2 availability zone of the cluster\n        :type master_instance_type: str\n        :param master_instance_type: EC2 instance type of the master\n        :type slave_instance_type: str\n        :param slave_instance_type: EC2 instance type of the slave nodes\n        :type num_instances: int\n        :param num_instances: Number of instances in the Hadoop cluster\n        :type action_on_failure: str\n        :param action_on_failure: Action to take if a step terminates\n        :type keep_alive: bool\n        :param keep_alive: Denotes whether the cluster should stay alive upon completion\n        :type enable_debugging: bool\n        :param enable_debugging: Denotes whether AWS console debugging should be enabled.\n        :type steps: list(boto.emr.Step)\n        :param steps: List of steps to add with the job\n        :type bootstrap_actions: list(boto.emr.BootstrapAction)\n        :param bootstrap_actions: List of bootstrap actions that run before Hadoop starts.\n        :type instance_groups: list(boto.emr.InstanceGroup)\n        :param instance_groups: Optional list of instance groups to use when creating\n                      this job. NB: When provided, this argument supersedes\n                      num_instances and master/slave_instance_type.\n        :type additional_info: JSON str\n        :param additional_info: A JSON string for selecting additional features\n        :rtype: str\n        :return: The jobflow id\n        \"\"\"\n        params = {}\n        if action_on_failure:\n            params['ActionOnFailure'] = action_on_failure\n        params['Name'] = name\n        params['LogUri'] = log_uri\n\n        # Common instance args\n        common_params = self._build_instance_common_args(ec2_keyname,\n                                                         availability_zone,\n                                                         keep_alive, hadoop_version)\n        params.update(common_params)\n\n        # NB: according to the AWS API's error message, we must\n        # \"configure instances either using instance count, master and\n        # slave instance type or instance groups but not both.\"\n        #\n        # Thus we switch here on the truthiness of instance_groups.\n        if not instance_groups:\n            # Instance args (the common case)\n            instance_params = self._build_instance_count_and_type_args(\n                                                        master_instance_type,\n                                                        slave_instance_type,\n                                                        num_instances)\n            params.update(instance_params)\n        else:\n            # Instance group args (for spot instances or a heterogenous cluster)\n            list_args = self._build_instance_group_list_args(instance_groups)\n            instance_params = dict(\n                ('Instances.%s' % k, v) for k, v in list_args.iteritems()\n                )\n            params.update(instance_params)\n\n        # Debugging step from EMR API docs\n        if enable_debugging:\n            debugging_step = JarStep(name='Setup Hadoop Debugging',\n                                     action_on_failure='TERMINATE_JOB_FLOW',\n                                     main_class=None,\n                                     jar=self.DebuggingJar,\n                                     step_args=self.DebuggingArgs)\n            steps.insert(0, debugging_step)\n\n        # Step args\n        if steps:\n            step_args = [self._build_step_args(step) for step in steps]\n            params.update(self._build_step_list(step_args))\n\n        if bootstrap_actions:\n            bootstrap_action_args = [self._build_bootstrap_action_args(bootstrap_action) for bootstrap_action in bootstrap_actions]\n            params.update(self._build_bootstrap_action_list(bootstrap_action_args))\n\n        if additional_info is not None:\n            params['AdditionalInfo'] = additional_info\n\n        response = self.get_object(\n            'RunJobFlow', params, RunJobFlowResponse, verb='POST')\n        return response.jobflowid\n\n    def set_termination_protection(self, jobflow_id, termination_protection_status):\n        \"\"\"\n        Set termination protection on specified Elastic MapReduce job flows\n\n        :type jobflow_ids: list or str\n        :param jobflow_ids: A list of job flow IDs\n        :type termination_protection_status: bool\n        :param termination_protection_status: Termination protection status\n        \"\"\"\n        assert termination_protection_status in (True, False)\n\n        params = {}\n        params['TerminationProtected'] = (termination_protection_status and \"true\") or \"false\"\n        self.build_list_params(params, [jobflow_id], 'JobFlowIds.member')\n\n        return self.get_status('SetTerminationProtection', params, verb='POST')\n\n\n    def _build_bootstrap_action_args(self, bootstrap_action):\n        bootstrap_action_params = {}\n        bootstrap_action_params['ScriptBootstrapAction.Path'] = bootstrap_action.path\n\n        try:\n            bootstrap_action_params['Name'] = bootstrap_action.name\n        except AttributeError:\n            pass\n\n        args = bootstrap_action.args()\n        if args:\n            self.build_list_params(bootstrap_action_params, args, 'ScriptBootstrapAction.Args.member')\n\n        return bootstrap_action_params\n\n    def _build_step_args(self, step):\n        step_params = {}\n        step_params['ActionOnFailure'] = step.action_on_failure\n        step_params['HadoopJarStep.Jar'] = step.jar()\n\n        main_class = step.main_class()\n        if main_class:\n            step_params['HadoopJarStep.MainClass'] = main_class\n\n        args = step.args()\n        if args:\n            self.build_list_params(step_params, args, 'HadoopJarStep.Args.member')\n\n        step_params['Name'] = step.name\n        return step_params\n\n    def _build_bootstrap_action_list(self, bootstrap_actions):\n        if type(bootstrap_actions) != types.ListType:\n            bootstrap_actions = [bootstrap_actions]\n\n        params = {}\n        for i, bootstrap_action in enumerate(bootstrap_actions):\n            for key, value in bootstrap_action.iteritems():\n                params['BootstrapActions.member.%s.%s' % (i + 1, key)] = value\n        return params\n\n    def _build_step_list(self, steps):\n        if type(steps) != types.ListType:\n            steps = [steps]\n\n        params = {}\n        for i, step in enumerate(steps):\n            for key, value in step.iteritems():\n                params['Steps.member.%s.%s' % (i+1, key)] = value\n        return params\n\n    def _build_instance_common_args(self, ec2_keyname, availability_zone,\n                                    keep_alive, hadoop_version):\n        \"\"\"\n        Takes a number of parameters used when starting a jobflow (as\n        specified in run_jobflow() above). Returns a comparable dict for\n        use in making a RunJobFlow request.\n        \"\"\"\n        params = {\n            'Instances.KeepJobFlowAliveWhenNoSteps' : str(keep_alive).lower(),\n            'Instances.HadoopVersion' : hadoop_version\n        }\n\n        if ec2_keyname:\n            params['Instances.Ec2KeyName'] = ec2_keyname\n        if availability_zone:\n            params['Instances.Placement.AvailabilityZone'] = availability_zone\n\n        return params\n\n    def _build_instance_count_and_type_args(self, master_instance_type,\n                                            slave_instance_type, num_instances):\n        \"\"\"\n        Takes a master instance type (string), a slave instance type\n        (string), and a number of instances. Returns a comparable dict\n        for use in making a RunJobFlow request.\n        \"\"\"\n        params = {\n            'Instances.MasterInstanceType' : master_instance_type,\n            'Instances.SlaveInstanceType' : slave_instance_type,\n            'Instances.InstanceCount' : num_instances,\n            }\n        return params\n\n    def _build_instance_group_args(self, instance_group):\n        \"\"\"\n        Takes an InstanceGroup; returns a dict that, when its keys are\n        properly prefixed, can be used for describing InstanceGroups in\n        RunJobFlow or AddInstanceGroups requests.\n        \"\"\"\n        params = {\n            'InstanceCount' : instance_group.num_instances,\n            'InstanceRole' : instance_group.role,\n            'InstanceType' : instance_group.type,\n            'Name' : instance_group.name,\n            'Market' : instance_group.market\n        }\n        if instance_group.market == 'SPOT':\n            params['BidPrice'] = instance_group.bidprice\n        return params\n\n    def _build_instance_group_list_args(self, instance_groups):\n        \"\"\"\n        Takes a list of InstanceGroups, or a single InstanceGroup. Returns\n        a comparable dict for use in making a RunJobFlow or AddInstanceGroups\n        request.\n        \"\"\"\n        if type(instance_groups) != types.ListType:\n            instance_groups = [instance_groups]\n\n        params = {}\n        for i, instance_group in enumerate(instance_groups):\n            ig_dict = self._build_instance_group_args(instance_group)\n            for key, value in ig_dict.iteritems():\n                params['InstanceGroups.member.%d.%s' % (i+1, key)] = value\n        return params\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/emr/emrobject.py",
    "content": "# Copyright (c) 2010 Spotify AB\n# Copyright (c) 2010 Jeremy Thurgood <firxen+boto@gmail.com>\n# Copyright (c) 2010-2011 Yelp\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\n\"\"\"\nThis module contains EMR response objects\n\"\"\"\n\nfrom boto.resultset import ResultSet\n\n\nclass EmrObject(object):\n    Fields = set()\n\n    def __init__(self, connection=None):\n        self.connection = connection\n\n    def startElement(self, name, attrs, connection):\n        pass\n\n    def endElement(self, name, value, connection):\n        if name in self.Fields:\n            setattr(self, name.lower(), value)\n\n\nclass RunJobFlowResponse(EmrObject):\n    Fields = set(['JobFlowId'])\n\nclass AddInstanceGroupsResponse(EmrObject):\n    Fields = set(['InstanceGroupIds', 'JobFlowId'])\n    \nclass ModifyInstanceGroupsResponse(EmrObject):\n    Fields = set(['RequestId'])\n    \n\nclass Arg(EmrObject):\n    def __init__(self, connection=None):\n        self.value = None\n\n    def endElement(self, name, value, connection):\n        self.value = value\n\n\nclass BootstrapAction(EmrObject):\n    Fields = set([\n        'Args',\n        'Name',\n        'Path',\n    ])\n\n    def startElement(self, name, attrs, connection):\n        if name == 'Args':\n            self.args = ResultSet([('member', Arg)])\n            return self.args\n\n\nclass KeyValue(EmrObject):\n    Fields = set([\n        'Key',\n        'Value',\n    ])\n\n\nclass Step(EmrObject):\n    Fields = set([\n        'ActionOnFailure',\n        'CreationDateTime',\n        'EndDateTime',\n        'Jar',\n        'LastStateChangeReason',\n        'MainClass',\n        'Name',\n        'StartDateTime',\n        'State',\n    ])\n\n    def __init__(self, connection=None):\n        self.connection = connection\n        self.args = None\n\n    def startElement(self, name, attrs, connection):\n        if name == 'Args':\n            self.args = ResultSet([('member', Arg)])\n            return self.args\n        if name == 'Properties':\n            self.properties = ResultSet([('member', KeyValue)])\n            return self.properties\n\n\nclass InstanceGroup(EmrObject):\n    Fields = set([\n        'BidPrice',\n        'CreationDateTime',\n        'EndDateTime',\n        'InstanceGroupId',\n        'InstanceRequestCount',\n        'InstanceRole',\n        'InstanceRunningCount',\n        'InstanceType',\n        'LastStateChangeReason',\n        'LaunchGroup',\n        'Market',\n        'Name',\n        'ReadyDateTime',\n        'StartDateTime',\n        'State',\n    ])\n\n\nclass JobFlow(EmrObject):\n    Fields = set([\n        'AvailabilityZone',\n        'CreationDateTime',\n        'Ec2KeyName',\n        'EndDateTime',\n        'HadoopVersion',\n        'Id',\n        'InstanceCount',\n        'JobFlowId',\n        'KeepJobFlowAliveWhenNoSteps',\n        'LastStateChangeReason',\n        'LogUri',\n        'MasterInstanceId',\n        'MasterInstanceType',\n        'MasterPublicDnsName',\n        'Name',\n        'NormalizedInstanceHours',\n        'ReadyDateTime',\n        'RequestId',\n        'SlaveInstanceType',\n        'StartDateTime',\n        'State',\n        'TerminationProtected',\n        'Type',\n        'Value',\n    ])\n\n    def __init__(self, connection=None):\n        self.connection = connection\n        self.steps = None\n        self.instancegroups = None\n        self.bootstrapactions = None\n\n    def startElement(self, name, attrs, connection):\n        if name == 'Steps':\n            self.steps = ResultSet([('member', Step)])\n            return self.steps\n        elif name == 'InstanceGroups':\n            self.instancegroups = ResultSet([('member', InstanceGroup)])\n            return self.instancegroups\n        elif name == 'BootstrapActions':\n            self.bootstrapactions = ResultSet([('member', BootstrapAction)])\n            return self.bootstrapactions\n        else:\n            return None\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/emr/instance_group.py",
    "content": "#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\n\nclass InstanceGroup(object):\n    def __init__(self, num_instances, role, type, market, name, bidprice=None):\n        self.num_instances = num_instances\n        self.role = role\n        self.type = type\n        self.market = market\n        self.name = name\n        if market == 'SPOT':\n            if not isinstance(bidprice, basestring):\n                raise ValueError('bidprice must be specified if market == SPOT')\n            self.bidprice = bidprice\n\n    def __repr__(self):\n        if self.market == 'SPOT':\n            return '%s.%s(name=%r, num_instances=%r, role=%r, type=%r, market = %r, bidprice = %r)' % (\n                self.__class__.__module__, self.__class__.__name__,\n                self.name, self.num_instances, self.role, self.type, self.market,\n                self.bidprice)\n        else:\n            return '%s.%s(name=%r, num_instances=%r, role=%r, type=%r, market = %r)' % (\n                self.__class__.__module__, self.__class__.__name__,\n                self.name, self.num_instances, self.role, self.type, self.market)\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/emr/step.py",
    "content": "# Copyright (c) 2010 Spotify AB\n# Copyright (c) 2010-2011 Yelp\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nclass Step(object):\n    \"\"\"\n    Jobflow Step base class\n    \"\"\"\n    def jar(self):\n        \"\"\"\n        :rtype: str\n        :return: URI to the jar\n        \"\"\"\n        raise NotImplemented()\n\n    def args(self):\n        \"\"\"\n        :rtype: list(str)\n        :return: List of arguments for the step\n        \"\"\"\n        raise NotImplemented()\n\n    def main_class(self):\n        \"\"\"\n        :rtype: str\n        :return: The main class name\n        \"\"\"\n        raise NotImplemented()\n\n\nclass JarStep(Step):\n    \"\"\"\n    Custom jar step\n    \"\"\"\n    def __init__(self, name, jar, main_class=None,\n                 action_on_failure='TERMINATE_JOB_FLOW', step_args=None):\n        \"\"\"\n        A elastic mapreduce step that executes a jar\n\n        :type name: str\n        :param name: The name of the step\n        :type jar: str\n        :param jar: S3 URI to the Jar file\n        :type main_class: str\n        :param main_class: The class to execute in the jar\n        :type action_on_failure: str\n        :param action_on_failure: An action, defined in the EMR docs to take on failure.\n        :type step_args: list(str)\n        :param step_args: A list of arguments to pass to the step\n        \"\"\"\n        self.name = name\n        self._jar = jar\n        self._main_class = main_class\n        self.action_on_failure = action_on_failure\n\n        if isinstance(step_args, basestring):\n            step_args = [step_args]\n\n        self.step_args = step_args\n\n    def jar(self):\n        return self._jar\n\n    def args(self):\n        args = []\n\n        if self.step_args:\n            args.extend(self.step_args)\n\n        return args\n\n    def main_class(self):\n        return self._main_class\n\n\nclass StreamingStep(Step):\n    \"\"\"\n    Hadoop streaming step\n    \"\"\"\n    def __init__(self, name, mapper, reducer=None, combiner=None,\n                 action_on_failure='TERMINATE_JOB_FLOW',\n                 cache_files=None, cache_archives=None,\n                 step_args=None, input=None, output=None,\n                 jar='/home/hadoop/contrib/streaming/hadoop-streaming.jar'):\n        \"\"\"\n        A hadoop streaming elastic mapreduce step\n\n        :type name: str\n        :param name: The name of the step\n        :type mapper: str\n        :param mapper: The mapper URI\n        :type reducer: str\n        :param reducer: The reducer URI\n        :type combiner: str\n        :param combiner: The combiner URI. Only works for Hadoop 0.20 and later!\n        :type action_on_failure: str\n        :param action_on_failure: An action, defined in the EMR docs to take on failure.\n        :type cache_files: list(str)\n        :param cache_files: A list of cache files to be bundled with the job\n        :type cache_archives: list(str)\n        :param cache_archives: A list of jar archives to be bundled with the job\n        :type step_args: list(str)\n        :param step_args: A list of arguments to pass to the step\n        :type input: str or a list of str\n        :param input: The input uri\n        :type output: str\n        :param output: The output uri\n        :type jar: str\n        :param jar: The hadoop streaming jar. This can be either a local path on the master node, or an s3:// URI.\n        \"\"\"\n        self.name = name\n        self.mapper = mapper\n        self.reducer = reducer\n        self.combiner = combiner\n        self.action_on_failure = action_on_failure\n        self.cache_files = cache_files\n        self.cache_archives = cache_archives\n        self.input = input\n        self.output = output\n        self._jar = jar\n\n        if isinstance(step_args, basestring):\n            step_args = [step_args]\n\n        self.step_args = step_args\n\n    def jar(self):\n        return self._jar\n\n    def main_class(self):\n        return None\n\n    def args(self):\n        args = []\n\n        # put extra args BEFORE -mapper and -reducer so that e.g. -libjar\n        # will work\n        if self.step_args:\n            args.extend(self.step_args)\n\n        args.extend(['-mapper', self.mapper])\n\n        if self.combiner:\n            args.extend(['-combiner', self.combiner])\n\n        if self.reducer:\n            args.extend(['-reducer', self.reducer])\n        else:\n            args.extend(['-jobconf', 'mapred.reduce.tasks=0'])\n\n        if self.input:\n            if isinstance(self.input, list):\n                for input in self.input:\n                    args.extend(('-input', input))\n            else:\n                args.extend(('-input', self.input))\n        if self.output:\n            args.extend(('-output', self.output))\n\n        if self.cache_files:\n            for cache_file in self.cache_files:\n                args.extend(('-cacheFile', cache_file))\n\n        if self.cache_archives:\n           for cache_archive in self.cache_archives:\n                args.extend(('-cacheArchive', cache_archive))\n\n        return args\n\n    def __repr__(self):\n        return '%s.%s(name=%r, mapper=%r, reducer=%r, action_on_failure=%r, cache_files=%r, cache_archives=%r, step_args=%r, input=%r, output=%r, jar=%r)' % (\n            self.__class__.__module__, self.__class__.__name__,\n            self.name, self.mapper, self.reducer, self.action_on_failure,\n            self.cache_files, self.cache_archives, self.step_args,\n            self.input, self.output, self._jar)\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/exception.py",
    "content": "# Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/\n# Copyright (c) 2010, Eucalyptus Systems, Inc.\n# All rights reserved.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\n\"\"\"\nException classes - Subclassing allows you to check for specific errors\n\"\"\"\nimport base64\nimport xml.sax\nfrom boto import handler\nfrom boto.resultset import ResultSet\n\n\nclass BotoClientError(StandardError):\n    \"\"\"\n    General Boto Client error (error accessing AWS)\n    \"\"\"\n\n    def __init__(self, reason, *args):\n        StandardError.__init__(self, reason, *args)\n        self.reason = reason\n\n    def __repr__(self):\n        return 'BotoClientError: %s' % self.reason\n\n    def __str__(self):\n        return 'BotoClientError: %s' % self.reason\n\nclass SDBPersistenceError(StandardError):\n\n    pass\n\nclass StoragePermissionsError(BotoClientError):\n    \"\"\"\n    Permissions error when accessing a bucket or key on a storage service.\n    \"\"\"\n    pass\n\nclass S3PermissionsError(StoragePermissionsError):\n    \"\"\"\n    Permissions error when accessing a bucket or key on S3.\n    \"\"\"\n    pass\n\nclass GSPermissionsError(StoragePermissionsError):\n    \"\"\"\n    Permissions error when accessing a bucket or key on GS.\n    \"\"\"\n    pass\n\nclass BotoServerError(StandardError):\n\n    def __init__(self, status, reason, body=None, *args):\n        StandardError.__init__(self, status, reason, body, *args)\n        self.status = status\n        self.reason = reason\n        self.body = body or ''\n        self.request_id = None\n        self.error_code = None\n        self.error_message = None\n        self.box_usage = None\n\n        # Attempt to parse the error response. If body isn't present,\n        # then just ignore the error response.\n        if self.body:\n            try:\n                h = handler.XmlHandler(self, self)\n                xml.sax.parseString(self.body, h)\n            except xml.sax.SAXParseException, pe:\n                # Remove unparsable message body so we don't include garbage\n                # in exception. But first, save self.body in self.error_message\n                # because occasionally we get error messages from Eucalyptus\n                # that are just text strings that we want to preserve.\n                self.error_message = self.body\n                self.body = None\n\n    def __getattr__(self, name):\n        if name == 'message':\n            return self.error_message\n        if name == 'code':\n            return self.error_code\n        raise AttributeError\n\n    def __repr__(self):\n        return '%s: %s %s\\n%s' % (self.__class__.__name__,\n                                  self.status, self.reason, self.body)\n\n    def __str__(self):\n        return '%s: %s %s\\n%s' % (self.__class__.__name__,\n                                  self.status, self.reason, self.body)\n\n    def startElement(self, name, attrs, connection):\n        pass\n\n    def endElement(self, name, value, connection):\n        if name in ('RequestId', 'RequestID'):\n            self.request_id = value\n        elif name == 'Code':\n            self.error_code = value\n        elif name == 'Message':\n            self.error_message = value\n        elif name == 'BoxUsage':\n            self.box_usage = value\n        return None\n\n    def _cleanupParsedProperties(self):\n        self.request_id = None\n        self.error_code = None\n        self.error_message = None\n        self.box_usage = None\n\nclass ConsoleOutput:\n\n    def __init__(self, parent=None):\n        self.parent = parent\n        self.instance_id = None\n        self.timestamp = None\n        self.comment = None\n        self.output = None\n\n    def startElement(self, name, attrs, connection):\n        return None\n\n    def endElement(self, name, value, connection):\n        if name == 'instanceId':\n            self.instance_id = value\n        elif name == 'output':\n            self.output = base64.b64decode(value)\n        else:\n            setattr(self, name, value)\n\nclass StorageCreateError(BotoServerError):\n    \"\"\"\n    Error creating a bucket or key on a storage service.\n    \"\"\"\n    def __init__(self, status, reason, body=None):\n        self.bucket = None\n        BotoServerError.__init__(self, status, reason, body)\n\n    def endElement(self, name, value, connection):\n        if name == 'BucketName':\n            self.bucket = value\n        else:\n            return BotoServerError.endElement(self, name, value, connection)\n\nclass S3CreateError(StorageCreateError):\n    \"\"\"\n    Error creating a bucket or key on S3.\n    \"\"\"\n    pass\n\nclass GSCreateError(StorageCreateError):\n    \"\"\"\n    Error creating a bucket or key on GS.\n    \"\"\"\n    pass\n\nclass StorageCopyError(BotoServerError):\n    \"\"\"\n    Error copying a key on a storage service.\n    \"\"\"\n    pass\n\nclass S3CopyError(StorageCopyError):\n    \"\"\"\n    Error copying a key on S3.\n    \"\"\"\n    pass\n\nclass GSCopyError(StorageCopyError):\n    \"\"\"\n    Error copying a key on GS.\n    \"\"\"\n    pass\n\nclass SQSError(BotoServerError):\n    \"\"\"\n    General Error on Simple Queue Service.\n    \"\"\"\n    def __init__(self, status, reason, body=None):\n        self.detail = None\n        self.type = None\n        BotoServerError.__init__(self, status, reason, body)\n\n    def startElement(self, name, attrs, connection):\n        return BotoServerError.startElement(self, name, attrs, connection)\n\n    def endElement(self, name, value, connection):\n        if name == 'Detail':\n            self.detail = value\n        elif name == 'Type':\n            self.type = value\n        else:\n            return BotoServerError.endElement(self, name, value, connection)\n\n    def _cleanupParsedProperties(self):\n        BotoServerError._cleanupParsedProperties(self)\n        for p in ('detail', 'type'):\n            setattr(self, p, None)\n\nclass SQSDecodeError(BotoClientError):\n    \"\"\"\n    Error when decoding an SQS message.\n    \"\"\"\n    def __init__(self, reason, message):\n        BotoClientError.__init__(self, reason, message)\n        self.message = message\n\n    def __repr__(self):\n        return 'SQSDecodeError: %s' % self.reason\n\n    def __str__(self):\n        return 'SQSDecodeError: %s' % self.reason\n\nclass StorageResponseError(BotoServerError):\n    \"\"\"\n    Error in response from a storage service.\n    \"\"\"\n    def __init__(self, status, reason, body=None):\n        self.resource = None\n        BotoServerError.__init__(self, status, reason, body)\n\n    def startElement(self, name, attrs, connection):\n        return BotoServerError.startElement(self, name, attrs, connection)\n\n    def endElement(self, name, value, connection):\n        if name == 'Resource':\n            self.resource = value\n        else:\n            return BotoServerError.endElement(self, name, value, connection)\n\n    def _cleanupParsedProperties(self):\n        BotoServerError._cleanupParsedProperties(self)\n        for p in ('resource'):\n            setattr(self, p, None)\n\nclass S3ResponseError(StorageResponseError):\n    \"\"\"\n    Error in response from S3.\n    \"\"\"\n    pass\n\nclass GSResponseError(StorageResponseError):\n    \"\"\"\n    Error in response from GS.\n    \"\"\"\n    pass\n\nclass EC2ResponseError(BotoServerError):\n    \"\"\"\n    Error in response from EC2.\n    \"\"\"\n\n    def __init__(self, status, reason, body=None):\n        self.errors = None\n        self._errorResultSet = []\n        BotoServerError.__init__(self, status, reason, body)\n        self.errors = [ (e.error_code, e.error_message) \\\n                for e in self._errorResultSet ]\n        if len(self.errors):\n            self.error_code, self.error_message = self.errors[0]\n\n    def startElement(self, name, attrs, connection):\n        if name == 'Errors':\n            self._errorResultSet = ResultSet([('Error', _EC2Error)])\n            return self._errorResultSet\n        else:\n            return None\n\n    def endElement(self, name, value, connection):\n        if name == 'RequestID':\n            self.request_id = value\n        else:\n            return None # don't call subclass here\n\n    def _cleanupParsedProperties(self):\n        BotoServerError._cleanupParsedProperties(self)\n        self._errorResultSet = []\n        for p in ('errors'):\n            setattr(self, p, None)\n\nclass EmrResponseError(BotoServerError):\n    \"\"\"\n    Error in response from EMR\n    \"\"\"\n    pass\n\nclass _EC2Error:\n\n    def __init__(self, connection=None):\n        self.connection = connection\n        self.error_code = None\n        self.error_message = None\n\n    def startElement(self, name, attrs, connection):\n        return None\n\n    def endElement(self, name, value, connection):\n        if name == 'Code':\n            self.error_code = value\n        elif name == 'Message':\n            self.error_message = value\n        else:\n            return None\n\nclass SDBResponseError(BotoServerError):\n    \"\"\"\n    Error in responses from SDB.\n    \"\"\"\n    pass\n\nclass AWSConnectionError(BotoClientError):\n    \"\"\"\n    General error connecting to Amazon Web Services.\n    \"\"\"\n    pass\n\nclass StorageDataError(BotoClientError):\n    \"\"\"\n    Error receiving data from a storage service.\n    \"\"\"\n    pass\n\nclass S3DataError(StorageDataError):\n    \"\"\"\n    Error receiving data from S3.\n    \"\"\"\n    pass\n\nclass GSDataError(StorageDataError):\n    \"\"\"\n    Error receiving data from GS.\n    \"\"\"\n    pass\n\nclass FPSResponseError(BotoServerError):\n    pass\n\nclass InvalidUriError(Exception):\n    \"\"\"Exception raised when URI is invalid.\"\"\"\n\n    def __init__(self, message):\n        Exception.__init__(self, message)\n        self.message = message\n\nclass InvalidAclError(Exception):\n    \"\"\"Exception raised when ACL XML is invalid.\"\"\"\n\n    def __init__(self, message):\n        Exception.__init__(self, message)\n        self.message = message\n\nclass NoAuthHandlerFound(Exception):\n    \"\"\"Is raised when no auth handlers were found ready to authenticate.\"\"\"\n    pass\n\nclass TooManyAuthHandlerReadyToAuthenticate(Exception):\n    \"\"\"Is raised when there are more than one auth handler ready.\n\n    In normal situation there should only be one auth handler that is ready to\n    authenticate. In case where more than one auth handler is ready to\n    authenticate, we raise this exception, to prevent unpredictable behavior\n    when multiple auth handlers can handle a particular case and the one chosen\n    depends on the order they were checked.\n    \"\"\"\n    pass\n\n# Enum class for resumable upload failure disposition.\nclass ResumableTransferDisposition(object):\n    # START_OVER means an attempt to resume an existing transfer failed,\n    # and a new resumable upload should be attempted (without delay).\n    START_OVER = 'START_OVER'\n\n    # WAIT_BEFORE_RETRY means the resumable transfer failed but that it can\n    # be retried after a time delay within the current process.\n    WAIT_BEFORE_RETRY = 'WAIT_BEFORE_RETRY'\n\n    # ABORT_CUR_PROCESS means the resumable transfer failed and that\n    # delaying/retrying within the current process will not help. If\n    # resumable transfer included a state tracker file the upload can be\n    # retried again later, in another process (e.g., a later run of gsutil).\n    ABORT_CUR_PROCESS = 'ABORT_CUR_PROCESS'\n\n    # ABORT means the resumable transfer failed in a way that it does not\n    # make sense to continue in the current process, and further that the \n    # current tracker ID should not be preserved (in a tracker file if one\n    # was specified at resumable upload start time). If the user tries again\n    # later (e.g., a separate run of gsutil) it will get a new resumable\n    # upload ID.\n    ABORT = 'ABORT'\n\nclass ResumableUploadException(Exception):\n    \"\"\"\n    Exception raised for various resumable upload problems.\n\n    self.disposition is of type ResumableTransferDisposition.\n    \"\"\"\n\n    def __init__(self, message, disposition):\n        Exception.__init__(self, message, disposition)\n        self.message = message\n        self.disposition = disposition\n\n    def __repr__(self):\n        return 'ResumableUploadException(\"%s\", %s)' % (\n            self.message, self.disposition)\n\nclass ResumableDownloadException(Exception):\n    \"\"\"\n    Exception raised for various resumable download problems.\n\n    self.disposition is of type ResumableTransferDisposition.\n    \"\"\"\n\n    def __init__(self, message, disposition):\n        Exception.__init__(self, message, disposition)\n        self.message = message\n        self.disposition = disposition\n\n    def __repr__(self):\n        return 'ResumableDownloadException(\"%s\", %s)' % (\n            self.message, self.disposition)\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/file/__init__.py",
    "content": "# Copyright 2010 Google Inc.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nimport boto\n\nfrom connection import FileConnection as Connection\nfrom key import Key\nfrom bucket import Bucket\n\n__all__ = ['Connection', 'Key', 'Bucket']\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/file/bucket.py",
    "content": "# Copyright 2010 Google Inc.\n# Copyright (c) 2011, Nexenta Systems Inc.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\n# File representation of bucket, for use with \"file://\" URIs.\n\nimport os\nfrom key import Key\nfrom boto.file.simpleresultset import SimpleResultSet\nfrom boto.s3.bucketlistresultset import BucketListResultSet\n\nclass Bucket(object):\n    def __init__(self, name, contained_key):\n        \"\"\"Instantiate an anonymous file-based Bucket around a single key.\n        \"\"\"\n        self.name = name\n        self.contained_key = contained_key\n\n    def __iter__(self):\n        return iter(BucketListResultSet(self))\n\n    def __str__(self):\n        return 'anonymous bucket for file://' + self.contained_key\n\n    def delete_key(self, key_name, headers=None,\n                   version_id=None, mfa_token=None):\n        \"\"\"\n        Deletes a key from the bucket.\n\n        :type key_name: string\n        :param key_name: The key name to delete\n\n        :type version_id: string\n        :param version_id: Unused in this subclass.\n\n        :type mfa_token: tuple or list of strings\n        :param mfa_token: Unused in this subclass.\n        \"\"\"\n        os.remove(key_name)\n\n    def get_all_keys(self, headers=None, **params):\n        \"\"\"\n        This method returns the single key around which this anonymous Bucket\n        was instantiated.\n\n        :rtype: SimpleResultSet\n        :return: The result from file system listing the keys requested\n\n        \"\"\"\n        key = Key(self.name, self.contained_key)\n        return SimpleResultSet([key])\n\n    def get_key(self, key_name, headers=None, version_id=None,\n                                            key_type=Key.KEY_REGULAR_FILE):\n        \"\"\"\n        Check to see if a particular key exists within the bucket.\n        Returns: An instance of a Key object or None\n\n        :type key_name: string\n        :param key_name: The name of the key to retrieve\n\n        :type version_id: string\n        :param version_id: Unused in this subclass.\n\n        :type stream_type: integer\n        :param stream_type: Type of the Key - Regular File or input/output Stream\n\n        :rtype: :class:`boto.file.key.Key`\n        :returns: A Key object from this bucket.\n        \"\"\"\n        if key_name == '-':\n            return Key(self.name, '-', key_type=Key.KEY_STREAM_READABLE)\n        else:\n            fp = open(key_name, 'rb')\n            return Key(self.name, key_name, fp)\n\n    def new_key(self, key_name=None, key_type=Key.KEY_REGULAR_FILE):\n        \"\"\"\n        Creates a new key\n\n        :type key_name: string\n        :param key_name: The name of the key to create\n\n        :rtype: :class:`boto.file.key.Key`\n        :returns: An instance of the newly created key object\n        \"\"\"\n        if key_name == '-':\n            return Key(self.name, '-', key_type=Key.KEY_STREAM_WRITABLE)\n        else:\n            dir_name = os.path.dirname(key_name)\n            if dir_name and not os.path.exists(dir_name):\n                os.makedirs(dir_name)\n            fp = open(key_name, 'wb')\n            return Key(self.name, key_name, fp)\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/file/connection.py",
    "content": "# Copyright 2010 Google Inc.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\n# File representation of connection, for use with \"file://\" URIs.\n\nfrom bucket import Bucket\n\nclass FileConnection(object):\n\n    def __init__(self, file_storage_uri):\n        # FileConnections are per-file storage URI.\n        self.file_storage_uri = file_storage_uri\n\n    def get_bucket(self, bucket_name, validate=True, headers=None):\n        return Bucket(bucket_name, self.file_storage_uri.object_name)\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/file/key.py",
    "content": "# Copyright 2010 Google Inc.\n# Copyright (c) 2011, Nexenta Systems Inc.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\n# File representation of key, for use with \"file://\" URIs.\n\nimport os, shutil, StringIO\nimport sys\n\nclass Key(object):\n\n    KEY_STREAM_READABLE = 0x01\n    KEY_STREAM_WRITABLE = 0x02\n    KEY_STREAM          = (KEY_STREAM_READABLE | KEY_STREAM_WRITABLE)\n    KEY_REGULAR_FILE    = 0x00\n\n    def __init__(self, bucket, name, fp=None, key_type=KEY_REGULAR_FILE):\n        self.bucket = bucket\n        self.full_path = name\n        if name == '-':\n            self.name = None\n        else:\n            self.name = name\n        self.key_type = key_type\n        if key_type == self.KEY_STREAM_READABLE:\n            self.fp = sys.stdin\n            self.full_path = '<STDIN>'\n        elif key_type == self.KEY_STREAM_WRITABLE:\n            self.fp = sys.stdout\n            self.full_path = '<STDOUT>'\n        else:\n            self.fp = fp\n\n    def __str__(self):\n        return 'file://' + self.full_path\n\n    def get_file(self, fp, headers=None, cb=None, num_cb=10, torrent=False):\n        \"\"\"\n        Retrieves a file from a Key\n\n        :type fp: file\n        :param fp: File pointer to put the data into\n\n        :type headers: string\n        :param: ignored in this subclass.\n\n        :type cb: function\n        :param cb: ignored in this subclass.\n\n        :type cb: int\n        :param num_cb: ignored in this subclass.\n        \"\"\"\n        if self.key_type & self.KEY_STREAM_READABLE:\n            raise BotoClientError('Stream is not Readable')\n        elif self.key_type & self.KEY_STREAM_WRITABLE:\n            key_file = self.fp\n        else:\n            key_file = open(self.full_path, 'rb')\n        shutil.copyfileobj(key_file, fp)\n\n    def set_contents_from_file(self, fp, headers=None, replace=True, cb=None,\n                               num_cb=10, policy=None, md5=None):\n        \"\"\"\n        Store an object in a file using the name of the Key object as the\n        key in file URI and the contents of the file pointed to by 'fp' as the\n        contents.\n\n        :type fp: file\n        :param fp: the file whose contents to upload\n\n        :type headers: dict\n        :param headers: ignored in this subclass.\n\n        :type replace: bool\n        :param replace: If this parameter is False, the method\n                        will first check to see if an object exists in the\n                        bucket with the same key.  If it does, it won't\n                        overwrite it.  The default value is True which will\n                        overwrite the object.\n\n        :type cb: function\n        :param cb: ignored in this subclass.\n\n        :type cb: int\n        :param num_cb: ignored in this subclass.\n\n        :type policy: :class:`boto.s3.acl.CannedACLStrings`\n        :param policy: ignored in this subclass.\n\n        :type md5: A tuple containing the hexdigest version of the MD5 checksum\n                   of the file as the first element and the Base64-encoded\n                   version of the plain checksum as the second element.\n                   This is the same format returned by the compute_md5 method.\n        :param md5: ignored in this subclass.\n        \"\"\"\n        if self.key_type & self.KEY_STREAM_WRITABLE:\n            raise BotoClientError('Stream is not writable')\n        elif self.key_type & self.KEY_STREAM_READABLE:\n            key_file = self.fp\n        else:\n            if not replace and os.path.exists(self.full_path):\n                return\n            key_file = open(self.full_path, 'wb')\n        shutil.copyfileobj(fp, key_file)\n        key_file.close()\n\n    def get_contents_as_string(self, headers=None, cb=None, num_cb=10,\n                               torrent=False):\n        \"\"\"\n        Retrieve file data from the Key, and return contents as a string.\n\n        :type headers: dict\n        :param headers: ignored in this subclass.\n\n        :type cb: function\n        :param cb: ignored in this subclass.\n\n        :type cb: int\n        :param num_cb: ignored in this subclass.\n\n        :type cb: int\n        :param num_cb: ignored in this subclass.\n\n        :type torrent: bool\n        :param torrent: ignored in this subclass.\n\n        :rtype: string\n        :returns: The contents of the file as a string\n        \"\"\"\n\n        fp = StringIO.StringIO()\n        self.get_contents_to_file(fp)\n        return fp.getvalue()\n\n    def is_stream(self):\n        return (self.key_type & self.KEY_STREAM)\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/file/simpleresultset.py",
    "content": "# Copyright 2010 Google Inc.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nclass SimpleResultSet(list):\n    \"\"\"\n    ResultSet facade built from a simple list, rather than via XML parsing.\n    \"\"\"\n\n    def __init__(self, input_list):\n        for x in input_list:\n            self.append(x)\n        self.is_truncated = False\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/fps/__init__.py",
    "content": "# Copyright (c) 2008, Chris Moyer http://coredumped.org\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n#\n\n\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/fps/connection.py",
    "content": "# Copyright (c) 2008 Chris Moyer http://coredumped.org/\n# Copyringt (c) 2010 Jason R. Coombs http://www.jaraco.com/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nimport base64\nimport hmac\nimport hashlib\nimport urllib\nimport xml.sax\nimport uuid\nimport boto\nimport boto.utils\nfrom boto import handler\nfrom boto.connection import AWSQueryConnection\nfrom boto.resultset import ResultSet\nfrom boto.exception import FPSResponseError\n\nclass FPSConnection(AWSQueryConnection):\n\n    APIVersion = '2007-01-08'\n\n    def __init__(self, aws_access_key_id=None, aws_secret_access_key=None,\n                 is_secure=True, port=None, proxy=None, proxy_port=None,\n                 proxy_user=None, proxy_pass=None,\n                 host='fps.sandbox.amazonaws.com', debug=0,\n                 https_connection_factory=None, path=\"/\"):\n        AWSQueryConnection.__init__(self, aws_access_key_id,\n                                    aws_secret_access_key,\n                                    is_secure, port, proxy, proxy_port,\n                                    proxy_user, proxy_pass, host, debug,\n                                    https_connection_factory, path)\n    \n    def _required_auth_capability(self):\n        return ['fps']\n\n    def install_payment_instruction(self, instruction,\n                                    token_type=\"Unrestricted\",\n                                    transaction_id=None):\n        \"\"\"\n        InstallPaymentInstruction\n        instruction: The PaymentInstruction to send, for example: \n        \n            MyRole=='Caller' orSay 'Roles do not match';\n        \n        token_type: Defaults to \"Unrestricted\"\n        transaction_id: Defaults to a new ID\n        \"\"\"\n\n        if(transaction_id == None):\n            transaction_id = uuid.uuid4()\n        params = {}\n        params['PaymentInstruction'] = instruction\n        params['TokenType'] = token_type\n        params['CallerReference'] = transaction_id\n        response = self.make_request(\"InstallPaymentInstruction\", params)\n        return response\n    \n    def install_caller_instruction(self, token_type=\"Unrestricted\",\n                                   transaction_id=None):\n        \"\"\"\n        Set us up as a caller\n        This will install a new caller_token into the FPS section.\n        This should really only be called to regenerate the caller token.\n        \"\"\"\n        response = self.install_payment_instruction(\"MyRole=='Caller';\",\n                                                    token_type=token_type,\n                                                    transaction_id=transaction_id)\n        body = response.read()\n        if(response.status == 200):\n            rs = ResultSet()\n            h = handler.XmlHandler(rs, self)\n            xml.sax.parseString(body, h)\n            caller_token = rs.TokenId\n            try:\n                boto.config.save_system_option(\"FPS\", \"caller_token\",\n                                               caller_token)\n            except(IOError):\n                boto.config.save_user_option(\"FPS\", \"caller_token\",\n                                             caller_token)\n            return caller_token\n        else:\n            raise FPSResponseError(response.status, response.reason, body)\n\n    def install_recipient_instruction(self, token_type=\"Unrestricted\",\n                                      transaction_id=None):\n        \"\"\"\n        Set us up as a Recipient\n        This will install a new caller_token into the FPS section.\n        This should really only be called to regenerate the recipient token.\n        \"\"\"\n        response = self.install_payment_instruction(\"MyRole=='Recipient';\",\n                                                    token_type=token_type,\n                                                    transaction_id=transaction_id)\n        body = response.read()\n        if(response.status == 200):\n            rs = ResultSet()\n            h = handler.XmlHandler(rs, self)\n            xml.sax.parseString(body, h)\n            recipient_token = rs.TokenId\n            try:\n                boto.config.save_system_option(\"FPS\", \"recipient_token\",\n                                               recipient_token)\n            except(IOError):\n                boto.config.save_user_option(\"FPS\", \"recipient_token\",\n                                             recipient_token)\n\n            return recipient_token\n        else:\n            raise FPSResponseError(response.status, response.reason, body)\n\n    def make_marketplace_registration_url(self, returnURL, pipelineName,\n                                          maxFixedFee=0.0, maxVariableFee=0.0,\n                                          recipientPaysFee=True, **params):  \n        \"\"\"\n        Generate the URL with the signature required for signing up a recipient\n        \"\"\"\n        # use the sandbox authorization endpoint if we're using the\n        #  sandbox for API calls.\n        endpoint_host = 'authorize.payments.amazon.com'\n        if 'sandbox' in self.host:\n            endpoint_host = 'authorize.payments-sandbox.amazon.com'\n        base = \"/cobranded-ui/actions/start\"\n\n        params['callerKey'] = str(self.aws_access_key_id)\n        params['returnURL'] = str(returnURL)\n        params['pipelineName'] = str(pipelineName)\n        params['maxFixedFee'] = str(maxFixedFee)\n        params['maxVariableFee'] = str(maxVariableFee)\n        params['recipientPaysFee'] = str(recipientPaysFee)\n        params[\"signatureMethod\"] = 'HmacSHA256'\n        params[\"signatureVersion\"] = '2'\n\n        if(not params.has_key('callerReference')):\n            params['callerReference'] = str(uuid.uuid4())\n\n        parts = ''\n        for k in sorted(params.keys()):\n            parts += \"&%s=%s\" % (k, urllib.quote(params[k], '~'))\n\n        canonical = '\\n'.join(['GET',\n                               str(endpoint_host).lower(),\n                               base,\n                               parts[1:]])\n\n        signature = self._auth_handler.sign_string(canonical)\n        params[\"signature\"] = signature\n\n        urlsuffix = ''\n        for k in sorted(params.keys()):\n            urlsuffix += \"&%s=%s\" % (k, urllib.quote(params[k], '~'))\n        urlsuffix = urlsuffix[1:] # strip the first &\n        \n        fmt = \"https://%(endpoint_host)s%(base)s?%(urlsuffix)s\"\n        final = fmt % vars()\n        return final\n\n\n    def make_url(self, returnURL, paymentReason, pipelineName,\n                 transactionAmount, **params):\n        \"\"\"\n        Generate the URL with the signature required for a transaction\n        \"\"\"\n        # use the sandbox authorization endpoint if we're using the\n        #  sandbox for API calls.\n        endpoint_host = 'authorize.payments.amazon.com'\n        if 'sandbox' in self.host:\n            endpoint_host = 'authorize.payments-sandbox.amazon.com'\n        base = \"/cobranded-ui/actions/start\"\n\n        params['callerKey'] = str(self.aws_access_key_id)\n        params['returnURL'] = str(returnURL)\n        params['paymentReason'] = str(paymentReason)\n        params['pipelineName'] = pipelineName\n        params['transactionAmount'] = transactionAmount\n        params[\"signatureMethod\"] = 'HmacSHA256'\n        params[\"signatureVersion\"] = '2'\n        \n        if(not params.has_key('callerReference')):\n            params['callerReference'] = str(uuid.uuid4())\n\n        parts = ''\n        for k in sorted(params.keys()):\n            parts += \"&%s=%s\" % (k, urllib.quote(params[k], '~'))\n\n        canonical = '\\n'.join(['GET',\n                               str(endpoint_host).lower(),\n                               base,\n                               parts[1:]])\n\n        signature = self._auth_handler.sign_string(canonical)\n        params[\"signature\"] = signature\n\n        urlsuffix = ''\n        for k in sorted(params.keys()):\n            urlsuffix += \"&%s=%s\" % (k, urllib.quote(params[k], '~'))\n        urlsuffix = urlsuffix[1:] # strip the first &\n        \n        fmt = \"https://%(endpoint_host)s%(base)s?%(urlsuffix)s\"\n        final = fmt % vars()\n        return final\n\n    def pay(self, transactionAmount, senderTokenId,\n            recipientTokenId=None, callerTokenId=None,\n            chargeFeeTo=\"Recipient\",\n            callerReference=None, senderReference=None, recipientReference=None,\n            senderDescription=None, recipientDescription=None,\n            callerDescription=None, metadata=None,\n            transactionDate=None, reserve=False):\n        \"\"\"\n        Make a payment transaction. You must specify the amount.\n        This can also perform a Reserve request if 'reserve' is set to True.\n        \"\"\"\n        params = {}\n        params['SenderTokenId'] = senderTokenId\n        # this is for 2008-09-17 specification\n        params['TransactionAmount.Amount'] = str(transactionAmount)\n        params['TransactionAmount.CurrencyCode'] = \"USD\"\n        #params['TransactionAmount'] = str(transactionAmount)\n        params['ChargeFeeTo'] = chargeFeeTo\n        \n        params['RecipientTokenId'] = (\n            recipientTokenId if recipientTokenId is not None\n            else boto.config.get(\"FPS\", \"recipient_token\")\n            )\n        params['CallerTokenId'] = (\n            callerTokenId if callerTokenId is not None\n            else boto.config.get(\"FPS\", \"caller_token\")\n            )\n        if(transactionDate != None):\n            params['TransactionDate'] = transactionDate\n        if(senderReference != None):\n            params['SenderReference'] = senderReference\n        if(recipientReference != None):\n            params['RecipientReference'] = recipientReference\n        if(senderDescription != None):\n            params['SenderDescription'] = senderDescription\n        if(recipientDescription != None):\n            params['RecipientDescription'] = recipientDescription\n        if(callerDescription != None):\n            params['CallerDescription'] = callerDescription\n        if(metadata != None):\n            params['MetaData'] = metadata\n        if(callerReference == None):\n            callerReference = uuid.uuid4()\n        params['CallerReference'] = callerReference\n        \n        if reserve:\n            response = self.make_request(\"Reserve\", params)\n        else:\n            response = self.make_request(\"Pay\", params)\n        body = response.read()\n        if(response.status == 200):\n            rs = ResultSet()\n            h = handler.XmlHandler(rs, self)\n            xml.sax.parseString(body, h)\n            return rs\n        else:\n            raise FPSResponseError(response.status, response.reason, body)\n    \n    def get_transaction_status(self, transactionId):\n        \"\"\"\n        Returns the status of a given transaction.\n        \"\"\"\n        params = {}\n        params['TransactionId'] = transactionId\n    \n        response = self.make_request(\"GetTransactionStatus\", params)\n        body = response.read()\n        if(response.status == 200):\n            rs = ResultSet()\n            h = handler.XmlHandler(rs, self)\n            xml.sax.parseString(body, h)\n            return rs\n        else:\n            raise FPSResponseError(response.status, response.reason, body)\n    \n    def cancel(self, transactionId, description=None):\n        \"\"\"\n        Cancels a reserved or pending transaction.\n        \"\"\"\n        params = {}\n        params['transactionId'] = transactionId\n        if(description != None):\n            params['description'] = description\n        \n        response = self.make_request(\"Cancel\", params)\n        body = response.read()\n        if(response.status == 200):\n            rs = ResultSet()\n            h = handler.XmlHandler(rs, self)\n            xml.sax.parseString(body, h)\n            return rs\n        else:\n            raise FPSResponseError(response.status, response.reason, body)\n    \n    def settle(self, reserveTransactionId, transactionAmount=None):\n        \"\"\"\n        Charges for a reserved payment.\n        \"\"\"\n        params = {}\n        params['ReserveTransactionId'] = reserveTransactionId\n        if(transactionAmount != None):\n            params['TransactionAmount'] = transactionAmount\n        \n        response = self.make_request(\"Settle\", params)\n        body = response.read()\n        if(response.status == 200):\n            rs = ResultSet()\n            h = handler.XmlHandler(rs, self)\n            xml.sax.parseString(body, h)\n            return rs\n        else:\n            raise FPSResponseError(response.status, response.reason, body)\n    \n    def refund(self, callerReference, transactionId, refundAmount=None,\n               callerDescription=None):\n        \"\"\"\n        Refund a transaction. This refunds the full amount by default\n        unless 'refundAmount' is specified.\n        \"\"\"\n        params = {}\n        params['CallerReference'] = callerReference\n        params['TransactionId'] = transactionId\n        if(refundAmount != None):\n            params['RefundAmount'] = refundAmount\n        if(callerDescription != None):\n            params['CallerDescription'] = callerDescription\n        \n        response = self.make_request(\"Refund\", params)\n        body = response.read()\n        if(response.status == 200):\n            rs = ResultSet()\n            h = handler.XmlHandler(rs, self)\n            xml.sax.parseString(body, h)\n            return rs\n        else:\n            raise FPSResponseError(response.status, response.reason, body)\n    \n    def get_recipient_verification_status(self, recipientTokenId):\n        \"\"\"\n        Test that the intended recipient has a verified Amazon Payments account.\n        \"\"\"\n        params ={}\n        params['RecipientTokenId'] = recipientTokenId\n        \n        response = self.make_request(\"GetRecipientVerificationStatus\", params)\n        body = response.read()\n        if(response.status == 200):\n            rs = ResultSet()\n            h = handler.XmlHandler(rs, self)\n            xml.sax.parseString(body, h)\n            return rs\n        else:\n            raise FPSResponseError(response.status, response.reason, body)\n    \n    def get_token_by_caller_reference(self, callerReference):\n        \"\"\"\n        Returns details about the token specified by 'CallerReference'.\n        \"\"\"\n        params ={}\n        params['CallerReference'] = callerReference\n        \n        response = self.make_request(\"GetTokenByCaller\", params)\n        body = response.read()\n        if(response.status == 200):\n            rs = ResultSet()\n            h = handler.XmlHandler(rs, self)\n            xml.sax.parseString(body, h)\n            return rs\n        else:\n            raise FPSResponseError(response.status, response.reason, body)\n        \n    def get_token_by_caller_token(self, tokenId):\n        \"\"\"\n        Returns details about the token specified by 'TokenId'.\n        \"\"\"\n        params ={}\n        params['TokenId'] = tokenId\n        \n        response = self.make_request(\"GetTokenByCaller\", params)\n        body = response.read()\n        if(response.status == 200):\n            rs = ResultSet()\n            h = handler.XmlHandler(rs, self)\n            xml.sax.parseString(body, h)\n            return rs\n        else:\n            raise FPSResponseError(response.status, response.reason, body)\n\n    def verify_signature(self, end_point_url, http_parameters):\n        params = dict(\n            UrlEndPoint = end_point_url,\n            HttpParameters = http_parameters,\n            )\n        response = self.make_request(\"VerifySignature\", params)\n        body = response.read()\n        if(response.status != 200):\n            raise FPSResponseError(response.status, response.reason, body)\n        rs = ResultSet()\n        h = handler.XmlHandler(rs, self)\n        xml.sax.parseString(body, h)\n        return rs\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/gs/__init__.py",
    "content": "# Copyright 2010 Google Inc.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n#\n\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/gs/acl.py",
    "content": "# Copyright 2010 Google Inc.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nfrom boto.gs.user import User\nfrom boto.exception import InvalidAclError\n\nACCESS_CONTROL_LIST = 'AccessControlList'\nALL_AUTHENTICATED_USERS = 'AllAuthenticatedUsers'\nALL_USERS = 'AllUsers'\nDOMAIN = 'Domain'\nEMAIL_ADDRESS = 'EmailAddress'\nENTRY = 'Entry'\nENTRIES = 'Entries'\nGROUP_BY_DOMAIN = 'GroupByDomain'\nGROUP_BY_EMAIL = 'GroupByEmail'\nGROUP_BY_ID = 'GroupById'\nID = 'ID'\nNAME = 'Name'\nOWNER = 'Owner'\nPERMISSION = 'Permission'\nSCOPE = 'Scope'\nTYPE = 'type'\nUSER_BY_EMAIL = 'UserByEmail'\nUSER_BY_ID = 'UserById'\n\n\nCannedACLStrings = ['private', 'public-read', 'project-private',\n                    'public-read-write', 'authenticated-read',\n                    'bucket-owner-read', 'bucket-owner-full-control']\n\nSupportedPermissions = ['READ', 'WRITE', 'FULL_CONTROL']\n\nclass ACL:\n\n    def __init__(self, parent=None):\n        self.parent = parent\n        self.entries = []\n\n    @property\n    def acl(self):\n        return self\n\n    def __repr__(self):\n        # Owner is optional in GS ACLs.\n        if hasattr(self, 'owner'):\n            entries_repr = ['']\n        else:\n            entries_repr = ['Owner:%s' % self.owner.__repr__()]\n        acl_entries = self.entries\n        if acl_entries:\n            for e in acl_entries.entry_list:\n                entries_repr.append(e.__repr__())\n        return '<%s>' % ', '.join(entries_repr)\n\n    # Method with same signature as boto.s3.acl.ACL.add_email_grant(), to allow\n    # polymorphic treatment at application layer.\n    def add_email_grant(self, permission, email_address):\n        entry = Entry(type=USER_BY_EMAIL, email_address=email_address,\n                      permission=permission)\n        self.entries.entry_list.append(entry)\n\n    # Method with same signature as boto.s3.acl.ACL.add_user_grant(), to allow\n    # polymorphic treatment at application layer.\n    def add_user_grant(self, permission, user_id):\n        entry = Entry(permission=permission, type=USER_BY_ID, id=user_id)\n        self.entries.entry_list.append(entry)\n\n    def add_group_email_grant(self, permission, email_address):\n        entry = Entry(type=GROUP_BY_EMAIL, email_address=email_address,\n                      permission=permission)\n        self.entries.entry_list.append(entry)\n\n    def add_group_grant(self, permission, group_id):\n        entry = Entry(type=GROUP_BY_ID, id=group_id, permission=permission)\n        self.entries.entry_list.append(entry)\n\n    def startElement(self, name, attrs, connection):\n        if name == OWNER:\n            self.owner = User(self)\n            return self.owner\n        elif name == ENTRIES:\n            self.entries = Entries(self)\n            return self.entries\n        else:\n            return None\n\n    def endElement(self, name, value, connection):\n        if name == OWNER:\n            pass\n        elif name == ENTRIES:\n            pass\n        else:\n            setattr(self, name, value)\n\n    def to_xml(self):\n        s = '<%s>' % ACCESS_CONTROL_LIST\n        # Owner is optional in GS ACLs.\n        if hasattr(self, 'owner'):\n            s += self.owner.to_xml()\n        acl_entries = self.entries\n        if acl_entries:\n            s += acl_entries.to_xml()\n        s += '</%s>' % ACCESS_CONTROL_LIST\n        return s\n\n\nclass Entries:\n\n    def __init__(self, parent=None):\n        self.parent = parent\n        # Entries is the class that represents the same-named XML\n        # element. entry_list is the list within this class that holds the data.\n        self.entry_list = []\n\n    def __repr__(self):\n        entries_repr = []\n        for e in self.entry_list:\n            entries_repr.append(e.__repr__())\n        return '<Entries: %s>' % ', '.join(entries_repr)\n\n    def startElement(self, name, attrs, connection):\n        if name == ENTRY:\n            entry = Entry(self)\n            self.entry_list.append(entry)\n            return entry\n        else:\n            return None\n\n    def endElement(self, name, value, connection):\n        if name == ENTRY:\n            pass\n        else:\n            setattr(self, name, value)\n\n    def to_xml(self):\n        s = '<%s>' % ENTRIES\n        for entry in self.entry_list:\n            s += entry.to_xml()\n        s += '</%s>' % ENTRIES\n        return s\n        \n\n# Class that represents a single (Scope, Permission) entry in an ACL.\nclass Entry:\n\n    def __init__(self, scope=None, type=None, id=None, name=None,\n                 email_address=None, domain=None, permission=None):\n        if not scope:\n            scope = Scope(self, type, id, name, email_address, domain)\n        self.scope = scope\n        self.permission = permission\n\n    def __repr__(self):\n        return '<%s: %s>' % (self.scope.__repr__(), self.permission.__repr__())\n\n    def startElement(self, name, attrs, connection):\n        if name == SCOPE:\n            if not TYPE in attrs:\n                raise InvalidAclError('Missing \"%s\" in \"%s\" part of ACL' %\n                                      (TYPE, SCOPE))\n            self.scope = Scope(self, attrs[TYPE])\n            return self.scope\n        elif name == PERMISSION:\n            pass\n        else:\n            return None\n\n    def endElement(self, name, value, connection):\n        if name == SCOPE:\n            pass\n        elif name == PERMISSION:\n            value = value.strip()\n            if not value in SupportedPermissions:\n                raise InvalidAclError('Invalid Permission \"%s\"' % value)\n            self.permission = value\n        else:\n            setattr(self, name, value)\n\n    def to_xml(self):\n        s = '<%s>' % ENTRY\n        s += self.scope.to_xml()\n        s += '<%s>%s</%s>' % (PERMISSION, self.permission, PERMISSION)\n        s += '</%s>' % ENTRY\n        return s\n\nclass Scope:\n\n    # Map from Scope type to list of allowed sub-elems.\n    ALLOWED_SCOPE_TYPE_SUB_ELEMS = {\n        ALL_AUTHENTICATED_USERS : [],\n        ALL_USERS : [],\n        GROUP_BY_DOMAIN : [DOMAIN],\n        GROUP_BY_EMAIL : [EMAIL_ADDRESS, NAME],\n        GROUP_BY_ID : [ID, NAME],\n        USER_BY_EMAIL : [EMAIL_ADDRESS, NAME],\n        USER_BY_ID : [ID, NAME]\n    }\n\n    def __init__(self, parent, type=None, id=None, name=None,\n                 email_address=None, domain=None):\n        self.parent = parent\n        self.type = type\n        self.name = name\n        self.id = id\n        self.domain = domain\n        self.email_address = email_address\n        if not self.ALLOWED_SCOPE_TYPE_SUB_ELEMS.has_key(self.type):\n            raise InvalidAclError('Invalid %s %s \"%s\" ' %\n                                  (SCOPE, TYPE, self.type))\n\n    def __repr__(self):\n        named_entity = None\n        if self.id:\n            named_entity = self.id\n        elif self.email_address:\n            named_entity = self.email_address\n        elif self.domain:\n            named_entity = self.domain\n        if named_entity:\n            return '<%s: %s>' % (self.type, named_entity)\n        else:\n            return '<%s>' % self.type\n\n    def startElement(self, name, attrs, connection):\n        if not name in self.ALLOWED_SCOPE_TYPE_SUB_ELEMS[self.type]:\n            raise InvalidAclError('Element \"%s\" not allowed in %s %s \"%s\" ' %\n                                   (name, SCOPE, TYPE, self.type))\n        return None\n\n    def endElement(self, name, value, connection):\n        value = value.strip()\n        if name == DOMAIN:\n            self.domain = value\n        elif name == EMAIL_ADDRESS:\n            self.email_address = value\n        elif name == ID:\n            self.id = value\n        elif name == NAME:\n            self.name = value\n        else:\n            setattr(self, name, value)\n\n    def to_xml(self):\n        s = '<%s type=\"%s\">' % (SCOPE, self.type)\n        if self.type == ALL_AUTHENTICATED_USERS or self.type == ALL_USERS:\n            pass\n        elif self.type == GROUP_BY_DOMAIN:\n            s += '<%s>%s</%s>' % (DOMAIN, self.domain, DOMAIN)\n        elif self.type == GROUP_BY_EMAIL or self.type == USER_BY_EMAIL:\n            s += '<%s>%s</%s>' % (EMAIL_ADDRESS, self.email_address,\n                                  EMAIL_ADDRESS)\n            if self.name:\n              s += '<%s>%s</%s>' % (NAME, self.name, NAME)\n        elif self.type == GROUP_BY_ID or self.type == USER_BY_ID:\n            s += '<%s>%s</%s>' % (ID, self.id, ID)\n            if self.name:\n              s += '<%s>%s</%s>' % (NAME, self.name, NAME)\n        else:\n            raise InvalidAclError('Invalid scope type \"%s\" ', self.type)\n\n        s += '</%s>' % SCOPE\n        return s\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/gs/bucket.py",
    "content": "# Copyright 2010 Google Inc.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nimport boto\nfrom boto import handler\nfrom boto.exception import InvalidAclError\nfrom boto.gs.acl import ACL, CannedACLStrings\nfrom boto.gs.acl import SupportedPermissions as GSPermissions\nfrom boto.gs.key import Key as GSKey\nfrom boto.s3.acl import Policy\nfrom boto.s3.bucket import Bucket as S3Bucket\nimport xml.sax\n\nclass Bucket(S3Bucket):\n\n    def __init__(self, connection=None, name=None, key_class=GSKey):\n        super(Bucket, self).__init__(connection, name, key_class)\n\n    def set_acl(self, acl_or_str, key_name='', headers=None, version_id=None):\n        if isinstance(acl_or_str, Policy):\n            raise InvalidAclError('Attempt to set S3 Policy on GS ACL')\n        elif isinstance(acl_or_str, ACL):\n            self.set_xml_acl(acl_or_str.to_xml(), key_name, headers=headers)\n        else:\n            self.set_canned_acl(acl_or_str, key_name, headers=headers)\n\n    def get_acl(self, key_name='', headers=None, version_id=None):\n        response = self.connection.make_request('GET', self.name, key_name,\n                query_args='acl', headers=headers)\n        body = response.read()\n        if response.status == 200:\n            acl = ACL(self)\n            h = handler.XmlHandler(acl, self)\n            xml.sax.parseString(body, h)\n            return acl\n        else:\n            raise self.connection.provider.storage_response_error(\n                response.status, response.reason, body)\n\n    def set_canned_acl(self, acl_str, key_name='', headers=None,\n                       version_id=None):\n        assert acl_str in CannedACLStrings\n\n        if headers:\n            headers[self.connection.provider.acl_header] = acl_str\n        else:\n            headers={self.connection.provider.acl_header: acl_str}\n\n        query_args='acl'\n        if version_id:\n            query_args += '&versionId=%s' % version_id\n        response = self.connection.make_request('PUT', self.name, key_name,\n                headers=headers, query_args=query_args)\n        body = response.read()\n        if response.status != 200:\n            raise self.connection.provider.storage_response_error(\n                response.status, response.reason, body)\n\n    # Method with same signature as boto.s3.bucket.Bucket.add_email_grant(),\n    # to allow polymorphic treatment at application layer.\n    def add_email_grant(self, permission, email_address,\n                        recursive=False, headers=None):\n        \"\"\"\n        Convenience method that provides a quick way to add an email grant\n        to a bucket. This method retrieves the current ACL, creates a new\n        grant based on the parameters passed in, adds that grant to the ACL\n        and then PUT's the new ACL back to GS.\n        \n        :type permission: string\n        :param permission: The permission being granted. Should be one of:\n                           (READ, WRITE, FULL_CONTROL).\n        \n        :type email_address: string\n        :param email_address: The email address associated with the GS\n                              account your are granting the permission to.\n        \n        :type recursive: boolean\n        :param recursive: A boolean value to controls whether the call\n                          will apply the grant to all keys within the bucket\n                          or not.  The default value is False.  By passing a\n                          True value, the call will iterate through all keys\n                          in the bucket and apply the same grant to each key.\n                          CAUTION: If you have a lot of keys, this could take\n                          a long time!\n        \"\"\"\n        if permission not in GSPermissions:\n            raise self.connection.provider.storage_permissions_error(\n                'Unknown Permission: %s' % permission)\n        acl = self.get_acl(headers=headers)\n        acl.add_email_grant(permission, email_address)\n        self.set_acl(acl, headers=headers)\n        if recursive:\n            for key in self:\n                key.add_email_grant(permission, email_address, headers=headers)\n\n    # Method with same signature as boto.s3.bucket.Bucket.add_user_grant(),\n    # to allow polymorphic treatment at application layer.\n    def add_user_grant(self, permission, user_id, recursive=False, headers=None):\n        \"\"\"\n        Convenience method that provides a quick way to add a canonical user grant to a bucket.\n        This method retrieves the current ACL, creates a new grant based on the parameters\n        passed in, adds that grant to the ACL and then PUTs the new ACL back to GS.\n        \n        :type permission: string\n        :param permission:  The permission being granted.  Should be one of:\n                            (READ|WRITE|FULL_CONTROL)\n        \n        :type user_id: string\n        :param user_id:     The canonical user id associated with the GS account you are granting\n                            the permission to.\n                            \n        :type recursive: bool\n        :param recursive: A boolean value to controls whether the call\n                          will apply the grant to all keys within the bucket\n                          or not.  The default value is False.  By passing a\n                          True value, the call will iterate through all keys\n                          in the bucket and apply the same grant to each key.\n                          CAUTION: If you have a lot of keys, this could take\n                          a long time!\n        \"\"\"\n        if permission not in GSPermissions:\n            raise self.connection.provider.storage_permissions_error(\n                'Unknown Permission: %s' % permission)\n        acl = self.get_acl(headers=headers)\n        acl.add_user_grant(permission, user_id)\n        self.set_acl(acl, headers=headers)\n        if recursive:\n            for key in self:\n                key.add_user_grant(permission, user_id, headers=headers)\n\n    def add_group_email_grant(self, permission, email_address, recursive=False,\n                              headers=None):\n        \"\"\"\n        Convenience method that provides a quick way to add an email group\n        grant to a bucket. This method retrieves the current ACL, creates a new\n        grant based on the parameters passed in, adds that grant to the ACL and\n        then PUT's the new ACL back to GS.\n\n        :type permission: string\n        :param permission: The permission being granted. Should be one of:\n            READ|WRITE|FULL_CONTROL\n            See http://code.google.com/apis/storage/docs/developer-guide.html#authorization\n            for more details on permissions.\n\n        :type email_address: string\n        :param email_address: The email address associated with the Google\n            Group to which you are granting the permission.\n\n        :type recursive: bool\n        :param recursive: A boolean value to controls whether the call\n                          will apply the grant to all keys within the bucket\n                          or not.  The default value is False.  By passing a\n                          True value, the call will iterate through all keys\n                          in the bucket and apply the same grant to each key.\n                          CAUTION: If you have a lot of keys, this could take\n                          a long time!\n        \"\"\"\n        if permission not in GSPermissions:\n            raise self.connection.provider.storage_permissions_error(\n                'Unknown Permission: %s' % permission)\n        acl = self.get_acl(headers=headers)\n        acl.add_group_email_grant(permission, email_address)\n        self.set_acl(acl, headers=headers)\n        if recursive:\n            for key in self:\n                key.add_group_email_grant(permission, email_address,\n                                          headers=headers)\n\n    # Method with same input signature as boto.s3.bucket.Bucket.list_grants()\n    # (but returning different object type), to allow polymorphic treatment\n    # at application layer.\n    def list_grants(self, headers=None):\n        acl = self.get_acl(headers=headers)\n        return acl.entries\n\n    def disable_logging(self, headers=None):\n        xml_str = '<?xml version=\"1.0\" encoding=\"UTF-8\"?><Logging/>'\n        self.set_subresource('logging', xml_str, headers=headers)\n\n    def enable_logging(self, target_bucket, target_prefix=None, headers=None,\n                       canned_acl=None):\n        if isinstance(target_bucket, Bucket):\n            target_bucket = target_bucket.name\n        xml_str = '<?xml version=\"1.0\" encoding=\"UTF-8\"?><Logging>'\n        xml_str = (xml_str + '<LogBucket>%s</LogBucket>' % target_bucket)\n        if target_prefix:\n            xml_str = (xml_str +\n                       '<LogObjectPrefix>%s</LogObjectPrefix>' % target_prefix)\n        if canned_acl:\n            xml_str = (xml_str +\n                       '<PredefinedAcl>%s</PredefinedAcl>' % canned_acl)\n        xml_str = xml_str + '</Logging>'\n\n        self.set_subresource('logging', xml_str, headers=headers)\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/gs/connection.py",
    "content": "# Copyright 2010 Google Inc.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nfrom boto.gs.bucket import Bucket            \nfrom boto.s3.connection import S3Connection\nfrom boto.s3.connection import SubdomainCallingFormat\nfrom boto.s3.connection import check_lowercase_bucketname\n\nclass Location:\n    DEFAULT = '' # US\n    EU = 'EU'\n\nclass GSConnection(S3Connection):\n\n    DefaultHost = 'commondatastorage.googleapis.com'\n    QueryString = 'Signature=%s&Expires=%d&AWSAccessKeyId=%s'\n\n    def __init__(self, gs_access_key_id=None, gs_secret_access_key=None,\n                 is_secure=True, port=None, proxy=None, proxy_port=None,\n                 proxy_user=None, proxy_pass=None,\n                 host=DefaultHost, debug=0, https_connection_factory=None,\n                 calling_format=SubdomainCallingFormat(), path='/'):\n        S3Connection.__init__(self, gs_access_key_id, gs_secret_access_key,\n                 is_secure, port, proxy, proxy_port, proxy_user, proxy_pass,\n                 host, debug, https_connection_factory, calling_format, path,\n                 \"google\", Bucket)\n\n    def create_bucket(self, bucket_name, headers=None,\n                      location=Location.DEFAULT, policy=None):\n        \"\"\"\n        Creates a new bucket. By default it's located in the USA. You can\n        pass Location.EU to create an European bucket. You can also pass\n        a LocationConstraint, which (in addition to locating the bucket\n        in the specified location) informs Google that Google services\n        must not copy data out of that location.\n\n        :type bucket_name: string\n        :param bucket_name: The name of the new bucket\n        \n        :type headers: dict\n        :param headers: Additional headers to pass along with the request to AWS.\n\n        :type location: :class:`boto.gs.connection.Location`\n        :param location: The location of the new bucket\n\n        :type policy: :class:`boto.s3.acl.CannedACLStrings`\n        :param policy: A canned ACL policy that will be applied to the new key in S3.\n             \n        \"\"\"\n        check_lowercase_bucketname(bucket_name)\n\n        if policy:\n            if headers:\n                headers[self.provider.acl_header] = policy\n            else:\n                headers = {self.provider.acl_header : policy}\n        if not location:\n            data = ''\n        else:\n            data = ('<CreateBucketConfiguration>'\n                        '<LocationConstraint>%s</LocationConstraint>'\n                    '</CreateBucketConfiguration>' % location)\n        response = self.make_request('PUT', bucket_name, headers=headers,\n                data=data)\n        body = response.read()\n        if response.status == 409:\n            raise self.provider.storage_create_error(\n                response.status, response.reason, body)\n        if response.status == 200:\n            return self.bucket_class(self, bucket_name)\n        else:\n            raise self.provider.storage_response_error(\n                response.status, response.reason, body)\n\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/gs/key.py",
    "content": "# Copyright 2010 Google Inc.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nimport StringIO\nfrom boto.s3.key import Key as S3Key\n\nclass Key(S3Key):\n\n    def add_email_grant(self, permission, email_address):\n        \"\"\"\n        Convenience method that provides a quick way to add an email grant to a\n        key. This method retrieves the current ACL, creates a new grant based on\n        the parameters passed in, adds that grant to the ACL and then PUT's the\n        new ACL back to GS.\n\n        :type permission: string\n        :param permission: The permission being granted. Should be one of:\n            READ|FULL_CONTROL\n            See http://code.google.com/apis/storage/docs/developer-guide.html#authorization\n            for more details on permissions.\n\n        :type email_address: string\n        :param email_address: The email address associated with the Google\n                              account to which you are granting the permission.\n        \"\"\"\n        acl = self.get_acl()\n        acl.add_email_grant(permission, email_address)\n        self.set_acl(acl)\n\n    def add_user_grant(self, permission, user_id):\n        \"\"\"\n        Convenience method that provides a quick way to add a canonical user\n        grant to a key. This method retrieves the current ACL, creates a new\n        grant based on the parameters passed in, adds that grant to the ACL and\n        then PUT's the new ACL back to GS.\n\n        :type permission: string\n        :param permission: The permission being granted. Should be one of:\n            READ|FULL_CONTROL\n            See http://code.google.com/apis/storage/docs/developer-guide.html#authorization\n            for more details on permissions.\n\n        :type user_id: string\n        :param user_id: The canonical user id associated with the GS account to\n             which you are granting the permission.\n        \"\"\"\n        acl = self.get_acl()\n        acl.add_user_grant(permission, user_id)\n        self.set_acl(acl)\n\n    def add_group_email_grant(self, permission, email_address, headers=None):\n        \"\"\"\n        Convenience method that provides a quick way to add an email group\n        grant to a key. This method retrieves the current ACL, creates a new\n        grant based on the parameters passed in, adds that grant to the ACL and\n        then PUT's the new ACL back to GS.\n\n        :type permission: string\n        :param permission: The permission being granted. Should be one of:\n            READ|FULL_CONTROL\n            See http://code.google.com/apis/storage/docs/developer-guide.html#authorization\n            for more details on permissions.\n\n        :type email_address: string\n        :param email_address: The email address associated with the Google\n            Group to which you are granting the permission.\n        \"\"\"\n        acl = self.get_acl(headers=headers)\n        acl.add_group_email_grant(permission, email_address)\n        self.set_acl(acl, headers=headers)\n\n    def add_group_grant(self, permission, group_id):\n        \"\"\"\n        Convenience method that provides a quick way to add a canonical group\n        grant to a key. This method retrieves the current ACL, creates a new\n        grant based on the parameters passed in, adds that grant to the ACL and\n        then PUT's the new ACL back to GS.\n\n        :type permission: string\n        :param permission: The permission being granted. Should be one of:\n            READ|FULL_CONTROL\n            See http://code.google.com/apis/storage/docs/developer-guide.html#authorization\n            for more details on permissions.\n\n        :type group_id: string\n        :param group_id: The canonical group id associated with the Google\n            Groups account you are granting the permission to.\n        \"\"\"\n        acl = self.get_acl()\n        acl.add_group_grant(permission, group_id)\n        self.set_acl(acl)\n\n    def set_contents_from_file(self, fp, headers=None, replace=True,\n                               cb=None, num_cb=10, policy=None, md5=None,\n                               res_upload_handler=None):\n        \"\"\"\n        Store an object in GS using the name of the Key object as the\n        key in GS and the contents of the file pointed to by 'fp' as the\n        contents.\n\n        :type fp: file\n        :param fp: the file whose contents are to be uploaded\n\n        :type headers: dict\n        :param headers: additional HTTP headers to be sent with the PUT request.\n\n        :type replace: bool\n        :param replace: If this parameter is False, the method will first check\n            to see if an object exists in the bucket with the same key. If it\n            does, it won't overwrite it. The default value is True which will\n            overwrite the object.\n\n        :type cb: function\n        :param cb: a callback function that will be called to report\n            progress on the upload. The callback should accept two integer\n            parameters, the first representing the number of bytes that have\n            been successfully transmitted to GS and the second representing the\n            total number of bytes that need to be transmitted.\n\n        :type num_cb: int\n        :param num_cb: (optional) If a callback is specified with the cb\n            parameter, this parameter determines the granularity of the callback\n            by defining the maximum number of times the callback will be called\n            during the file transfer.\n\n        :type policy: :class:`boto.gs.acl.CannedACLStrings`\n        :param policy: A canned ACL policy that will be applied to the new key\n            in GS.\n\n        :type md5: A tuple containing the hexdigest version of the MD5 checksum\n            of the file as the first element and the Base64-encoded version of\n            the plain checksum as the second element. This is the same format\n            returned by the compute_md5 method.\n        :param md5: If you need to compute the MD5 for any reason prior to\n            upload, it's silly to have to do it twice so this param, if present,\n            will be used as the MD5 values of the file. Otherwise, the checksum\n            will be computed.\n\n        :type res_upload_handler: ResumableUploadHandler\n        :param res_upload_handler: If provided, this handler will perform the\n            upload.\n\n        TODO: At some point we should refactor the Bucket and Key classes,\n        to move functionality common to all providers into a parent class,\n        and provider-specific functionality into subclasses (rather than\n        just overriding/sharing code the way it currently works).\n        \"\"\"\n        provider = self.bucket.connection.provider\n        headers = headers or {}\n        if policy:\n            headers[provider.acl_header] = policy\n        if hasattr(fp, 'name'):\n            self.path = fp.name\n        if self.bucket != None:\n            if not md5:\n                md5 = self.compute_md5(fp)\n            else:\n                # Even if md5 is provided, still need to set size of content.\n                fp.seek(0, 2)\n                self.size = fp.tell()\n                fp.seek(0)\n            self.md5 = md5[0]\n            self.base64md5 = md5[1]\n            if self.name == None:\n                self.name = self.md5\n            if not replace:\n                k = self.bucket.lookup(self.name)\n                if k:\n                    return\n            if res_upload_handler:\n                res_upload_handler.send_file(self, fp, headers, cb, num_cb)\n            else:\n                # Not a resumable transfer so use basic send_file mechanism.\n                self.send_file(fp, headers, cb, num_cb)\n\n    def set_contents_from_filename(self, filename, headers=None, replace=True,\n                                   cb=None, num_cb=10, policy=None, md5=None,\n                                   reduced_redundancy=None,\n                                   res_upload_handler=None):\n        \"\"\"\n        Store an object in GS using the name of the Key object as the\n        key in GS and the contents of the file named by 'filename'.\n        See set_contents_from_file method for details about the\n        parameters.\n\n        :type filename: string\n        :param filename: The name of the file that you want to put onto GS\n\n        :type headers: dict\n        :param headers: Additional headers to pass along with the request to GS.\n\n        :type replace: bool\n        :param replace: If True, replaces the contents of the file if it\n            already exists.\n\n        :type cb: function\n        :param cb: (optional) a callback function that will be called to report\n            progress on the download. The callback should accept two integer\n            parameters, the first representing the number of bytes that have\n            been successfully transmitted from GS and the second representing\n            the total number of bytes that need to be transmitted.\n\n        :type cb: int\n        :param num_cb: (optional) If a callback is specified with the cb\n            parameter this parameter determines the granularity of the callback\n            by defining the maximum number of times the callback will be called\n            during the file transfer.\n\n        :type policy: :class:`boto.gs.acl.CannedACLStrings`\n        :param policy: A canned ACL policy that will be applied to the new key\n            in GS.\n\n        :type md5: A tuple containing the hexdigest version of the MD5 checksum\n            of the file as the first element and the Base64-encoded version of\n            the plain checksum as the second element. This is the same format\n            returned by the compute_md5 method.\n        :param md5: If you need to compute the MD5 for any reason prior to\n            upload, it's silly to have to do it twice so this param, if present,\n            will be used as the MD5 values of the file. Otherwise, the checksum\n            will be computed.\n\n        :type res_upload_handler: ResumableUploadHandler\n        :param res_upload_handler: If provided, this handler will perform the\n            upload.\n        \"\"\"\n        fp = open(filename, 'rb')\n        self.set_contents_from_file(fp, headers, replace, cb, num_cb,\n                                    policy, md5, res_upload_handler)\n        fp.close()\n\n    def set_contents_from_string(self, s, headers=None, replace=True,\n                                 cb=None, num_cb=10, policy=None, md5=None):\n        \"\"\"\n        Store an object in S3 using the name of the Key object as the\n        key in S3 and the string 's' as the contents.\n        See set_contents_from_file method for details about the\n        parameters.\n\n        :type headers: dict\n        :param headers: Additional headers to pass along with the\n                        request to AWS.\n\n        :type replace: bool\n        :param replace: If True, replaces the contents of the file if\n                        it already exists.\n\n        :type cb: function\n        :param cb: a callback function that will be called to report\n                   progress on the upload.  The callback should accept\n                   two integer parameters, the first representing the\n                   number of bytes that have been successfully\n                   transmitted to S3 and the second representing the\n                   size of the to be transmitted object.\n\n        :type cb: int\n        :param num_cb: (optional) If a callback is specified with\n                       the cb parameter this parameter determines the\n                       granularity of the callback by defining\n                       the maximum number of times the callback will\n                       be called during the file transfer.\n\n        :type policy: :class:`boto.s3.acl.CannedACLStrings`\n        :param policy: A canned ACL policy that will be applied to the\n                       new key in S3.\n\n        :type md5: A tuple containing the hexdigest version of the MD5\n                   checksum of the file as the first element and the\n                   Base64-encoded version of the plain checksum as the\n                   second element.  This is the same format returned by\n                   the compute_md5 method.\n        :param md5: If you need to compute the MD5 for any reason prior\n                    to upload, it's silly to have to do it twice so this\n                    param, if present, will be used as the MD5 values\n                    of the file.  Otherwise, the checksum will be computed.\n        \"\"\"\n        if isinstance(s, unicode):\n            s = s.encode(\"utf-8\")\n        fp = StringIO.StringIO(s)\n        r = self.set_contents_from_file(fp, headers, replace, cb, num_cb,\n                                        policy, md5)\n        fp.close()\n        return r\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/gs/resumable_upload_handler.py",
    "content": "# Copyright 2010 Google Inc.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nimport cgi\nimport errno\nimport httplib\nimport os\nimport random\nimport re\nimport socket\nimport time\nimport urlparse\nimport boto\nfrom boto import config\nfrom boto.connection import AWSAuthConnection\nfrom boto.exception import InvalidUriError\nfrom boto.exception import ResumableTransferDisposition\nfrom boto.exception import ResumableUploadException\n\n\"\"\"\nHandler for Google Cloud Storage resumable uploads. See\nhttp://code.google.com/apis/storage/docs/developer-guide.html#resumable\nfor details.\n\nResumable uploads will retry failed uploads, resuming at the byte\ncount completed by the last upload attempt. If too many retries happen with\nno progress (per configurable num_retries param), the upload will be\naborted in the current process.\n\nThe caller can optionally specify a tracker_file_name param in the\nResumableUploadHandler constructor. If you do this, that file will\nsave the state needed to allow retrying later, in a separate process\n(e.g., in a later run of gsutil).\n\"\"\"\n\n\nclass ResumableUploadHandler(object):\n\n    BUFFER_SIZE = 8192\n    RETRYABLE_EXCEPTIONS = (httplib.HTTPException, IOError, socket.error,\n                            socket.gaierror)\n\n    # (start, end) response indicating server has nothing (upload protocol uses\n    # inclusive numbering).\n    SERVER_HAS_NOTHING = (0, -1)\n\n    def __init__(self, tracker_file_name=None, num_retries=None):\n        \"\"\"\n        Constructor. Instantiate once for each uploaded file.\n\n        :type tracker_file_name: string\n        :param tracker_file_name: optional file name to save tracker URI.\n            If supplied and the current process fails the upload, it can be\n            retried in a new process. If called with an existing file containing\n            a valid tracker URI, we'll resume the upload from this URI; else\n            we'll start a new resumable upload (and write the URI to this\n            tracker file).\n\n        :type num_retries: int\n        :param num_retries: the number of times we'll re-try a resumable upload\n            making no progress. (Count resets every time we get progress, so\n            upload can span many more than this number of retries.)\n        \"\"\"\n        self.tracker_file_name = tracker_file_name\n        self.num_retries = num_retries\n        self.server_has_bytes = 0  # Byte count at last server check.\n        self.tracker_uri = None\n        if tracker_file_name:\n            self._load_tracker_uri_from_file()\n        # Save upload_start_point in instance state so caller can find how\n        # much was transferred by this ResumableUploadHandler (across retries).\n        self.upload_start_point = None\n\n    def _load_tracker_uri_from_file(self):\n        f = None\n        try:\n            f = open(self.tracker_file_name, 'r')\n            uri = f.readline().strip()\n            self._set_tracker_uri(uri)\n        except IOError, e:\n            # Ignore non-existent file (happens first time an upload\n            # is attempted on a file), but warn user for other errors.\n            if e.errno != errno.ENOENT:\n                # Will restart because self.tracker_uri == None.\n                print('Couldn\\'t read URI tracker file (%s): %s. Restarting '\n                      'upload from scratch.' %\n                      (self.tracker_file_name, e.strerror))\n        except InvalidUriError, e:\n            # Warn user, but proceed (will restart because\n            # self.tracker_uri == None).\n            print('Invalid tracker URI (%s) found in URI tracker file '\n                  '(%s). Restarting upload from scratch.' %\n                  (uri, self.tracker_file_name))\n        finally:\n            if f:\n                f.close()\n\n    def _save_tracker_uri_to_file(self):\n        \"\"\"\n        Saves URI to tracker file if one was passed to constructor.\n        \"\"\"\n        if not self.tracker_file_name:\n            return\n        f = None\n        try:\n            f = open(self.tracker_file_name, 'w')\n            f.write(self.tracker_uri)\n        except IOError, e:\n            raise ResumableUploadException(\n                'Couldn\\'t write URI tracker file (%s): %s.\\nThis can happen'\n                'if you\\'re using an incorrectly configured upload tool\\n'\n                '(e.g., gsutil configured to save tracker files to an '\n                'unwritable directory)' %\n                (self.tracker_file_name, e.strerror),\n                ResumableTransferDisposition.ABORT)\n        finally:\n            if f:\n                f.close()\n\n    def _set_tracker_uri(self, uri):\n        \"\"\"\n        Called when we start a new resumable upload or get a new tracker\n        URI for the upload. Saves URI and resets upload state.\n\n        Raises InvalidUriError if URI is syntactically invalid.\n        \"\"\"\n        parse_result = urlparse.urlparse(uri)\n        if (parse_result.scheme.lower() not in ['http', 'https'] or\n            not parse_result.netloc or not parse_result.query):\n            raise InvalidUriError('Invalid tracker URI (%s)' % uri)\n        qdict = cgi.parse_qs(parse_result.query)\n        if not qdict or not 'upload_id' in qdict:\n            raise InvalidUriError('Invalid tracker URI (%s)' % uri)\n        self.tracker_uri = uri\n        self.tracker_uri_host = parse_result.netloc\n        self.tracker_uri_path = '%s/?%s' % (parse_result.netloc,\n                                            parse_result.query)\n        self.server_has_bytes = 0\n\n    def get_tracker_uri(self):\n        \"\"\"\n        Returns upload tracker URI, or None if the upload has not yet started.\n        \"\"\"\n        return self.tracker_uri\n\n    def _remove_tracker_file(self):\n        if (self.tracker_file_name and\n            os.path.exists(self.tracker_file_name)):\n                os.unlink(self.tracker_file_name)\n\n    def _build_content_range_header(self, range_spec='*', length_spec='*'):\n        return 'bytes %s/%s' % (range_spec, length_spec)\n\n    def _query_server_state(self, conn, file_length):\n        \"\"\"\n        Queries server to find out state of given upload.\n\n        Note that this method really just makes special case use of the\n        fact that the upload server always returns the current start/end\n        state whenever a PUT doesn't complete.\n\n        Returns HTTP response from sending request.\n\n        Raises ResumableUploadException if problem querying server.\n        \"\"\"\n        # Send an empty PUT so that server replies with this resumable\n        # transfer's state.\n        put_headers = {}\n        put_headers['Content-Range'] = (\n            self._build_content_range_header('*', file_length))\n        put_headers['Content-Length'] = '0'\n        return AWSAuthConnection.make_request(conn, 'PUT',\n                                              path=self.tracker_uri_path,\n                                              auth_path=self.tracker_uri_path,\n                                              headers=put_headers,\n                                              host=self.tracker_uri_host)\n\n    def _query_server_pos(self, conn, file_length):\n        \"\"\"\n        Queries server to find out what bytes it currently has.\n\n        Returns (server_start, server_end), where the values are inclusive.\n        For example, (0, 2) would mean that the server has bytes 0, 1, *and* 2.\n\n        Raises ResumableUploadException if problem querying server.\n        \"\"\"\n        resp = self._query_server_state(conn, file_length)\n        if resp.status == 200:\n            return (0, file_length)  # Completed upload.\n        if resp.status != 308:\n            # This means the server didn't have any state for the given\n            # upload ID, which can happen (for example) if the caller saved\n            # the tracker URI to a file and then tried to restart the transfer\n            # after that upload ID has gone stale. In that case we need to\n            # start a new transfer (and the caller will then save the new\n            # tracker URI to the tracker file).\n            raise ResumableUploadException(\n                'Got non-308 response (%s) from server state query' %\n                resp.status, ResumableTransferDisposition.START_OVER)\n        got_valid_response = False\n        range_spec = resp.getheader('range')\n        if range_spec:\n            # Parse 'bytes=<from>-<to>' range_spec.\n            m = re.search('bytes=(\\d+)-(\\d+)', range_spec)\n            if m:\n                server_start = long(m.group(1))\n                server_end = long(m.group(2))\n                got_valid_response = True\n        else:\n            # No Range header, which means the server does not yet have\n            # any bytes. Note that the Range header uses inclusive 'from'\n            # and 'to' values. Since Range 0-0 would mean that the server\n            # has byte 0, omitting the Range header is used to indicate that\n            # the server doesn't have any bytes.\n            return self.SERVER_HAS_NOTHING\n        if not got_valid_response:\n            raise ResumableUploadException(\n                'Couldn\\'t parse upload server state query response (%s)' %\n                str(resp.getheaders()), ResumableTransferDisposition.START_OVER)\n        if conn.debug >= 1:\n            print 'Server has: Range: %d - %d.' % (server_start, server_end)\n        return (server_start, server_end)\n\n    def _start_new_resumable_upload(self, key, headers=None):\n        \"\"\"\n        Starts a new resumable upload.\n\n        Raises ResumableUploadException if any errors occur.\n        \"\"\"\n        conn = key.bucket.connection\n        if conn.debug >= 1:\n            print 'Starting new resumable upload.'\n        self.server_has_bytes = 0\n\n        # Start a new resumable upload by sending a POST request with an\n        # empty body and the \"X-Goog-Resumable: start\" header. Include any\n        # caller-provided headers (e.g., Content-Type) EXCEPT Content-Length\n        # (and raise an exception if they tried to pass one, since it's\n        # a semantic error to specify it at this point, and if we were to\n        # include one now it would cause the server to expect that many\n        # bytes; the POST doesn't include the actual file bytes  We set\n        # the Content-Length in the subsequent PUT, based on the uploaded\n        # file size.\n        post_headers = {}\n        for k in headers:\n            if k.lower() == 'content-length':\n                raise ResumableUploadException(\n                    'Attempt to specify Content-Length header (disallowed)',\n                    ResumableTransferDisposition.ABORT)\n            post_headers[k] = headers[k]\n        post_headers[conn.provider.resumable_upload_header] = 'start'\n\n        resp = conn.make_request(\n            'POST', key.bucket.name, key.name, post_headers)\n        # Get tracker URI from response 'Location' header.\n        body = resp.read()\n\n        # Check for various status conditions.\n        if resp.status in [500, 503]:\n            # Retry status 500 and 503 errors after a delay.\n            raise ResumableUploadException(\n                'Got status %d from attempt to start resumable upload. '\n                'Will wait/retry' % resp.status,\n                ResumableTransferDisposition.WAIT_BEFORE_RETRY)\n        elif resp.status != 200 and resp.status != 201:\n            raise ResumableUploadException(\n                'Got status %d from attempt to start resumable upload. '\n                'Aborting' % resp.status,\n                ResumableTransferDisposition.ABORT)\n\n        # Else we got 200 or 201 response code, indicating the resumable\n        # upload was created.\n        tracker_uri = resp.getheader('Location')\n        if not tracker_uri:\n            raise ResumableUploadException(\n                'No resumable tracker URI found in resumable initiation '\n                'POST response (%s)' % body,\n                ResumableTransferDisposition.WAIT_BEFORE_RETRY)\n        self._set_tracker_uri(tracker_uri)\n        self._save_tracker_uri_to_file()\n\n    def _upload_file_bytes(self, conn, http_conn, fp, file_length,\n                           total_bytes_uploaded, cb, num_cb):\n        \"\"\"\n        Makes one attempt to upload file bytes, using an existing resumable\n        upload connection.\n\n        Returns etag from server upon success.\n\n        Raises ResumableUploadException if any problems occur.\n        \"\"\"\n        buf = fp.read(self.BUFFER_SIZE)\n        if cb:\n            if num_cb > 2:\n                cb_count = file_length / self.BUFFER_SIZE / (num_cb-2)\n            elif num_cb < 0:\n                cb_count = -1\n            else:\n                cb_count = 0\n            i = 0\n            cb(total_bytes_uploaded, file_length)\n\n        # Build resumable upload headers for the transfer. Don't send a\n        # Content-Range header if the file is 0 bytes long, because the\n        # resumable upload protocol uses an *inclusive* end-range (so, sending\n        # 'bytes 0-0/1' would actually mean you're sending a 1-byte file).\n        put_headers = {}\n        if file_length:\n            range_header = self._build_content_range_header(\n                '%d-%d' % (total_bytes_uploaded, file_length - 1),\n                file_length)\n            put_headers['Content-Range'] = range_header\n        # Set Content-Length to the total bytes we'll send with this PUT.\n        put_headers['Content-Length'] = str(file_length - total_bytes_uploaded)\n        http_request = AWSAuthConnection.build_base_http_request(\n            conn, 'PUT', path=self.tracker_uri_path, auth_path=None,\n            headers=put_headers, host=self.tracker_uri_host)\n        http_conn.putrequest('PUT', http_request.path)\n        for k in put_headers:\n            http_conn.putheader(k, put_headers[k])\n        http_conn.endheaders()\n\n        # Turn off debug on http connection so upload content isn't included\n        # in debug stream.\n        http_conn.set_debuglevel(0)\n        while buf:\n            http_conn.send(buf)\n            total_bytes_uploaded += len(buf)\n            if cb:\n                i += 1\n                if i == cb_count or cb_count == -1:\n                    cb(total_bytes_uploaded, file_length)\n                    i = 0\n            buf = fp.read(self.BUFFER_SIZE)\n        if cb:\n            cb(total_bytes_uploaded, file_length)\n        if total_bytes_uploaded != file_length:\n            # Abort (and delete the tracker file) so if the user retries\n            # they'll start a new resumable upload rather than potentially\n            # attempting to pick back up later where we left off.\n            raise ResumableUploadException(\n                'File changed during upload: EOF at %d bytes of %d byte file.' %\n                (total_bytes_uploaded, file_length),\n                ResumableTransferDisposition.ABORT)\n        resp = http_conn.getresponse()\n        body = resp.read()\n        # Restore http connection debug level.\n        http_conn.set_debuglevel(conn.debug)\n\n        if resp.status == 200:\n            return resp.getheader('etag')  # Success\n        # Retry timeout (408) and status 500 and 503 errors after a delay.\n        elif resp.status in [408, 500, 503]:\n            disposition = ResumableTransferDisposition.WAIT_BEFORE_RETRY\n        else:\n            # Catch all for any other error codes.\n            disposition = ResumableTransferDisposition.ABORT\n        raise ResumableUploadException('Got response code %d while attempting '\n                                       'upload (%s)' %\n                                       (resp.status, resp.reason), disposition)\n\n    def _attempt_resumable_upload(self, key, fp, file_length, headers, cb,\n                                  num_cb):\n        \"\"\"\n        Attempts a resumable upload.\n\n        Returns etag from server upon success.\n\n        Raises ResumableUploadException if any problems occur.\n        \"\"\"\n        (server_start, server_end) = self.SERVER_HAS_NOTHING\n        conn = key.bucket.connection\n        if self.tracker_uri:\n            # Try to resume existing resumable upload.\n            try:\n                (server_start, server_end) = (\n                    self._query_server_pos(conn, file_length))\n                self.server_has_bytes = server_start\n                key=key\n                if conn.debug >= 1:\n                    print 'Resuming transfer.'\n            except ResumableUploadException, e:\n                if conn.debug >= 1:\n                    print 'Unable to resume transfer (%s).' % e.message\n                self._start_new_resumable_upload(key, headers)\n        else:\n            self._start_new_resumable_upload(key, headers)\n\n        # upload_start_point allows the code that instantiated the\n        # ResumableUploadHandler to find out the point from which it started\n        # uploading (e.g., so it can correctly compute throughput).\n        if self.upload_start_point is None:\n            self.upload_start_point = server_end\n\n        if server_end == file_length:\n            # Boundary condition: complete file was already uploaded (e.g.,\n            # user interrupted a previous upload attempt after the upload\n            # completed but before the gsutil tracker file was deleted). Set\n            # total_bytes_uploaded to server_end so we'll attempt to upload\n            # no more bytes but will still make final HTTP request and get\n            # back the response (which contains the etag we need to compare\n            # at the end).\n            total_bytes_uploaded = server_end\n        else:\n            total_bytes_uploaded = server_end + 1\n        fp.seek(total_bytes_uploaded)\n        conn = key.bucket.connection\n\n        # Get a new HTTP connection (vs conn.get_http_connection(), which reuses\n        # pool connections) because httplib requires a new HTTP connection per\n        # transaction. (Without this, calling http_conn.getresponse() would get\n        # \"ResponseNotReady\".)\n        http_conn = conn.new_http_connection(self.tracker_uri_host,\n                                             conn.is_secure)\n        http_conn.set_debuglevel(conn.debug)\n\n        # Make sure to close http_conn at end so if a local file read\n        # failure occurs partway through server will terminate current upload\n        # and can report that progress on next attempt.\n        try:\n            return self._upload_file_bytes(conn, http_conn, fp, file_length,\n                                           total_bytes_uploaded, cb, num_cb)\n        except (ResumableUploadException, socket.error):\n            resp = self._query_server_state(conn, file_length)\n            if resp.status == 400:\n                raise ResumableUploadException('Got 400 response from server '\n                    'state query after failed resumable upload attempt. This '\n                    'can happen if the file size changed between upload '\n                    'attempts', ResumableTransferDisposition.ABORT)\n            else:\n                raise\n        finally:\n            http_conn.close()\n\n    def _check_final_md5(self, key, etag):\n        \"\"\"\n        Checks that etag from server agrees with md5 computed before upload.\n        This is important, since the upload could have spanned a number of\n        hours and multiple processes (e.g., gsutil runs), and the user could\n        change some of the file and not realize they have inconsistent data.\n        \"\"\"\n        if key.bucket.connection.debug >= 1:\n            print 'Checking md5 against etag.'\n        if key.md5 != etag.strip('\"\\''):\n            # Call key.open_read() before attempting to delete the\n            # (incorrect-content) key, so we perform that request on a\n            # different HTTP connection. This is neededb because httplib\n            # will return a \"Response not ready\" error if you try to perform\n            # a second transaction on the connection.\n            key.open_read()\n            key.close()\n            key.delete()\n            raise ResumableUploadException(\n                'File changed during upload: md5 signature doesn\\'t match etag '\n                '(incorrect uploaded object deleted)',\n                ResumableTransferDisposition.ABORT)\n\n    def send_file(self, key, fp, headers, cb=None, num_cb=10):\n        \"\"\"\n        Upload a file to a key into a bucket on GS, using GS resumable upload\n        protocol.\n        \n        :type key: :class:`boto.s3.key.Key` or subclass\n        :param key: The Key object to which data is to be uploaded\n        \n        :type fp: file-like object\n        :param fp: The file pointer to upload\n        \n        :type headers: dict\n        :param headers: The headers to pass along with the PUT request\n        \n        :type cb: function\n        :param cb: a callback function that will be called to report progress on\n            the upload.  The callback should accept two integer parameters, the\n            first representing the number of bytes that have been successfully\n            transmitted to GS, and the second representing the total number of\n            bytes that need to be transmitted.\n                    \n        :type num_cb: int\n        :param num_cb: (optional) If a callback is specified with the cb\n            parameter, this parameter determines the granularity of the callback\n            by defining the maximum number of times the callback will be called\n            during the file transfer. Providing a negative integer will cause\n            your callback to be called with each buffer read.\n             \n        Raises ResumableUploadException if a problem occurs during the transfer.\n        \"\"\"\n\n        if not headers:\n            headers = {}\n\n        fp.seek(0, os.SEEK_END)\n        file_length = fp.tell()\n        fp.seek(0)\n        debug = key.bucket.connection.debug\n\n        # Use num-retries from constructor if one was provided; else check\n        # for a value specified in the boto config file; else default to 5.\n        if self.num_retries is None:\n            self.num_retries = config.getint('Boto', 'num_retries', 5)\n        progress_less_iterations = 0\n\n        while True:  # Retry as long as we're making progress.\n            server_had_bytes_before_attempt = self.server_has_bytes\n            try:\n                etag = self._attempt_resumable_upload(key, fp, file_length,\n                                                      headers, cb, num_cb)\n                # Upload succceded, so remove the tracker file (if have one).\n                self._remove_tracker_file()\n                self._check_final_md5(key, etag)\n                if debug >= 1:\n                    print 'Resumable upload complete.'\n                return\n            except self.RETRYABLE_EXCEPTIONS, e:\n                if debug >= 1:\n                    print('Caught exception (%s)' % e.__repr__())\n                if isinstance(e, IOError) and e.errno == errno.EPIPE:\n                    # Broken pipe error causes httplib to immediately\n                    # close the socket (http://bugs.python.org/issue5542),\n                    # so we need to close the connection before we resume\n                    # the upload (which will cause a new connection to be\n                    # opened the next time an HTTP request is sent).\n                    key.bucket.connection.connection.close()\n            except ResumableUploadException, e:\n                if (e.disposition ==\n                    ResumableTransferDisposition.ABORT_CUR_PROCESS):\n                    if debug >= 1:\n                        print('Caught non-retryable ResumableUploadException '\n                              '(%s); aborting but retaining tracker file' %\n                              e.message)\n                    raise\n                elif (e.disposition ==\n                    ResumableTransferDisposition.ABORT):\n                    if debug >= 1:\n                        print('Caught non-retryable ResumableUploadException '\n                              '(%s); aborting and removing tracker file' %\n                              e.message)\n                    self._remove_tracker_file()\n                    raise\n                else:\n                    if debug >= 1:\n                        print('Caught ResumableUploadException (%s) - will '\n                              'retry' % e.message)\n\n            # At this point we had a re-tryable failure; see if made progress.\n            if self.server_has_bytes > server_had_bytes_before_attempt:\n                progress_less_iterations = 0\n            else:\n                progress_less_iterations += 1\n\n            if progress_less_iterations > self.num_retries:\n                # Don't retry any longer in the current process.\n                raise ResumableUploadException(\n                    'Too many resumable upload attempts failed without '\n                    'progress. You might try this upload again later',\n                    ResumableTransferDisposition.ABORT_CUR_PROCESS)\n\n            # Use binary exponential backoff to desynchronize client requests\n            sleep_time_secs = random.random() * (2**progress_less_iterations)\n            if debug >= 1:\n                print ('Got retryable failure (%d progress-less in a row).\\n'\n                       'Sleeping %3.1f seconds before re-trying' %\n                       (progress_less_iterations, sleep_time_secs))\n            time.sleep(sleep_time_secs)\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/gs/user.py",
    "content": "# Copyright 2010 Google Inc.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\n\nclass User:\n    def __init__(self, parent=None, id='', name=''):\n        if parent:\n            parent.owner = self\n        self.type = None\n        self.id = id\n        self.name = name\n\n    def __repr__(self):\n        return self.id\n\n    def startElement(self, name, attrs, connection):\n        return None\n\n    def endElement(self, name, value, connection):\n        if name == 'Name':\n            self.name = value\n        elif name == 'ID':\n            self.id = value\n        else:\n            setattr(self, name, value)\n\n    def to_xml(self, element_name='Owner'):\n        if self.type:\n            s = '<%s type=\"%s\">' % (element_name, self.type)\n        else:\n            s = '<%s>' % element_name\n        s += '<ID>%s</ID>' % self.id\n        if self.name:\n            s += '<Name>%s</Name>' % self.name\n        s += '</%s>' % element_name\n        return s\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/handler.py",
    "content": "# Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nimport xml.sax\n\nclass XmlHandler(xml.sax.ContentHandler):\n\n    def __init__(self, root_node, connection):\n        self.connection = connection\n        self.nodes = [('root', root_node)]\n        self.current_text = ''\n\n    def startElement(self, name, attrs):\n        self.current_text = ''\n        new_node = self.nodes[-1][1].startElement(name, attrs, self.connection)\n        if new_node != None:\n            self.nodes.append((name, new_node))\n\n    def endElement(self, name):\n        self.nodes[-1][1].endElement(name, self.current_text, self.connection)\n        if self.nodes[-1][0] == name:\n            self.nodes.pop()\n        self.current_text = ''\n\n    def characters(self, content):\n        self.current_text += content\n            \n\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/https_connection.py",
    "content": "# Copyright 2007,2011 Google Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n\n# This file is derived from\n# http://googleappengine.googlecode.com/svn-history/r136/trunk/python/google/appengine/tools/https_wrapper.py\n\n\n\"\"\"Extensions to allow HTTPS requests with SSL certificate validation.\"\"\"\n\nimport httplib\nimport re\nimport socket\nimport ssl\n\nimport boto\n\nclass InvalidCertificateException(httplib.HTTPException):\n  \"\"\"Raised when a certificate is provided with an invalid hostname.\"\"\"\n\n  def __init__(self, host, cert, reason):\n    \"\"\"Constructor.\n\n    Args:\n      host: The hostname the connection was made to.\n      cert: The SSL certificate (as a dictionary) the host returned.\n    \"\"\"\n    httplib.HTTPException.__init__(self)\n    self.host = host\n    self.cert = cert\n    self.reason = reason\n\n  def __str__(self):\n    return ('Host %s returned an invalid certificate (%s): %s' %\n            (self.host, self.reason, self.cert))\n\ndef GetValidHostsForCert(cert):\n  \"\"\"Returns a list of valid host globs for an SSL certificate.\n\n  Args:\n    cert: A dictionary representing an SSL certificate.\n  Returns:\n    list: A list of valid host globs.\n  \"\"\"\n  if 'subjectAltName' in cert:\n    return [x[1] for x in cert['subjectAltName'] if x[0].lower() == 'dns']\n  else:\n    return [x[0][1] for x in cert['subject']\n            if x[0][0].lower() == 'commonname']\n\ndef ValidateCertificateHostname(cert, hostname):\n  \"\"\"Validates that a given hostname is valid for an SSL certificate.\n\n  Args:\n    cert: A dictionary representing an SSL certificate.\n    hostname: The hostname to test.\n  Returns:\n    bool: Whether or not the hostname is valid for this certificate.\n  \"\"\"\n  hosts = GetValidHostsForCert(cert)\n  boto.log.debug(\n      \"validating server certificate: hostname=%s, certificate hosts=%s\",\n      hostname, hosts)\n  for host in hosts:\n    host_re = host.replace('.', '\\.').replace('*', '[^.]*')\n    if re.search('^%s$' % (host_re,), hostname, re.I):\n      return True\n  return False\n\n\nclass CertValidatingHTTPSConnection(httplib.HTTPConnection):\n  \"\"\"An HTTPConnection that connects over SSL and validates certificates.\"\"\"\n\n  default_port = httplib.HTTPS_PORT\n\n  def __init__(self, host, port=None, key_file=None, cert_file=None,\n               ca_certs=None, strict=None, **kwargs):\n    \"\"\"Constructor.\n\n    Args:\n      host: The hostname. Can be in 'host:port' form.\n      port: The port. Defaults to 443.\n      key_file: A file containing the client's private key\n      cert_file: A file containing the client's certificates\n      ca_certs: A file contianing a set of concatenated certificate authority\n          certs for validating the server against.\n      strict: When true, causes BadStatusLine to be raised if the status line\n          can't be parsed as a valid HTTP/1.0 or 1.1 status line.\n    \"\"\"\n    httplib.HTTPConnection.__init__(self, host, port, strict, **kwargs)\n    self.key_file = key_file\n    self.cert_file = cert_file\n    self.ca_certs = ca_certs\n\n  def connect(self):\n    \"Connect to a host on a given (SSL) port.\"\n    sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)\n    sock.connect((self.host, self.port))\n    boto.log.debug(\"wrapping ssl socket; CA certificate file=%s\",\n                   self.ca_certs)\n    self.sock = ssl.wrap_socket(sock, keyfile=self.key_file,\n                                certfile=self.cert_file,\n                                cert_reqs=ssl.CERT_REQUIRED,\n                                ca_certs=self.ca_certs)\n    cert = self.sock.getpeercert()\n    hostname = self.host.split(':', 0)[0]\n    if not ValidateCertificateHostname(cert, hostname):\n      raise InvalidCertificateException(hostname,\n                                        cert,\n                                        'remote hostname \"%s\" does not match '\\\n                                        'certificate' % hostname)\n\n\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/iam/__init__.py",
    "content": "# Copyright (c) 2010-2011 Mitch Garnaat http://garnaat.org/\n# Copyright (c) 2010-2011, Eucalyptus Systems, Inc.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\n# this is here for backward compatibility\n# originally, the IAMConnection class was defined here\nfrom connection import IAMConnection\n    \n    \n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/iam/connection.py",
    "content": "# Copyright (c) 2010-2011 Mitch Garnaat http://garnaat.org/\n# Copyright (c) 2010-2011, Eucalyptus Systems, Inc.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nimport boto\nimport boto.jsonresponse\nfrom boto.iam.summarymap import SummaryMap\nfrom boto.connection import AWSQueryConnection\n\n#boto.set_stream_logger('iam')\n\nclass IAMConnection(AWSQueryConnection):\n\n    APIVersion = '2010-05-08'\n\n    def __init__(self, aws_access_key_id=None, aws_secret_access_key=None,\n                 is_secure=True, port=None, proxy=None, proxy_port=None,\n                 proxy_user=None, proxy_pass=None, host='iam.amazonaws.com',\n                 debug=0, https_connection_factory=None,\n                 path='/'):\n        AWSQueryConnection.__init__(self, aws_access_key_id,\n                                    aws_secret_access_key,\n                                    is_secure, port, proxy,\n                                    proxy_port, proxy_user, proxy_pass,\n                                    host, debug, https_connection_factory,\n                                    path)\n\n    def _required_auth_capability(self):\n        return ['iam']\n\n    def get_response(self, action, params, path='/', parent=None,\n                     verb='GET', list_marker='Set'):\n        \"\"\"\n        Utility method to handle calls to IAM and parsing of responses.\n        \"\"\"\n        if not parent:\n            parent = self\n        response = self.make_request(action, params, path, verb)\n        body = response.read()\n        boto.log.debug(body)\n        if response.status == 200:\n            e = boto.jsonresponse.Element(list_marker=list_marker,\n                                          pythonize_name=True)\n            h = boto.jsonresponse.XmlHandler(e, parent)\n            h.parse(body)\n            return e\n        else:\n            boto.log.error('%s %s' % (response.status, response.reason))\n            boto.log.error('%s' % body)\n            raise self.ResponseError(response.status, response.reason, body)\n\n    #\n    # Group methods\n    #\n    \n    def get_all_groups(self, path_prefix='/', marker=None, max_items=None):\n        \"\"\"\n        List the groups that have the specified path prefix.\n\n        :type path_prefix: string\n        :param path_prefix: If provided, only groups whose paths match\n                            the provided prefix will be returned.\n\n        :type marker: string\n        :param marker: Use this only when paginating results and only in\n                       follow-up request after you've received a response\n                       where the results are truncated.  Set this to the\n                       value of the Marker element in the response you\n                       just received.\n\n        :type max_items: int\n        :param max_items: Use this only when paginating results to indicate\n                          the maximum number of groups you want in the\n                          response.\n        \"\"\"\n        params = {}\n        if path_prefix:\n            params['PathPrefix'] = path_prefix\n        if marker:\n            params['Marker'] = marker\n        if max_items:\n            params['MaxItems'] = max_items\n        return self.get_response('ListGroups', params,\n                                 list_marker='Groups')\n    \n    def get_group(self, group_name, marker=None, max_items=None):\n        \"\"\"\n        Return a list of users that are in the specified group.\n\n        :type group_name: string\n        :param group_name: The name of the group whose information should\n                           be returned.\n        :type marker: string\n        :param marker: Use this only when paginating results and only in\n                       follow-up request after you've received a response\n                       where the results are truncated.  Set this to the\n                       value of the Marker element in the response you\n                       just received.\n\n        :type max_items: int\n        :param max_items: Use this only when paginating results to indicate\n                          the maximum number of groups you want in the\n                          response.\n        \"\"\"\n        params = {'GroupName' : group_name}\n        if marker:\n            params['Marker'] = marker\n        if max_items:\n            params['MaxItems'] = max_items\n        return self.get_response('GetGroup', params, list_marker='Users')\n        \n    def create_group(self, group_name, path='/'):\n        \"\"\"\n        Create a group.\n\n        :type group_name: string\n        :param group_name: The name of the new group\n\n        :type path: string\n        :param path: The path to the group (Optional).  Defaults to /.\n\n        \"\"\"\n        params = {'GroupName' : group_name,\n                  'Path' : path}\n        return self.get_response('CreateGroup', params)\n\n    def delete_group(self, group_name):\n        \"\"\"\n        Delete a group. The group must not contain any Users or\n        have any attached policies\n\n        :type group_name: string\n        :param group_name: The name of the group to delete.\n\n        \"\"\"\n        params = {'GroupName' : group_name}\n        return self.get_response('DeleteGroup', params)\n\n    def update_group(self, group_name, new_group_name=None, new_path=None):\n        \"\"\"\n        Updates name and/or path of the specified group.\n\n        :type group_name: string\n        :param group_name: The name of the new group\n\n        :type new_group_name: string\n        :param new_group_name: If provided, the name of the group will be\n                               changed to this name.\n\n        :type new_path: string\n        :param new_path: If provided, the path of the group will be\n                         changed to this path.\n\n        \"\"\"\n        params = {'GroupName' : group_name}\n        if new_group_name:\n            params['NewGroupName'] = new_group_name\n        if new_path:\n            params['NewPath'] = new_path\n        return self.get_response('UpdateGroup', params)\n\n    def add_user_to_group(self, group_name, user_name):\n        \"\"\"\n        Add a user to a group\n\n        :type group_name: string\n        :param group_name: The name of the group\n\n        :type user_name: string\n        :param user_name: The to be added to the group.\n\n        \"\"\"\n        params = {'GroupName' : group_name,\n                  'UserName' : user_name}\n        return self.get_response('AddUserToGroup', params)\n\n    def remove_user_from_group(self, group_name, user_name):\n        \"\"\"\n        Remove a user from a group.\n\n        :type group_name: string\n        :param group_name: The name of the group\n\n        :type user_name: string\n        :param user_name: The user to remove from the group.\n\n        \"\"\"\n        params = {'GroupName' : group_name,\n                  'UserName' : user_name}\n        return self.get_response('RemoveUserFromGroup', params)\n\n    def put_group_policy(self, group_name, policy_name, policy_json):\n        \"\"\"\n        Adds or updates the specified policy document for the specified group.\n\n        :type group_name: string\n        :param group_name: The name of the group the policy is associated with.\n\n        :type policy_name: string\n        :param policy_name: The policy document to get.\n\n        :type policy_json: string\n        :param policy_json: The policy document.\n        \n        \"\"\"\n        params = {'GroupName' : group_name,\n                  'PolicyName' : policy_name,\n                  'PolicyDocument' : policy_json}\n        return self.get_response('PutGroupPolicy', params, verb='POST')\n\n    def get_all_group_policies(self, group_name, marker=None, max_items=None):\n        \"\"\"\n        List the names of the policies associated with the specified group.\n\n        :type group_name: string\n        :param group_name: The name of the group the policy is associated with.\n\n        :type marker: string\n        :param marker: Use this only when paginating results and only in\n                       follow-up request after you've received a response\n                       where the results are truncated.  Set this to the\n                       value of the Marker element in the response you\n                       just received.\n\n        :type max_items: int\n        :param max_items: Use this only when paginating results to indicate\n                          the maximum number of groups you want in the\n                          response.\n        \"\"\"\n        params = {'GroupName' : group_name}\n        if marker:\n            params['Marker'] = marker\n        if max_items:\n            params['MaxItems'] = max_items\n        return self.get_response('ListGroupPolicies', params,\n                                 list_marker='PolicyNames')\n\n    def get_group_policy(self, group_name, policy_name):\n        \"\"\"\n        Retrieves the specified policy document for the specified group.\n\n        :type group_name: string\n        :param group_name: The name of the group the policy is associated with.\n\n        :type policy_name: string\n        :param policy_name: The policy document to get.\n        \n        \"\"\"\n        params = {'GroupName' : group_name,\n                  'PolicyName' : policy_name}\n        return self.get_response('GetGroupPolicy', params, verb='POST')\n\n    def delete_group_policy(self, group_name, policy_name):\n        \"\"\"\n        Deletes the specified policy document for the specified group.\n\n        :type group_name: string\n        :param group_name: The name of the group the policy is associated with.\n\n        :type policy_name: string\n        :param policy_name: The policy document to delete.\n        \n        \"\"\"\n        params = {'GroupName' : group_name,\n                  'PolicyName' : policy_name}\n        return self.get_response('DeleteGroupPolicy', params, verb='POST')\n\n    def get_all_users(self, path_prefix='/', marker=None, max_items=None):\n        \"\"\"\n        List the users that have the specified path prefix.\n\n        :type path_prefix: string\n        :param path_prefix: If provided, only users whose paths match\n                            the provided prefix will be returned.\n\n        :type marker: string\n        :param marker: Use this only when paginating results and only in\n                       follow-up request after you've received a response\n                       where the results are truncated.  Set this to the\n                       value of the Marker element in the response you\n                       just received.\n\n        :type max_items: int\n        :param max_items: Use this only when paginating results to indicate\n                          the maximum number of groups you want in the\n                          response.\n        \"\"\"\n        params = {'PathPrefix' : path_prefix}\n        if marker:\n            params['Marker'] = marker\n        if max_items:\n            params['MaxItems'] = max_items\n        return self.get_response('ListUsers', params, list_marker='Users')\n        \n    #\n    # User methods\n    #\n    \n    def create_user(self, user_name, path='/'):\n        \"\"\"\n        Create a user.\n\n        :type user_name: string\n        :param user_name: The name of the new user\n\n        :type path: string\n        :param path: The path in which the user will be created.\n                     Defaults to /.\n\n        \"\"\"\n        params = {'UserName' : user_name,\n                  'Path' : path}\n        return self.get_response('CreateUser', params)\n\n    def delete_user(self, user_name):\n        \"\"\"\n        Delete a user including the user's path, GUID and ARN.\n\n        If the user_name is not specified, the user_name is determined\n        implicitly based on the AWS Access Key ID used to sign the request.\n\n        :type user_name: string\n        :param user_name: The name of the user to delete.\n\n        \"\"\"\n        params = {'UserName' : user_name}\n        return self.get_response('DeleteUser', params)\n\n    def get_user(self, user_name=None):\n        \"\"\"\n        Retrieve information about the specified user.\n\n        If the user_name is not specified, the user_name is determined\n        implicitly based on the AWS Access Key ID used to sign the request.\n\n        :type user_name: string\n        :param user_name: The name of the user to delete.\n                          If not specified, defaults to user making\n                          request.\n\n        \"\"\"\n        params = {}\n        if user_name:\n            params['UserName'] = user_name\n        return self.get_response('GetUser', params)\n\n    def update_user(self, user_name, new_user_name=None, new_path=None):\n        \"\"\"\n        Updates name and/or path of the specified user.\n\n        :type user_name: string\n        :param user_name: The name of the user\n\n        :type new_user_name: string\n        :param new_user_name: If provided, the username of the user will be\n                              changed to this username.\n\n        :type new_path: string\n        :param new_path: If provided, the path of the user will be\n                         changed to this path.\n\n        \"\"\"\n        params = {'UserName' : user_name}\n        if new_user_name:\n            params['NewUserName'] = new_user_name\n        if new_path:\n            params['NewPath'] = new_path\n        return self.get_response('UpdateUser', params)\n    \n    def get_all_user_policies(self, user_name, marker=None, max_items=None):\n        \"\"\"\n        List the names of the policies associated with the specified user.\n\n        :type user_name: string\n        :param user_name: The name of the user the policy is associated with.\n\n        :type marker: string\n        :param marker: Use this only when paginating results and only in\n                       follow-up request after you've received a response\n                       where the results are truncated.  Set this to the\n                       value of the Marker element in the response you\n                       just received.\n\n        :type max_items: int\n        :param max_items: Use this only when paginating results to indicate\n                          the maximum number of groups you want in the\n                          response.\n        \"\"\"\n        params = {'UserName' : user_name}\n        if marker:\n            params['Marker'] = marker\n        if max_items:\n            params['MaxItems'] = max_items\n        return self.get_response('ListUserPolicies', params,\n                                 list_marker='PolicyNames')\n\n    def put_user_policy(self, user_name, policy_name, policy_json):\n        \"\"\"\n        Adds or updates the specified policy document for the specified user.\n\n        :type user_name: string\n        :param user_name: The name of the user the policy is associated with.\n\n        :type policy_name: string\n        :param policy_name: The policy document to get.\n\n        :type policy_json: string\n        :param policy_json: The policy document.\n        \n        \"\"\"\n        params = {'UserName' : user_name,\n                  'PolicyName' : policy_name,\n                  'PolicyDocument' : policy_json}\n        return self.get_response('PutUserPolicy', params, verb='POST')\n\n    def get_user_policy(self, user_name, policy_name):\n        \"\"\"\n        Retrieves the specified policy document for the specified user.\n\n        :type user_name: string\n        :param user_name: The name of the user the policy is associated with.\n\n        :type policy_name: string\n        :param policy_name: The policy document to get.\n        \n        \"\"\"\n        params = {'UserName' : user_name,\n                  'PolicyName' : policy_name}\n        return self.get_response('GetUserPolicy', params, verb='POST')\n\n    def delete_user_policy(self, user_name, policy_name):\n        \"\"\"\n        Deletes the specified policy document for the specified user.\n\n        :type user_name: string\n        :param user_name: The name of the user the policy is associated with.\n\n        :type policy_name: string\n        :param policy_name: The policy document to delete.\n        \n        \"\"\"\n        params = {'UserName' : user_name,\n                  'PolicyName' : policy_name}\n        return self.get_response('DeleteUserPolicy', params, verb='POST')\n\n    def get_groups_for_user(self, user_name, marker=None, max_items=None):\n        \"\"\"\n        List the groups that a specified user belongs to.\n\n        :type user_name: string\n        :param user_name: The name of the user to list groups for.\n\n        :type marker: string\n        :param marker: Use this only when paginating results and only in\n                       follow-up request after you've received a response\n                       where the results are truncated.  Set this to the\n                       value of the Marker element in the response you\n                       just received.\n\n        :type max_items: int\n        :param max_items: Use this only when paginating results to indicate\n                          the maximum number of groups you want in the\n                          response.\n        \"\"\"\n        params = {'UserName' : user_name}\n        if marker:\n            params['Marker'] = marker\n        if max_items:\n            params['MaxItems'] = max_items\n        return self.get_response('ListGroupsForUser', params,\n                                 list_marker='Groups')\n        \n    #\n    # Access Keys\n    #\n    \n    def get_all_access_keys(self, user_name, marker=None, max_items=None):\n        \"\"\"\n        Get all access keys associated with an account.\n\n        :type user_name: string\n        :param user_name: The username of the user\n\n        :type marker: string\n        :param marker: Use this only when paginating results and only in\n                       follow-up request after you've received a response\n                       where the results are truncated.  Set this to the\n                       value of the Marker element in the response you\n                       just received.\n\n        :type max_items: int\n        :param max_items: Use this only when paginating results to indicate\n                          the maximum number of groups you want in the\n                          response.\n        \"\"\"\n        params = {'UserName' : user_name}\n        if marker:\n            params['Marker'] = marker\n        if max_items:\n            params['MaxItems'] = max_items\n        return self.get_response('ListAccessKeys', params,\n                                 list_marker='AccessKeyMetadata')\n\n    def create_access_key(self, user_name=None):\n        \"\"\"\n        Create a new AWS Secret Access Key and corresponding AWS Access Key ID\n        for the specified user.  The default status for new keys is Active\n\n        If the user_name is not specified, the user_name is determined\n        implicitly based on the AWS Access Key ID used to sign the request.\n\n        :type user_name: string\n        :param user_name: The username of the user\n\n        \"\"\"\n        params = {'UserName' : user_name}\n        return self.get_response('CreateAccessKey', params)\n\n    def update_access_key(self, access_key_id, status, user_name=None):\n        \"\"\"\n        Changes the status of the specified access key from Active to Inactive\n        or vice versa.  This action can be used to disable a user's key as\n        part of a key rotation workflow.\n\n        If the user_name is not specified, the user_name is determined\n        implicitly based on the AWS Access Key ID used to sign the request.\n\n        :type access_key_id: string\n        :param access_key_id: The ID of the access key.\n\n        :type status: string\n        :param status: Either Active or Inactive.\n\n        :type user_name: string\n        :param user_name: The username of user (optional).\n\n        \"\"\"\n        params = {'AccessKeyId' : access_key_id,\n                  'Status' : status}\n        if user_name:\n            params['UserName'] = user_name\n        return self.get_response('UpdateAccessKey', params)\n\n    def delete_access_key(self, access_key_id, user_name=None):\n        \"\"\"\n        Delete an access key associated with a user.\n\n        If the user_name is not specified, it is determined implicitly based\n        on the AWS Access Key ID used to sign the request.\n\n        :type access_key_id: string\n        :param access_key_id: The ID of the access key to be deleted.\n\n        :type user_name: string\n        :param user_name: The username of the user\n\n        \"\"\"\n        params = {'AccessKeyId' : access_key_id}\n        if user_name:\n            params['UserName'] = user_name\n        return self.get_response('DeleteAccessKey', params)\n\n    #\n    # Signing Certificates\n    #\n    \n    def get_all_signing_certs(self, marker=None, max_items=None,\n                              user_name=None):\n        \"\"\"\n        Get all signing certificates associated with an account.\n\n        If the user_name is not specified, it is determined implicitly based\n        on the AWS Access Key ID used to sign the request.\n\n        :type marker: string\n        :param marker: Use this only when paginating results and only in\n                       follow-up request after you've received a response\n                       where the results are truncated.  Set this to the\n                       value of the Marker element in the response you\n                       just received.\n\n        :type max_items: int\n        :param max_items: Use this only when paginating results to indicate\n                          the maximum number of groups you want in the\n                          response.\n                          \n        :type user_name: string\n        :param user_name: The username of the user\n\n        \"\"\"\n        params = {}\n        if marker:\n            params['Marker'] = marker\n        if max_items:\n            params['MaxItems'] = max_items\n        if user_name:\n            params['UserName'] = user_name\n        return self.get_response('ListSigningCertificates',\n                                 params, list_marker='Certificates')\n\n    def update_signing_cert(self, cert_id, status, user_name=None):\n        \"\"\"\n        Change the status of the specified signing certificate from\n        Active to Inactive or vice versa.\n\n        If the user_name is not specified, it is determined implicitly based\n        on the AWS Access Key ID used to sign the request.\n\n        :type cert_id: string\n        :param cert_id: The ID of the signing certificate\n\n        :type status: string\n        :param status: Either Active or Inactive.\n\n        :type user_name: string\n        :param user_name: The username of the user\n        \"\"\"\n        params = {'CertificateId' : cert_id,\n                  'Status' : status}\n        if user_name:\n            params['UserName'] = user_name\n        return self.get_response('UpdateSigningCertificate', params)\n\n    def upload_signing_cert(self, cert_body, user_name=None):\n        \"\"\"\n        Uploads an X.509 signing certificate and associates it with\n        the specified user.\n\n        If the user_name is not specified, it is determined implicitly based\n        on the AWS Access Key ID used to sign the request.\n\n        :type cert_body: string\n        :param cert_body: The body of the signing certificate.\n\n        :type user_name: string\n        :param user_name: The username of the user\n\n        \"\"\"\n        params = {'CertificateBody' : cert_body}\n        if user_name:\n            params['UserName'] = user_name\n        return self.get_response('UploadSigningCertificate', params,\n                                 verb='POST')\n\n    def delete_signing_cert(self, cert_id, user_name=None):\n        \"\"\"\n        Delete a signing certificate associated with a user.\n\n        If the user_name is not specified, it is determined implicitly based\n        on the AWS Access Key ID used to sign the request.\n\n        :type user_name: string\n        :param user_name: The username of the user\n\n        :type cert_id: string\n        :param cert_id: The ID of the certificate.\n\n        \"\"\"\n        params = {'CertificateId' : cert_id}\n        if user_name:\n            params['UserName'] = user_name\n        return self.get_response('DeleteSigningCertificate', params)\n\n    #\n    # Server Certificates\n    #\n    \n    def get_all_server_certs(self, path_prefix='/',\n                             marker=None, max_items=None):\n        \"\"\"\n        Lists the server certificates that have the specified path prefix.\n        If none exist, the action returns an empty list.\n\n        :type path_prefix: string\n        :param path_prefix: If provided, only certificates whose paths match\n                            the provided prefix will be returned.\n\n        :type marker: string\n        :param marker: Use this only when paginating results and only in\n                       follow-up request after you've received a response\n                       where the results are truncated.  Set this to the\n                       value of the Marker element in the response you\n                       just received.\n\n        :type max_items: int\n        :param max_items: Use this only when paginating results to indicate\n                          the maximum number of groups you want in the\n                          response.\n                          \n        \"\"\"\n        params = {}\n        if path_prefix:\n            params['PathPrefix'] = path_prefix\n        if marker:\n            params['Marker'] = marker\n        if max_items:\n            params['MaxItems'] = max_items\n        return self.get_response('ListServerCertificates',\n                                 params,\n                                 list_marker='ServerCertificateMetadataList')\n\n    def update_server_cert(self, cert_name, new_cert_name=None,\n                           new_path=None):\n        \"\"\"\n        Updates the name and/or the path of the specified server certificate.\n\n        :type cert_name: string\n        :param cert_name: The name of the server certificate that you want\n                          to update.\n\n        :type new_cert_name: string\n        :param new_cert_name: The new name for the server certificate.\n                              Include this only if you are updating the\n                              server certificate's name.\n\n        :type new_path: string\n        :param new_path: If provided, the path of the certificate will be\n                         changed to this path.\n        \"\"\"\n        params = {'ServerCertificateName' : cert_name}\n        if new_cert_name:\n            params['NewServerCertificateName'] = new_cert_name\n        if new_path:\n            params['NewPath'] = new_path\n        return self.get_response('UpdateServerCertificate', params)\n\n    def upload_server_cert(self, cert_name, cert_body, private_key,\n                           cert_chain=None, path=None):\n        \"\"\"\n        Uploads a server certificate entity for the AWS Account.\n        The server certificate entity includes a public key certificate,\n        a private key, and an optional certificate chain, which should\n        all be PEM-encoded.\n\n        :type cert_name: string\n        :param cert_name: The name for the server certificate. Do not\n                          include the path in this value.\n\n        :type cert_body: string\n        :param cert_body: The contents of the public key certificate\n                          in PEM-encoded format.\n\n        :type private_key: string\n        :param private_key: The contents of the private key in\n                            PEM-encoded format.\n\n        :type cert_chain: string\n        :param cert_chain: The contents of the certificate chain. This\n                           is typically a concatenation of the PEM-encoded\n                           public key certificates of the chain.\n\n        :type path: string\n        :param path: The path for the server certificate.\n\n        \"\"\"\n        params = {'ServerCertificateName' : cert_name,\n                  'CertificateBody' : cert_body,\n                  'PrivateKey' : private_key}\n        if cert_chain:\n            params['CertificateChain'] = cert_chain\n        if path:\n            params['Path'] = path\n        return self.get_response('UploadServerCertificate', params,\n                                 verb='POST')\n\n    def get_server_certificate(self, cert_name):\n        \"\"\"\n        Retrieves information about the specified server certificate.\n\n        :type cert_name: string\n        :param cert_name: The name of the server certificate you want\n                          to retrieve information about.\n        \n        \"\"\"\n        params = {'ServerCertificateName' : cert_name}\n        return self.get_response('GetServerCertificate', params)\n\n    def delete_server_cert(self, cert_name):\n        \"\"\"\n        Delete the specified server certificate.\n\n        :type cert_name: string\n        :param cert_name: The name of the server certificate you want\n                          to delete.\n\n        \"\"\"\n        params = {'ServerCertificateName' : cert_name}\n        return self.get_response('DeleteServerCertificate', params)\n\n    #\n    # MFA Devices\n    #\n    \n    def get_all_mfa_devices(self, user_name, marker=None, max_items=None):\n        \"\"\"\n        Get all MFA devices associated with an account.\n\n        :type user_name: string\n        :param user_name: The username of the user\n\n        :type marker: string\n        :param marker: Use this only when paginating results and only in\n                       follow-up request after you've received a response\n                       where the results are truncated.  Set this to the\n                       value of the Marker element in the response you\n                       just received.\n\n        :type max_items: int\n        :param max_items: Use this only when paginating results to indicate\n                          the maximum number of groups you want in the\n                          response.\n                          \n        \"\"\"\n        params = {'UserName' : user_name}\n        if marker:\n            params['Marker'] = marker\n        if max_items:\n            params['MaxItems'] = max_items\n        return self.get_response('ListMFADevices',\n                                 params, list_marker='MFADevices')\n\n    def enable_mfa_device(self, user_name, serial_number,\n                          auth_code_1, auth_code_2):\n        \"\"\"\n        Enables the specified MFA device and associates it with the\n        specified user.\n\n        :type user_name: string\n        :param user_name: The username of the user\n        \n        :type serial_number: string\n        :param seriasl_number: The serial number which uniquely identifies\n                               the MFA device.\n\n        :type auth_code_1: string\n        :param auth_code_1: An authentication code emitted by the device.\n\n        :type auth_code_2: string\n        :param auth_code_2: A subsequent authentication code emitted\n                            by the device.\n\n        \"\"\"\n        params = {'UserName' : user_name,\n                  'SerialNumber' : serial_number,\n                  'AuthenticationCode1' : auth_code_1,\n                  'AuthenticationCode2' : auth_code_2}\n        return self.get_response('EnableMFADevice', params)\n\n    def deactivate_mfa_device(self, user_name, serial_number):\n        \"\"\"\n        Deactivates the specified MFA device and removes it from\n        association with the user.\n\n        :type user_name: string\n        :param user_name: The username of the user\n        \n        :type serial_number: string\n        :param seriasl_number: The serial number which uniquely identifies\n                               the MFA device.\n\n        \"\"\"\n        params = {'UserName' : user_name,\n                  'SerialNumber' : serial_number}\n        return self.get_response('DeactivateMFADevice', params)\n\n    def resync_mfa_device(self, user_name, serial_number,\n                          auth_code_1, auth_code_2):\n        \"\"\"\n        Syncronizes the specified MFA device with the AWS servers.\n\n        :type user_name: string\n        :param user_name: The username of the user\n        \n        :type serial_number: string\n        :param seriasl_number: The serial number which uniquely identifies\n                               the MFA device.\n\n        :type auth_code_1: string\n        :param auth_code_1: An authentication code emitted by the device.\n\n        :type auth_code_2: string\n        :param auth_code_2: A subsequent authentication code emitted\n                            by the device.\n\n        \"\"\"\n        params = {'UserName' : user_name,\n                  'SerialNumber' : serial_number,\n                  'AuthenticationCode1' : auth_code_1,\n                  'AuthenticationCode2' : auth_code_2}\n        return self.get_response('ResyncMFADevice', params)\n\n    #\n    # Login Profiles\n    #\n\n    def get_login_profiles(self, user_name):\n        \"\"\"\n        Retrieves the login profile for the specified user.\n        \n        :type user_name: string\n        :param user_name: The username of the user\n        \n        \"\"\"\n        params = {'UserName' : user_name}\n        return self.get_response('GetLoginProfile', params)\n    \n    def create_login_profile(self, user_name, password):\n        \"\"\"\n        Creates a login profile for the specified user, give the user the\n        ability to access AWS services and the AWS Management Console.\n\n        :type user_name: string\n        :param user_name: The name of the user\n\n        :type password: string\n        :param password: The new password for the user\n\n        \"\"\"\n        params = {'UserName' : user_name,\n                  'Password' : password}\n        return self.get_response('CreateLoginProfile', params)\n\n    def delete_login_profile(self, user_name):\n        \"\"\"\n        Deletes the login profile associated with the specified user.\n\n        :type user_name: string\n        :param user_name: The name of the user to delete.\n\n        \"\"\"\n        params = {'UserName' : user_name}\n        return self.get_response('DeleteLoginProfile', params)\n\n    def update_login_profile(self, user_name, password):\n        \"\"\"\n        Resets the password associated with the user's login profile.\n\n        :type user_name: string\n        :param user_name: The name of the user\n\n        :type password: string\n        :param password: The new password for the user\n\n        \"\"\"\n        params = {'UserName' : user_name,\n                  'Password' : password}\n        return self.get_response('UpdateLoginProfile', params)\n    \n    def create_account_alias(self, alias):\n        \"\"\"\n        Creates a new alias for the AWS account.\n\n        For more information on account id aliases, please see\n        http://goo.gl/ToB7G\n\n        :type alias: string\n        :param alias: The alias to attach to the account. \n        \"\"\"\n        params = {'AccountAlias': alias}\n        return self.get_response('CreateAccountAlias', params)\n    \n    def delete_account_alias(self, alias):\n        \"\"\"\n        Deletes an alias for the AWS account.\n\n        For more information on account id aliases, please see\n        http://goo.gl/ToB7G\n\n        :type alias: string\n        :param alias: The alias to remove from the account.\n        \"\"\"\n        params = {'AccountAlias': alias}\n        return self.get_response('DeleteAccountAlias', params)\n    \n    def get_account_alias(self):\n        \"\"\"\n        Get the alias for the current account.\n\n        This is referred to in the docs as list_account_aliases,\n        but it seems you can only have one account alias currently.\n        \n        For more information on account id aliases, please see\n        http://goo.gl/ToB7G\n        \"\"\"\n        return self.get_response('ListAccountAliases', {},\n                                 list_marker='AccountAliases')\n\n    def get_signin_url(self, service='ec2'):\n        \"\"\"\n        Get the URL where IAM users can use their login profile to sign in\n        to this account's console.\n\n        :type service: string\n        :param service: Default service to go to in the console.\n        \"\"\"\n        alias = self.get_account_alias()\n        if not alias:\n            raise Exception('No alias associated with this account.  Please use iam.create_account_alias() first.')\n\n        return \"https://%s.signin.aws.amazon.com/console/%s\" % (alias, service)\n\n    def get_account_summary(self):\n        \"\"\"\n        Get the alias for the current account.\n\n        This is referred to in the docs as list_account_aliases,\n        but it seems you can only have one account alias currently.\n        \n        For more information on account id aliases, please see\n        http://goo.gl/ToB7G\n        \"\"\"\n        return self.get_object('GetAccountSummary', {}, SummaryMap)\n\n    \n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/iam/summarymap.py",
    "content": "# Copyright (c) 2010 Mitch Garnaat http://garnaat.org/\n# Copyright (c) 2010, Eucalyptus Systems, Inc.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nclass SummaryMap(dict):\n\n    def __init__(self, parent=None):\n        self.parent = parent\n        dict.__init__(self)\n\n    def startElement(self, name, attrs, connection):\n        pass\n\n    def endElement(self, name, value, connection):\n        if name == 'key':\n            self._name = value\n        elif name == 'value':\n            try:\n                self[self._name] = int(value)\n            except ValueError:\n                self[self._name] = value\n        else:\n            setattr(self, name, value)\n\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/jsonresponse.py",
    "content": "# Copyright (c) 2010 Mitch Garnaat http://garnaat.org/\n# Copyright (c) 2010, Eucalyptus Systems, Inc.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nimport xml.sax\nimport utils\n\nclass XmlHandler(xml.sax.ContentHandler):\n\n    def __init__(self, root_node, connection):\n        self.connection = connection\n        self.nodes = [('root', root_node)]\n        self.current_text = ''\n\n    def startElement(self, name, attrs):\n        self.current_text = ''\n        t = self.nodes[-1][1].startElement(name, attrs, self.connection)\n        if t != None:\n            if isinstance(t, tuple):\n                self.nodes.append(t)\n            else:\n                self.nodes.append((name, t))\n\n    def endElement(self, name):\n        self.nodes[-1][1].endElement(name, self.current_text, self.connection)\n        if self.nodes[-1][0] == name:\n            self.nodes.pop()\n        self.current_text = ''\n\n    def characters(self, content):\n        self.current_text += content\n\n    def parse(self, s):\n        xml.sax.parseString(s, self)\n        \nclass Element(dict):\n\n    def __init__(self, connection=None, element_name=None,\n                 stack=None, parent=None, list_marker=('Set',),\n                 item_marker=('member', 'item'),\n                 pythonize_name=False):\n        dict.__init__(self)\n        self.connection = connection\n        self.element_name = element_name\n        self.list_marker = utils.mklist(list_marker)\n        self.item_marker = utils.mklist(item_marker)\n        if stack is None:\n            self.stack = []\n        else:\n            self.stack = stack\n        self.pythonize_name = pythonize_name\n        self.parent = parent\n\n    def __getattr__(self, key):\n        if key in self:\n            return self[key]\n        for k in self:\n            e = self[k]\n            if isinstance(e, Element):\n                try:\n                    return getattr(e, key)\n                except AttributeError:\n                    pass\n        raise AttributeError\n\n    def get_name(self, name):\n        if self.pythonize_name:\n            name = utils.pythonize_name(name)\n        return name\n\n    def startElement(self, name, attrs, connection):\n        self.stack.append(name)\n        for lm in self.list_marker:\n            if name.endswith(lm):\n                l = ListElement(self.connection, name, self.list_marker,\n                                self.item_marker, self.pythonize_name)\n                self[self.get_name(name)] = l\n                return l\n        if len(self.stack) > 0:\n            element_name = self.stack[-1]\n            e = Element(self.connection, element_name, self.stack, self,\n                        self.list_marker, self.item_marker,\n                        self.pythonize_name)\n            self[self.get_name(element_name)] = e\n            return (element_name, e)\n        else:\n            return None\n\n    def endElement(self, name, value, connection):\n        if len(self.stack) > 0:\n            self.stack.pop()\n        value = value.strip()\n        if value:\n            if isinstance(self.parent, Element):\n                self.parent[self.get_name(name)] = value\n            elif isinstance(self.parent, ListElement):\n                self.parent.append(value)\n\nclass ListElement(list):\n\n    def __init__(self, connection=None, element_name=None,\n                 list_marker=['Set'], item_marker=('member', 'item'),\n                 pythonize_name=False):\n        list.__init__(self)\n        self.connection = connection\n        self.element_name = element_name\n        self.list_marker = list_marker\n        self.item_marker = item_marker\n        self.pythonize_name = pythonize_name\n\n    def get_name(self, name):\n        if self.pythonize_name:\n            name = utils.pythonize_name(name)\n        return name\n\n    def startElement(self, name, attrs, connection):\n        for lm in self.list_marker:\n            if name.endswith(lm):\n                l = ListElement(self.connection, name, self.item_marker,\n                                pythonize_name=self.pythonize_name)\n                setattr(self, self.get_name(name), l)\n                return l\n        if name in self.item_marker:\n            e = Element(self.connection, name, parent=self,\n                        pythonize_name=self.pythonize_name)\n            self.append(e)\n            return e\n        else:\n            return None\n\n    def endElement(self, name, value, connection):\n        if name == self.element_name:\n            if len(self) > 0:\n                empty = []\n                for e in self:\n                    if isinstance(e, Element):\n                        if len(e) == 0:\n                            empty.append(e)\n                for e in empty:\n                    self.remove(e)\n        else:\n            setattr(self, self.get_name(name), value)\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/manage/__init__.py",
    "content": "# Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n#\n\n\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/manage/cmdshell.py",
    "content": "# Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nfrom boto.mashups.interactive import interactive_shell\nimport boto\nimport os\nimport time\nimport shutil\nimport StringIO\nimport paramiko\nimport socket\nimport subprocess\n\n\nclass SSHClient(object):\n\n    def __init__(self, server,\n                 host_key_file='~/.ssh/known_hosts',\n                 uname='root', ssh_pwd=None):\n        self.server = server\n        self.host_key_file = host_key_file\n        self.uname = uname\n        self._pkey = paramiko.RSAKey.from_private_key_file(server.ssh_key_file,\n                                                           password=ssh_pwd)\n        self._ssh_client = paramiko.SSHClient()\n        self._ssh_client.load_system_host_keys()\n        self._ssh_client.load_host_keys(os.path.expanduser(host_key_file))\n        self._ssh_client.set_missing_host_key_policy(paramiko.AutoAddPolicy())\n        self.connect()\n\n    def connect(self):\n        retry = 0\n        while retry < 5:\n            try:\n                self._ssh_client.connect(self.server.hostname,\n                                         username=self.uname,\n                                         pkey=self._pkey)\n                return\n            except socket.error, (value,message):\n                if value == 61 or value == 111:\n                    print 'SSH Connection refused, will retry in 5 seconds'\n                    time.sleep(5)\n                    retry += 1\n                else:\n                    raise\n            except paramiko.BadHostKeyException:\n                print \"%s has an entry in ~/.ssh/known_hosts and it doesn't match\" % self.server.hostname\n                print 'Edit that file to remove the entry and then hit return to try again'\n                raw_input('Hit Enter when ready')\n                retry += 1\n            except EOFError:\n                print 'Unexpected Error from SSH Connection, retry in 5 seconds'\n                time.sleep(5)\n                retry += 1\n        print 'Could not establish SSH connection'\n\n    def open_sftp(self):\n        return self._ssh_client.open_sftp()\n\n    def get_file(self, src, dst):\n        sftp_client = self.open_sftp()\n        sftp_client.get(src, dst)\n\n    def put_file(self, src, dst):\n        sftp_client = self.open_sftp()\n        sftp_client.put(src, dst)\n\n    def open(self, filename, mode='r', bufsize=-1):\n        \"\"\"\n        Open a file on the remote system and return a file-like object.\n        \"\"\"\n        sftp_client = self.open_sftp()\n        return sftp_client.open(filename, mode, bufsize)\n\n    def listdir(self, path):\n        sftp_client = self.open_sftp()\n        return sftp_client.listdir(path)\n\n    def isdir(self, path):\n        status = self.run('[ -d %s ] || echo \"FALSE\"' % path)\n        if status[1].startswith('FALSE'):\n            return 0\n        return 1\n\n    def exists(self, path):\n        status = self.run('[ -a %s ] || echo \"FALSE\"' % path)\n        if status[1].startswith('FALSE'):\n            return 0\n        return 1\n\n    def shell(self):\n        \"\"\"\n        Start an interactive shell session on the remote host.\n        \"\"\"\n        channel = self._ssh_client.invoke_shell()\n        interactive_shell(channel)\n\n    def run(self, command):\n        \"\"\"\n        Execute a command on the remote host.  Return a tuple containing\n        an integer status and a two strings, the first containing stdout\n        and the second containing stderr from the command.\n        \"\"\"\n        boto.log.debug('running:%s on %s' % (command, self.server.instance_id))\n        status = 0\n        try:\n            t = self._ssh_client.exec_command(command)\n        except paramiko.SSHException:\n            status = 1\n        std_out = t[1].read()\n        std_err = t[2].read()\n        t[0].close()\n        t[1].close()\n        t[2].close()\n        boto.log.debug('stdout: %s' % std_out)\n        boto.log.debug('stderr: %s' % std_err)\n        return (status, std_out, std_err)\n\n    def run_pty(self, command):\n        \"\"\"\n        Execute a command on the remote host with a pseudo-terminal.\n        Returns a string containing the output of the command.\n        \"\"\"\n        boto.log.debug('running:%s on %s' % (command, self.server.instance_id))\n        channel = self._ssh_client.get_transport().open_session()\n        channel.get_pty()\n        channel.exec_command(command)\n        return channel.recv(1024)\n\n    def close(self):\n        transport = self._ssh_client.get_transport()\n        transport.close()\n        self.server.reset_cmdshell()\n\nclass LocalClient(object):\n\n    def __init__(self, server, host_key_file=None, uname='root'):\n        self.server = server\n        self.host_key_file = host_key_file\n        self.uname = uname\n\n    def get_file(self, src, dst):\n        shutil.copyfile(src, dst)\n\n    def put_file(self, src, dst):\n        shutil.copyfile(src, dst)\n\n    def listdir(self, path):\n        return os.listdir(path)\n\n    def isdir(self, path):\n        return os.path.isdir(path)\n\n    def exists(self, path):\n        return os.path.exists(path)\n\n    def shell(self):\n        raise NotImplementedError, 'shell not supported with LocalClient'\n\n    def run(self):\n        boto.log.info('running:%s' % self.command)\n        log_fp = StringIO.StringIO()\n        process = subprocess.Popen(self.command, shell=True, stdin=subprocess.PIPE,\n                                   stdout=subprocess.PIPE, stderr=subprocess.PIPE)\n        while process.poll() == None:\n            time.sleep(1)\n            t = process.communicate()\n            log_fp.write(t[0])\n            log_fp.write(t[1])\n        boto.log.info(log_fp.getvalue())\n        boto.log.info('output: %s' % log_fp.getvalue())\n        return (process.returncode, log_fp.getvalue())\n\n    def close(self):\n        pass\n\nclass FakeServer(object):\n    \"\"\"\n    A little class to fake out SSHClient (which is expecting a\n    :class`boto.manage.server.Server` instance.  This allows us\n    to \n    \"\"\"\n    def __init__(self, instance, ssh_key_file):\n        self.instance = instance\n        self.ssh_key_file = ssh_key_file\n        self.hostname = instance.dns_name\n        self.instance_id = self.instance.id\n        \ndef start(server):\n    instance_id = boto.config.get('Instance', 'instance-id', None)\n    if instance_id == server.instance_id:\n        return LocalClient(server)\n    else:\n        return SSHClient(server)\n\ndef sshclient_from_instance(instance, ssh_key_file,\n                            host_key_file='~/.ssh/known_hosts',\n                            user_name='root', ssh_pwd=None):\n    \"\"\"\n    Create and return an SSHClient object given an\n    instance object.\n\n    :type instance: :class`boto.ec2.instance.Instance` object\n    :param instance: The instance object.\n\n    :type ssh_key_file: str\n    :param ssh_key_file: A path to the private key file used\n                         to log into instance.\n\n    :type host_key_file: str\n    :param host_key_file: A path to the known_hosts file used\n                          by the SSH client.\n                          Defaults to ~/.ssh/known_hosts\n    :type user_name: str\n    :param user_name: The username to use when logging into\n                      the instance.  Defaults to root.\n\n    :type ssh_pwd: str\n    :param ssh_pwd: The passphrase, if any, associated with\n                    private key.\n    \"\"\"\n    s = FakeServer(instance, ssh_key_file)\n    return SSHClient(s, host_key_file, user_name, ssh_pwd)\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/manage/propget.py",
    "content": "# Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\n\ndef get(prop, choices=None):\n    prompt = prop.verbose_name\n    if not prompt:\n        prompt = prop.name\n    if choices:\n        if callable(choices):\n            choices = choices()\n    else:\n        choices = prop.get_choices()\n    valid = False\n    while not valid:\n        if choices:\n            min = 1\n            max = len(choices)\n            for i in range(min, max+1):\n                value = choices[i-1]\n                if isinstance(value, tuple):\n                    value = value[0]\n                print '[%d] %s' % (i, value)\n            value = raw_input('%s [%d-%d]: ' % (prompt, min, max))\n            try:\n                int_value = int(value)\n                value = choices[int_value-1]\n                if isinstance(value, tuple):\n                    value = value[1]\n                valid = True\n            except ValueError:\n                print '%s is not a valid choice' % value\n            except IndexError:\n                print '%s is not within the range[%d-%d]' % (min, max)\n        else:\n            value = raw_input('%s: ' % prompt)\n            try:\n                value = prop.validate(value)\n                if prop.empty(value) and prop.required:\n                    print 'A value is required'\n                else:\n                    valid = True\n            except:\n                print 'Invalid value: %s' % value\n    return value\n        \n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/manage/server.py",
    "content": "# Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/\n# Copyright (c) 2010 Chris Moyer http://coredumped.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\n\"\"\"\nHigh-level abstraction of an EC2 server\n\"\"\"\nfrom __future__ import with_statement\nimport boto.ec2\nfrom boto.mashups.iobject import IObject\nfrom boto.pyami.config import BotoConfigPath, Config\nfrom boto.sdb.db.model import Model\nfrom boto.sdb.db.property import StringProperty, IntegerProperty, BooleanProperty, CalculatedProperty\nfrom boto.manage import propget\nfrom boto.ec2.zone import Zone\nfrom boto.ec2.keypair import KeyPair\nimport os, time, StringIO\nfrom contextlib import closing\nfrom boto.exception import EC2ResponseError\n\nInstanceTypes = ['m1.small', 'm1.large', 'm1.xlarge',\n                 'c1.medium', 'c1.xlarge',\n                 'm2.2xlarge', 'm2.4xlarge']\n\nclass Bundler(object):\n\n    def __init__(self, server, uname='root'):\n        from boto.manage.cmdshell import SSHClient\n        self.server = server\n        self.uname = uname\n        self.ssh_client = SSHClient(server, uname=uname)\n\n    def copy_x509(self, key_file, cert_file):\n        print '\\tcopying cert and pk over to /mnt directory on server'\n        self.ssh_client.open_sftp()\n        path, name = os.path.split(key_file)\n        self.remote_key_file = '/mnt/%s' % name\n        self.ssh_client.put_file(key_file, self.remote_key_file)\n        path, name = os.path.split(cert_file)\n        self.remote_cert_file = '/mnt/%s' % name\n        self.ssh_client.put_file(cert_file, self.remote_cert_file)\n        print '...complete!'\n\n    def bundle_image(self, prefix, size, ssh_key):\n        command = \"\"\n        if self.uname != 'root':\n            command = \"sudo \"\n        command += 'ec2-bundle-vol '\n        command += '-c %s -k %s ' % (self.remote_cert_file, self.remote_key_file)\n        command += '-u %s ' % self.server._reservation.owner_id\n        command += '-p %s ' % prefix\n        command += '-s %d ' % size\n        command += '-d /mnt '\n        if self.server.instance_type == 'm1.small' or self.server.instance_type == 'c1.medium':\n            command += '-r i386'\n        else:\n            command += '-r x86_64'\n        return command\n\n    def upload_bundle(self, bucket, prefix, ssh_key):\n        command = \"\"\n        if self.uname != 'root':\n            command = \"sudo \"\n        command += 'ec2-upload-bundle '\n        command += '-m /mnt/%s.manifest.xml ' % prefix\n        command += '-b %s ' % bucket\n        command += '-a %s ' % self.server.ec2.aws_access_key_id\n        command += '-s %s ' % self.server.ec2.aws_secret_access_key\n        return command\n\n    def bundle(self, bucket=None, prefix=None, key_file=None, cert_file=None,\n               size=None, ssh_key=None, fp=None, clear_history=True):\n        iobject = IObject()\n        if not bucket:\n            bucket = iobject.get_string('Name of S3 bucket')\n        if not prefix:\n            prefix = iobject.get_string('Prefix for AMI file')\n        if not key_file:\n            key_file = iobject.get_filename('Path to RSA private key file')\n        if not cert_file:\n            cert_file = iobject.get_filename('Path to RSA public cert file')\n        if not size:\n            size = iobject.get_int('Size (in MB) of bundled image')\n        if not ssh_key:\n            ssh_key = self.server.get_ssh_key_file()\n        self.copy_x509(key_file, cert_file)\n        if not fp:\n            fp = StringIO.StringIO()\n        fp.write('sudo mv %s /mnt/boto.cfg; ' % BotoConfigPath)\n        fp.write('mv ~/.ssh/authorized_keys /mnt/authorized_keys; ')\n        if clear_history:\n            fp.write('history -c; ')\n        fp.write(self.bundle_image(prefix, size, ssh_key))\n        fp.write('; ')\n        fp.write(self.upload_bundle(bucket, prefix, ssh_key))\n        fp.write('; ')\n        fp.write('sudo mv /mnt/boto.cfg %s; ' % BotoConfigPath)\n        fp.write('mv /mnt/authorized_keys ~/.ssh/authorized_keys')\n        command = fp.getvalue()\n        print 'running the following command on the remote server:'\n        print command\n        t = self.ssh_client.run(command)\n        print '\\t%s' % t[0]\n        print '\\t%s' % t[1]\n        print '...complete!'\n        print 'registering image...'\n        self.image_id = self.server.ec2.register_image(name=prefix, image_location='%s/%s.manifest.xml' % (bucket, prefix))\n        return self.image_id\n\nclass CommandLineGetter(object):\n\n    def get_ami_list(self):\n        my_amis = []\n        for ami in self.ec2.get_all_images():\n            # hack alert, need a better way to do this!\n            if ami.location.find('pyami') >= 0:\n                my_amis.append((ami.location, ami))\n        return my_amis\n    \n    def get_region(self, params):\n        region = params.get('region', None)\n        if isinstance(region, str) or isinstance(region, unicode):\n            region = boto.ec2.get_region(region)\n            params['region'] = region\n        if not region:\n            prop = self.cls.find_property('region_name')\n            params['region'] = propget.get(prop, choices=boto.ec2.regions)\n        self.ec2 = params['region'].connect()\n\n    def get_name(self, params):\n        if not params.get('name', None):\n            prop = self.cls.find_property('name')\n            params['name'] = propget.get(prop)\n\n    def get_description(self, params):\n        if not params.get('description', None):\n            prop = self.cls.find_property('description')\n            params['description'] = propget.get(prop)\n\n    def get_instance_type(self, params):\n        if not params.get('instance_type', None):\n            prop = StringProperty(name='instance_type', verbose_name='Instance Type',\n                                  choices=InstanceTypes)\n            params['instance_type'] = propget.get(prop)\n\n    def get_quantity(self, params):\n        if not params.get('quantity', None):\n            prop = IntegerProperty(name='quantity', verbose_name='Number of Instances')\n            params['quantity'] = propget.get(prop)\n\n    def get_zone(self, params):\n        if not params.get('zone', None):\n            prop = StringProperty(name='zone', verbose_name='EC2 Availability Zone',\n                                  choices=self.ec2.get_all_zones)\n            params['zone'] = propget.get(prop)\n            \n    def get_ami_id(self, params):\n        valid = False\n        while not valid:\n            ami = params.get('ami', None)\n            if not ami:\n                prop = StringProperty(name='ami', verbose_name='AMI')\n                ami = propget.get(prop)\n            try:\n                rs = self.ec2.get_all_images([ami])\n                if len(rs) == 1:\n                    valid = True\n                    params['ami'] = rs[0]\n            except EC2ResponseError:\n                pass\n\n    def get_group(self, params):\n        group = params.get('group', None)\n        if isinstance(group, str) or isinstance(group, unicode):\n            group_list = self.ec2.get_all_security_groups()\n            for g in group_list:\n                if g.name == group:\n                    group = g\n                    params['group'] = g\n        if not group:\n            prop = StringProperty(name='group', verbose_name='EC2 Security Group',\n                                  choices=self.ec2.get_all_security_groups)\n            params['group'] = propget.get(prop)\n\n    def get_key(self, params):\n        keypair = params.get('keypair', None)\n        if isinstance(keypair, str) or isinstance(keypair, unicode):\n            key_list = self.ec2.get_all_key_pairs()\n            for k in key_list:\n                if k.name == keypair:\n                    keypair = k.name\n                    params['keypair'] = k.name\n        if not keypair:\n            prop = StringProperty(name='keypair', verbose_name='EC2 KeyPair',\n                                  choices=self.ec2.get_all_key_pairs)\n            params['keypair'] = propget.get(prop).name\n\n    def get(self, cls, params):\n        self.cls = cls\n        self.get_region(params)\n        self.ec2 = params['region'].connect()\n        self.get_name(params)\n        self.get_description(params)\n        self.get_instance_type(params)\n        self.get_zone(params)\n        self.get_quantity(params)\n        self.get_ami_id(params)\n        self.get_group(params)\n        self.get_key(params)\n\nclass Server(Model):\n\n    #\n    # The properties of this object consists of real properties for data that\n    # is not already stored in EC2 somewhere (e.g. name, description) plus\n    # calculated properties for all of the properties that are already in\n    # EC2 (e.g. hostname, security groups, etc.)\n    #\n    name = StringProperty(unique=True, verbose_name=\"Name\")\n    description = StringProperty(verbose_name=\"Description\")\n    region_name = StringProperty(verbose_name=\"EC2 Region Name\")\n    instance_id = StringProperty(verbose_name=\"EC2 Instance ID\")\n    elastic_ip = StringProperty(verbose_name=\"EC2 Elastic IP Address\")\n    production = BooleanProperty(verbose_name=\"Is This Server Production\", default=False)\n    ami_id = CalculatedProperty(verbose_name=\"AMI ID\", calculated_type=str, use_method=True)\n    zone = CalculatedProperty(verbose_name=\"Availability Zone Name\", calculated_type=str, use_method=True)\n    hostname = CalculatedProperty(verbose_name=\"Public DNS Name\", calculated_type=str, use_method=True)\n    private_hostname = CalculatedProperty(verbose_name=\"Private DNS Name\", calculated_type=str, use_method=True)\n    groups = CalculatedProperty(verbose_name=\"Security Groups\", calculated_type=list, use_method=True)\n    security_group = CalculatedProperty(verbose_name=\"Primary Security Group Name\", calculated_type=str, use_method=True)\n    key_name = CalculatedProperty(verbose_name=\"Key Name\", calculated_type=str, use_method=True)\n    instance_type = CalculatedProperty(verbose_name=\"Instance Type\", calculated_type=str, use_method=True)\n    status = CalculatedProperty(verbose_name=\"Current Status\", calculated_type=str, use_method=True)\n    launch_time = CalculatedProperty(verbose_name=\"Server Launch Time\", calculated_type=str, use_method=True)\n    console_output = CalculatedProperty(verbose_name=\"Console Output\", calculated_type=file, use_method=True)\n\n    packages = []\n    plugins = []\n\n    @classmethod\n    def add_credentials(cls, cfg, aws_access_key_id, aws_secret_access_key):\n        if not cfg.has_section('Credentials'):\n            cfg.add_section('Credentials')\n        cfg.set('Credentials', 'aws_access_key_id', aws_access_key_id)\n        cfg.set('Credentials', 'aws_secret_access_key', aws_secret_access_key)\n        if not cfg.has_section('DB_Server'):\n            cfg.add_section('DB_Server')\n        cfg.set('DB_Server', 'db_type', 'SimpleDB')\n        cfg.set('DB_Server', 'db_name', cls._manager.domain.name)\n\n    @classmethod\n    def create(cls, config_file=None, logical_volume = None, cfg = None, **params):\n        \"\"\"\n        Create a new instance based on the specified configuration file or the specified\n        configuration and the passed in parameters.\n        \n        If the config_file argument is not None, the configuration is read from there. \n        Otherwise, the cfg argument is used.\n        \n        The config file may include other config files with a #import reference. The included\n        config files must reside in the same directory as the specified file. \n        \n        The logical_volume argument, if supplied, will be used to get the current physical \n        volume ID and use that as an override of the value specified in the config file. This \n        may be useful for debugging purposes when you want to debug with a production config \n        file but a test Volume. \n        \n        The dictionary argument may be used to override any EC2 configuration values in the \n        config file. \n        \"\"\"\n        if config_file:\n            cfg = Config(path=config_file)\n        if cfg.has_section('EC2'):\n            # include any EC2 configuration values that aren't specified in params:\n            for option in cfg.options('EC2'):\n                if option not in params:\n                    params[option] = cfg.get('EC2', option)\n        getter = CommandLineGetter()\n        getter.get(cls, params)\n        region = params.get('region')\n        ec2 = region.connect()\n        cls.add_credentials(cfg, ec2.aws_access_key_id, ec2.aws_secret_access_key)\n        ami = params.get('ami')\n        kp = params.get('keypair')\n        group = params.get('group')\n        zone = params.get('zone')\n        # deal with possibly passed in logical volume:\n        if logical_volume != None:\n           cfg.set('EBS', 'logical_volume_name', logical_volume.name) \n        cfg_fp = StringIO.StringIO()\n        cfg.write(cfg_fp)\n        # deal with the possibility that zone and/or keypair are strings read from the config file:\n        if isinstance(zone, Zone):\n            zone = zone.name\n        if isinstance(kp, KeyPair):\n            kp = kp.name\n        reservation = ami.run(min_count=1,\n                              max_count=params.get('quantity', 1),\n                              key_name=kp,\n                              security_groups=[group],\n                              instance_type=params.get('instance_type'),\n                              placement = zone,\n                              user_data = cfg_fp.getvalue())\n        l = []\n        i = 0\n        elastic_ip = params.get('elastic_ip')\n        instances = reservation.instances\n        if elastic_ip != None and instances.__len__() > 0:\n            instance = instances[0]\n            print 'Waiting for instance to start so we can set its elastic IP address...'\n            # Sometimes we get a message from ec2 that says that the instance does not exist.\n            # Hopefully the following delay will giv eec2 enough time to get to a stable state:\n            time.sleep(5) \n            while instance.update() != 'running':\n                time.sleep(1)\n            instance.use_ip(elastic_ip)\n            print 'set the elastic IP of the first instance to %s' % elastic_ip\n        for instance in instances:\n            s = cls()\n            s.ec2 = ec2\n            s.name = params.get('name') + '' if i==0 else str(i)\n            s.description = params.get('description')\n            s.region_name = region.name\n            s.instance_id = instance.id\n            if elastic_ip and i == 0:\n                s.elastic_ip = elastic_ip\n            s.put()\n            l.append(s)\n            i += 1\n        return l\n    \n    @classmethod\n    def create_from_instance_id(cls, instance_id, name, description=''):\n        regions = boto.ec2.regions()\n        for region in regions:\n            ec2 = region.connect()\n            try:\n                rs = ec2.get_all_instances([instance_id])\n            except:\n                rs = []\n            if len(rs) == 1:\n                s = cls()\n                s.ec2 = ec2\n                s.name = name\n                s.description = description\n                s.region_name = region.name\n                s.instance_id = instance_id\n                s._reservation = rs[0]\n                for instance in s._reservation.instances:\n                    if instance.id == instance_id:\n                        s._instance = instance\n                s.put()\n                return s\n        return None\n\n    @classmethod\n    def create_from_current_instances(cls):\n        servers = []\n        regions = boto.ec2.regions()\n        for region in regions:\n            ec2 = region.connect()\n            rs = ec2.get_all_instances()\n            for reservation in rs:\n                for instance in reservation.instances:\n                    try:\n                        Server.find(instance_id=instance.id).next()\n                        boto.log.info('Server for %s already exists' % instance.id)\n                    except StopIteration:\n                        s = cls()\n                        s.ec2 = ec2\n                        s.name = instance.id\n                        s.region_name = region.name\n                        s.instance_id = instance.id\n                        s._reservation = reservation\n                        s.put()\n                        servers.append(s)\n        return servers\n    \n    def __init__(self, id=None, **kw):\n        Model.__init__(self, id, **kw)\n        self.ssh_key_file = None\n        self.ec2 = None\n        self._cmdshell = None\n        self._reservation = None\n        self._instance = None\n        self._setup_ec2()\n\n    def _setup_ec2(self):\n        if self.ec2 and self._instance and self._reservation:\n            return\n        if self.id:\n            if self.region_name:\n                for region in boto.ec2.regions():\n                    if region.name == self.region_name:\n                        self.ec2 = region.connect()\n                        if self.instance_id and not self._instance:\n                            try:\n                                rs = self.ec2.get_all_instances([self.instance_id])\n                                if len(rs) >= 1:\n                                    for instance in rs[0].instances:\n                                        if instance.id == self.instance_id:\n                                            self._reservation = rs[0]\n                                            self._instance = instance\n                            except EC2ResponseError:\n                                pass\n                            \n    def _status(self):\n        status = ''\n        if self._instance:\n            self._instance.update()\n            status = self._instance.state\n        return status\n\n    def _hostname(self):\n        hostname = ''\n        if self._instance:\n            hostname = self._instance.public_dns_name\n        return hostname\n\n    def _private_hostname(self):\n        hostname = ''\n        if self._instance:\n            hostname = self._instance.private_dns_name\n        return hostname\n\n    def _instance_type(self):\n        it = ''\n        if self._instance:\n            it = self._instance.instance_type\n        return it\n\n    def _launch_time(self):\n        lt = ''\n        if self._instance:\n            lt = self._instance.launch_time\n        return lt\n\n    def _console_output(self):\n        co = ''\n        if self._instance:\n            co = self._instance.get_console_output()\n        return co\n\n    def _groups(self):\n        gn = []\n        if self._reservation:\n            gn = self._reservation.groups\n        return gn\n\n    def _security_group(self):\n        groups = self._groups()\n        if len(groups) >= 1:\n            return groups[0].id\n        return \"\"\n\n    def _zone(self):\n        zone = None\n        if self._instance:\n            zone = self._instance.placement\n        return zone\n\n    def _key_name(self):\n        kn = None\n        if self._instance:\n            kn = self._instance.key_name\n        return kn\n\n    def put(self):\n        Model.put(self)\n        self._setup_ec2()\n\n    def delete(self):\n        if self.production:\n            raise ValueError, \"Can't delete a production server\"\n        #self.stop()\n        Model.delete(self)\n\n    def stop(self):\n        if self.production:\n            raise ValueError, \"Can't delete a production server\"\n        if self._instance:\n            self._instance.stop()\n\n    def terminate(self):\n        if self.production:\n            raise ValueError, \"Can't delete a production server\"\n        if self._instance:\n            self._instance.terminate()\n\n    def reboot(self):\n        if self._instance:\n            self._instance.reboot()\n\n    def wait(self):\n        while self.status != 'running':\n            time.sleep(5)\n\n    def get_ssh_key_file(self):\n        if not self.ssh_key_file:\n            ssh_dir = os.path.expanduser('~/.ssh')\n            if os.path.isdir(ssh_dir):\n                ssh_file = os.path.join(ssh_dir, '%s.pem' % self.key_name)\n                if os.path.isfile(ssh_file):\n                    self.ssh_key_file = ssh_file\n            if not self.ssh_key_file:\n                iobject = IObject()\n                self.ssh_key_file = iobject.get_filename('Path to OpenSSH Key file')\n        return self.ssh_key_file\n\n    def get_cmdshell(self):\n        if not self._cmdshell:\n            import cmdshell\n            self.get_ssh_key_file()\n            self._cmdshell = cmdshell.start(self)\n        return self._cmdshell\n\n    def reset_cmdshell(self):\n        self._cmdshell = None\n\n    def run(self, command):\n        with closing(self.get_cmdshell()) as cmd:\n            status = cmd.run(command)\n        return status\n\n    def get_bundler(self, uname='root'):\n        self.get_ssh_key_file()\n        return Bundler(self, uname)\n\n    def get_ssh_client(self, uname='root', ssh_pwd=None):\n        from boto.manage.cmdshell import SSHClient\n        self.get_ssh_key_file()\n        return SSHClient(self, uname=uname, ssh_pwd=ssh_pwd)\n\n    def install(self, pkg):\n        return self.run('apt-get -y install %s' % pkg)\n\n\n    \n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/manage/task.py",
    "content": "# Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n#\n\nimport boto\nfrom boto.sdb.db.property import StringProperty, DateTimeProperty, IntegerProperty\nfrom boto.sdb.db.model import Model\nimport datetime, subprocess, StringIO, time\n\ndef check_hour(val):\n    if val == '*':\n        return\n    if int(val) < 0 or int(val) > 23:\n        raise ValueError\n    \nclass Task(Model):\n\n    \"\"\"\n    A scheduled, repeating task that can be executed by any participating servers.\n    The scheduling is similar to cron jobs.  Each task has an hour attribute.\n    The allowable values for hour are [0-23|*].\n\n    To keep the operation reasonably efficient and not cause excessive polling,\n    the minimum granularity of a Task is hourly.  Some examples:\n    \n         hour='*' - the task would be executed each hour\n         hour='3' - the task would be executed at 3AM GMT each day.\n         \n    \"\"\"\n    name = StringProperty()\n    hour = StringProperty(required=True, validator=check_hour, default='*')\n    command = StringProperty(required=True)\n    last_executed = DateTimeProperty()\n    last_status = IntegerProperty()\n    last_output = StringProperty()\n    message_id = StringProperty()\n\n    @classmethod\n    def start_all(cls, queue_name):\n        for task in cls.all():\n            task.start(queue_name)\n            \n    def __init__(self, id=None, **kw):\n        Model.__init__(self, id, **kw)\n        self.hourly = self.hour == '*'\n        self.daily = self.hour != '*'\n        self.now = datetime.datetime.utcnow()\n        \n    def check(self):\n        \"\"\"\n        Determine how long until the next scheduled time for a Task.\n        Returns the number of seconds until the next scheduled time or zero\n        if the task needs to be run immediately.\n        If it's an hourly task and it's never been run, run it now.\n        If it's a daily task and it's never been run and the hour is right, run it now.\n        \"\"\"\n        boto.log.info('checking Task[%s]-now=%s, last=%s' % (self.name, self.now, self.last_executed))\n\n        if self.hourly and not self.last_executed:\n            return 0\n            \n        if self.daily and not self.last_executed:\n            if int(self.hour) == self.now.hour:\n                return 0\n            else:\n                return max( (int(self.hour)-self.now.hour), (self.now.hour-int(self.hour)) )*60*60\n\n        delta = self.now - self.last_executed\n        if self.hourly:\n            if delta.seconds >= 60*60:\n                return 0\n            else:\n                return 60*60 - delta.seconds\n        else:\n            if int(self.hour) == self.now.hour:\n                if delta.days >= 1:\n                    return 0\n                else:\n                    return 82800 # 23 hours, just to be safe\n            else:\n                return max( (int(self.hour)-self.now.hour), (self.now.hour-int(self.hour)) )*60*60\n    \n    def _run(self, msg, vtimeout):\n        boto.log.info('Task[%s] - running:%s' % (self.name, self.command))\n        log_fp = StringIO.StringIO()\n        process = subprocess.Popen(self.command, shell=True, stdin=subprocess.PIPE,\n                                   stdout=subprocess.PIPE, stderr=subprocess.PIPE)\n        nsecs = 5\n        current_timeout = vtimeout\n        while process.poll() == None:\n            boto.log.info('nsecs=%s, timeout=%s' % (nsecs, current_timeout))\n            if nsecs >= current_timeout:\n                current_timeout += vtimeout\n                boto.log.info('Task[%s] - setting timeout to %d seconds' % (self.name, current_timeout))\n                if msg:\n                    msg.change_visibility(current_timeout)\n            time.sleep(5)\n            nsecs += 5\n        t = process.communicate()\n        log_fp.write(t[0])\n        log_fp.write(t[1])\n        boto.log.info('Task[%s] - output: %s' % (self.name, log_fp.getvalue()))\n        self.last_executed = self.now\n        self.last_status = process.returncode\n        self.last_output = log_fp.getvalue()[0:1023]\n\n    def run(self, msg, vtimeout=60):\n        delay = self.check()\n        boto.log.info('Task[%s] - delay=%s seconds' % (self.name, delay))\n        if delay == 0:\n            self._run(msg, vtimeout)\n            queue = msg.queue\n            new_msg = queue.new_message(self.id)\n            new_msg = queue.write(new_msg)\n            self.message_id = new_msg.id\n            self.put()\n            boto.log.info('Task[%s] - new message id=%s' % (self.name, new_msg.id))\n            msg.delete()\n            boto.log.info('Task[%s] - deleted message %s' % (self.name, msg.id))\n        else:\n            boto.log.info('new_vtimeout: %d' % delay)\n            msg.change_visibility(delay)\n\n    def start(self, queue_name):\n        boto.log.info('Task[%s] - starting with queue: %s' % (self.name, queue_name))\n        queue = boto.lookup('sqs', queue_name)\n        msg = queue.new_message(self.id)\n        msg = queue.write(msg)\n        self.message_id = msg.id\n        self.put()\n        boto.log.info('Task[%s] - start successful' % self.name)\n\nclass TaskPoller(object):\n\n    def __init__(self, queue_name):\n        self.sqs = boto.connect_sqs()\n        self.queue = self.sqs.lookup(queue_name)\n\n    def poll(self, wait=60, vtimeout=60):\n        while 1:\n            m = self.queue.read(vtimeout)\n            if m:\n                task = Task.get_by_id(m.get_body())\n                if task:\n                    if not task.message_id or m.id == task.message_id:\n                        boto.log.info('Task[%s] - read message %s' % (task.name, m.id))\n                        task.run(m, vtimeout)\n                    else:\n                        boto.log.info('Task[%s] - found extraneous message, ignoring' % task.name)\n            else:\n                time.sleep(wait)\n\n\n\n    \n\n    \n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/manage/test_manage.py",
    "content": "from boto.manage.server import Server\nfrom boto.manage.volume import Volume\nimport time\n\nprint '--> Creating New Volume'\nvolume = Volume.create()\nprint volume\n\nprint '--> Creating New Server'\nserver_list = Server.create()\nserver = server_list[0]\nprint server\n\nprint '----> Waiting for Server to start up'\nwhile server.status != 'running':\n    print '*'\n    time.sleep(10)\nprint '----> Server is running'\n\nprint '--> Run \"df -k\" on Server'\nstatus = server.run('df -k')\nprint status[1]\n\nprint '--> Now run volume.make_ready to make the volume ready to use on server'\nvolume.make_ready(server)\n\nprint '--> Run \"df -k\" on Server'\nstatus = server.run('df -k')\nprint status[1]\n\nprint '--> Do an \"ls -al\" on the new filesystem'\nstatus = server.run('ls -al %s' % volume.mount_point)\nprint status[1]\n\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/manage/volume.py",
    "content": "# Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nfrom __future__ import with_statement\nfrom boto.sdb.db.model import Model\nfrom boto.sdb.db.property import StringProperty, IntegerProperty, ListProperty, ReferenceProperty, CalculatedProperty\nfrom boto.manage.server import Server\nfrom boto.manage import propget\nimport boto.ec2\nimport time\nimport traceback\nfrom contextlib import closing\nimport dateutil.parser\nimport datetime\n\n\nclass CommandLineGetter(object):\n    \n    def get_region(self, params):\n        if not params.get('region', None):\n            prop = self.cls.find_property('region_name')\n            params['region'] = propget.get(prop, choices=boto.ec2.regions)\n\n    def get_zone(self, params):\n        if not params.get('zone', None):\n            prop = StringProperty(name='zone', verbose_name='EC2 Availability Zone',\n                                  choices=self.ec2.get_all_zones)\n            params['zone'] = propget.get(prop)\n            \n    def get_name(self, params):\n        if not params.get('name', None):\n            prop = self.cls.find_property('name')\n            params['name'] = propget.get(prop)\n\n    def get_size(self, params):\n        if not params.get('size', None):\n            prop = IntegerProperty(name='size', verbose_name='Size (GB)')\n            params['size'] = propget.get(prop)\n\n    def get_mount_point(self, params):\n        if not params.get('mount_point', None):\n            prop = self.cls.find_property('mount_point')\n            params['mount_point'] = propget.get(prop)\n\n    def get_device(self, params):\n        if not params.get('device', None):\n            prop = self.cls.find_property('device')\n            params['device'] = propget.get(prop)\n\n    def get(self, cls, params):\n        self.cls = cls\n        self.get_region(params)\n        self.ec2 = params['region'].connect()\n        self.get_zone(params)\n        self.get_name(params)\n        self.get_size(params)\n        self.get_mount_point(params)\n        self.get_device(params)\n\nclass Volume(Model):\n\n    name = StringProperty(required=True, unique=True, verbose_name='Name')\n    region_name = StringProperty(required=True, verbose_name='EC2 Region')\n    zone_name = StringProperty(required=True, verbose_name='EC2 Zone')\n    mount_point = StringProperty(verbose_name='Mount Point')\n    device = StringProperty(verbose_name=\"Device Name\", default='/dev/sdp')\n    volume_id = StringProperty(required=True)\n    past_volume_ids = ListProperty(item_type=str)\n    server = ReferenceProperty(Server, collection_name='volumes',\n                               verbose_name='Server Attached To')\n    volume_state = CalculatedProperty(verbose_name=\"Volume State\",\n                                      calculated_type=str, use_method=True)\n    attachment_state = CalculatedProperty(verbose_name=\"Attachment State\",\n                                          calculated_type=str, use_method=True)\n    size = CalculatedProperty(verbose_name=\"Size (GB)\",\n                              calculated_type=int, use_method=True)\n\n    @classmethod\n    def create(cls, **params):\n        getter = CommandLineGetter()\n        getter.get(cls, params)\n        region = params.get('region')\n        ec2 = region.connect()\n        zone = params.get('zone')\n        size = params.get('size')\n        ebs_volume = ec2.create_volume(size, zone.name)\n        v = cls()\n        v.ec2 = ec2\n        v.volume_id = ebs_volume.id\n        v.name = params.get('name')\n        v.mount_point = params.get('mount_point')\n        v.device = params.get('device')\n        v.region_name = region.name\n        v.zone_name = zone.name\n        v.put()\n        return v\n\n    @classmethod\n    def create_from_volume_id(cls, region_name, volume_id, name):\n        vol = None\n        ec2 = boto.ec2.connect_to_region(region_name)\n        rs = ec2.get_all_volumes([volume_id])\n        if len(rs) == 1:\n            v = rs[0]\n            vol = cls()\n            vol.volume_id = v.id\n            vol.name = name\n            vol.region_name = v.region.name\n            vol.zone_name = v.zone\n            vol.put()\n        return vol\n\n    def create_from_latest_snapshot(self, name, size=None):\n        snapshot = self.get_snapshots()[-1]\n        return self.create_from_snapshot(name, snapshot, size)\n\n    def create_from_snapshot(self, name, snapshot, size=None):\n        if size < self.size:\n            size = self.size\n        ec2 = self.get_ec2_connection()\n        if self.zone_name == None or self.zone_name == '':\n            # deal with the migration case where the zone is not set in the logical volume:\n            current_volume = ec2.get_all_volumes([self.volume_id])[0]\n            self.zone_name = current_volume.zone\n        ebs_volume = ec2.create_volume(size, self.zone_name, snapshot)\n        v = Volume()\n        v.ec2 = self.ec2\n        v.volume_id = ebs_volume.id\n        v.name = name\n        v.mount_point = self.mount_point\n        v.device = self.device\n        v.region_name = self.region_name\n        v.zone_name = self.zone_name\n        v.put()\n        return v\n    \n    def get_ec2_connection(self):\n        if self.server:\n            return self.server.ec2\n        if not hasattr(self, 'ec2') or self.ec2 == None:\n            self.ec2 = boto.ec2.connect_to_region(self.region_name)\n        return self.ec2\n\n    def _volume_state(self):\n        ec2 = self.get_ec2_connection()\n        rs = ec2.get_all_volumes([self.volume_id])\n        return rs[0].volume_state()\n\n    def _attachment_state(self):\n        ec2 = self.get_ec2_connection()\n        rs = ec2.get_all_volumes([self.volume_id])\n        return rs[0].attachment_state()\n\n    def _size(self):\n        if not hasattr(self, '__size'):\n            ec2 = self.get_ec2_connection()\n            rs = ec2.get_all_volumes([self.volume_id])\n            self.__size = rs[0].size\n        return self.__size\n\n    def install_xfs(self):\n        if self.server:\n            self.server.install('xfsprogs xfsdump')\n\n    def get_snapshots(self):\n        \"\"\"\n        Returns a list of all completed snapshots for this volume ID.\n        \"\"\"\n        ec2 = self.get_ec2_connection()\n        rs = ec2.get_all_snapshots()\n        all_vols = [self.volume_id] + self.past_volume_ids\n        snaps = []\n        for snapshot in rs:\n            if snapshot.volume_id in all_vols:\n                if snapshot.progress == '100%':\n                    snapshot.date = dateutil.parser.parse(snapshot.start_time)\n                    snapshot.keep = True\n                    snaps.append(snapshot)\n        snaps.sort(cmp=lambda x,y: cmp(x.date, y.date))\n        return snaps\n\n    def attach(self, server=None):\n        if self.attachment_state == 'attached':\n            print 'already attached'\n            return None\n        if server:\n            self.server = server\n            self.put()\n        ec2 = self.get_ec2_connection()\n        ec2.attach_volume(self.volume_id, self.server.instance_id, self.device)\n\n    def detach(self, force=False):\n        state = self.attachment_state\n        if state == 'available' or state == None or state == 'detaching':\n            print 'already detached'\n            return None\n        ec2 = self.get_ec2_connection()\n        ec2.detach_volume(self.volume_id, self.server.instance_id, self.device, force)\n        self.server = None\n        self.put()\n\n    def checkfs(self, use_cmd=None):\n        if self.server == None:\n            raise ValueError, 'server attribute must be set to run this command'\n        # detemine state of file system on volume, only works if attached\n        if use_cmd:\n            cmd = use_cmd\n        else:\n            cmd = self.server.get_cmdshell()\n        status = cmd.run('xfs_check %s' % self.device)\n        if not use_cmd:\n            cmd.close()\n        if status[1].startswith('bad superblock magic number 0'):\n            return False\n        return True\n\n    def wait(self):\n        if self.server == None:\n            raise ValueError, 'server attribute must be set to run this command'\n        with closing(self.server.get_cmdshell()) as cmd:\n            # wait for the volume device to appear\n            cmd = self.server.get_cmdshell()\n            while not cmd.exists(self.device):\n                boto.log.info('%s still does not exist, waiting 10 seconds' % self.device)\n                time.sleep(10)\n\n    def format(self):\n        if self.server == None:\n            raise ValueError, 'server attribute must be set to run this command'\n        status = None\n        with closing(self.server.get_cmdshell()) as cmd:\n            if not self.checkfs(cmd):\n                boto.log.info('make_fs...')\n                status = cmd.run('mkfs -t xfs %s' % self.device)\n        return status\n\n    def mount(self):\n        if self.server == None:\n            raise ValueError, 'server attribute must be set to run this command'\n        boto.log.info('handle_mount_point')\n        with closing(self.server.get_cmdshell()) as cmd:\n            cmd = self.server.get_cmdshell()\n            if not cmd.isdir(self.mount_point):\n                boto.log.info('making directory')\n                # mount directory doesn't exist so create it\n                cmd.run(\"mkdir %s\" % self.mount_point)\n            else:\n                boto.log.info('directory exists already')\n                status = cmd.run('mount -l')\n                lines = status[1].split('\\n')\n                for line in lines:\n                    t = line.split()\n                    if t and t[2] == self.mount_point:\n                        # something is already mounted at the mount point\n                        # unmount that and mount it as /tmp\n                        if t[0] != self.device:\n                            cmd.run('umount %s' % self.mount_point)\n                            cmd.run('mount %s /tmp' % t[0])\n                            cmd.run('chmod 777 /tmp')\n                            break\n            # Mount up our new EBS volume onto mount_point\n            cmd.run(\"mount %s %s\" % (self.device, self.mount_point))\n            cmd.run('xfs_growfs %s' % self.mount_point)\n\n    def make_ready(self, server):\n        self.server = server\n        self.put()\n        self.install_xfs()\n        self.attach()\n        self.wait()\n        self.format()\n        self.mount()\n\n    def freeze(self):\n        if self.server:\n            return self.server.run(\"/usr/sbin/xfs_freeze -f %s\" % self.mount_point)\n\n    def unfreeze(self):\n        if self.server:\n            return self.server.run(\"/usr/sbin/xfs_freeze -u %s\" % self.mount_point)\n\n    def snapshot(self):\n        # if this volume is attached to a server\n        # we need to freeze the XFS file system\n        try:\n            self.freeze()\n            if self.server == None:\n                snapshot = self.get_ec2_connection().create_snapshot(self.volume_id)\n            else:\n                snapshot = self.server.ec2.create_snapshot(self.volume_id)\n            boto.log.info('Snapshot of Volume %s created: %s' %  (self.name, snapshot))\n        except Exception:\n            boto.log.info('Snapshot error')\n            boto.log.info(traceback.format_exc())\n        finally:\n            status = self.unfreeze()\n            return status\n\n    def get_snapshot_range(self, snaps, start_date=None, end_date=None):\n        l = []\n        for snap in snaps:\n            if start_date and end_date:\n                if snap.date >= start_date and snap.date <= end_date:\n                    l.append(snap)\n            elif start_date:\n                if snap.date >= start_date:\n                    l.append(snap)\n            elif end_date:\n                if snap.date <= end_date:\n                    l.append(snap)\n            else:\n                l.append(snap)\n        return l\n\n    def trim_snapshots(self, delete=False):\n        \"\"\"\n        Trim the number of snapshots for this volume.  This method always\n        keeps the oldest snapshot.  It then uses the parameters passed in\n        to determine how many others should be kept.\n\n        The algorithm is to keep all snapshots from the current day.  Then\n        it will keep the first snapshot of the day for the previous seven days.\n        Then, it will keep the first snapshot of the week for the previous\n        four weeks.  After than, it will keep the first snapshot of the month\n        for as many months as there are.\n\n        \"\"\"\n        snaps = self.get_snapshots()\n        # Always keep the oldest and the newest\n        if len(snaps) <= 2:\n            return snaps\n        snaps = snaps[1:-1]\n        now = datetime.datetime.now(snaps[0].date.tzinfo)\n        midnight = datetime.datetime(year=now.year, month=now.month,\n                                     day=now.day, tzinfo=now.tzinfo)\n        # Keep the first snapshot from each day of the previous week\n        one_week = datetime.timedelta(days=7, seconds=60*60)\n        print midnight-one_week, midnight\n        previous_week = self.get_snapshot_range(snaps, midnight-one_week, midnight)\n        print previous_week\n        if not previous_week:\n            return snaps\n        current_day = None\n        for snap in previous_week:\n            if current_day and current_day == snap.date.day:\n                snap.keep = False\n            else:\n                current_day = snap.date.day\n        # Get ourselves onto the next full week boundary\n        if previous_week:\n            week_boundary = previous_week[0].date\n            if week_boundary.weekday() != 0:\n                delta = datetime.timedelta(days=week_boundary.weekday())\n                week_boundary = week_boundary - delta\n        # Keep one within this partial week\n        partial_week = self.get_snapshot_range(snaps, week_boundary, previous_week[0].date)\n        if len(partial_week) > 1:\n            for snap in partial_week[1:]:\n                snap.keep = False\n        # Keep the first snapshot of each week for the previous 4 weeks\n        for i in range(0,4):\n            weeks_worth = self.get_snapshot_range(snaps, week_boundary-one_week, week_boundary)\n            if len(weeks_worth) > 1:\n                for snap in weeks_worth[1:]:\n                    snap.keep = False\n            week_boundary = week_boundary - one_week\n        # Now look through all remaining snaps and keep one per month\n        remainder = self.get_snapshot_range(snaps, end_date=week_boundary)\n        current_month = None\n        for snap in remainder:\n            if current_month and current_month == snap.date.month:\n                snap.keep = False\n            else:\n                current_month = snap.date.month\n        if delete:\n            for snap in snaps:\n                if not snap.keep:\n                    boto.log.info('Deleting %s(%s) for %s' % (snap, snap.date, self.name))\n                    snap.delete()\n        return snaps\n                \n    def grow(self, size):\n        pass\n\n    def copy(self, snapshot):\n        pass\n\n    def get_snapshot_from_date(self, date):\n        pass\n\n    def delete(self, delete_ebs_volume=False):\n        if delete_ebs_volume:\n            self.detach()\n            ec2 = self.get_ec2_connection()\n            ec2.delete_volume(self.volume_id)\n        Model.delete(self)\n\n    def archive(self):\n        # snapshot volume, trim snaps, delete volume-id\n        pass\n    \n\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/mashups/__init__.py",
    "content": "# Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n#\n\n\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/mashups/interactive.py",
    "content": "# Copyright (C) 2003-2007  Robey Pointer <robey@lag.net>\n#\n# This file is part of paramiko.\n#\n# Paramiko is free software; you can redistribute it and/or modify it under the\n# terms of the GNU Lesser General Public License as published by the Free\n# Software Foundation; either version 2.1 of the License, or (at your option)\n# any later version.\n#\n# Paramiko is distrubuted in the hope that it will be useful, but WITHOUT ANY\n# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR\n# A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more\n# details.\n#\n# You should have received a copy of the GNU Lesser General Public License\n# along with Paramiko; if not, write to the Free Software Foundation, Inc.,\n# 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA.\n\n\nimport socket\nimport sys\n\n# windows does not have termios...\ntry:\n    import termios\n    import tty\n    has_termios = True\nexcept ImportError:\n    has_termios = False\n\n\ndef interactive_shell(chan):\n    if has_termios:\n        posix_shell(chan)\n    else:\n        windows_shell(chan)\n\n\ndef posix_shell(chan):\n    import select\n    \n    oldtty = termios.tcgetattr(sys.stdin)\n    try:\n        tty.setraw(sys.stdin.fileno())\n        tty.setcbreak(sys.stdin.fileno())\n        chan.settimeout(0.0)\n\n        while True:\n            r, w, e = select.select([chan, sys.stdin], [], [])\n            if chan in r:\n                try:\n                    x = chan.recv(1024)\n                    if len(x) == 0:\n                        print '\\r\\n*** EOF\\r\\n',\n                        break\n                    sys.stdout.write(x)\n                    sys.stdout.flush()\n                except socket.timeout:\n                    pass\n            if sys.stdin in r:\n                x = sys.stdin.read(1)\n                if len(x) == 0:\n                    break\n                chan.send(x)\n\n    finally:\n        termios.tcsetattr(sys.stdin, termios.TCSADRAIN, oldtty)\n\n    \n# thanks to Mike Looijmans for this code\ndef windows_shell(chan):\n    import threading\n\n    sys.stdout.write(\"Line-buffered terminal emulation. Press F6 or ^Z to send EOF.\\r\\n\\r\\n\")\n        \n    def writeall(sock):\n        while True:\n            data = sock.recv(256)\n            if not data:\n                sys.stdout.write('\\r\\n*** EOF ***\\r\\n\\r\\n')\n                sys.stdout.flush()\n                break\n            sys.stdout.write(data)\n            sys.stdout.flush()\n        \n    writer = threading.Thread(target=writeall, args=(chan,))\n    writer.start()\n        \n    try:\n        while True:\n            d = sys.stdin.read(1)\n            if not d:\n                break\n            chan.send(d)\n    except EOFError:\n        # user hit ^Z or F6\n        pass\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/mashups/iobject.py",
    "content": "# Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nimport os\n\ndef int_val_fn(v):\n    try:\n        int(v)\n        return True\n    except:\n        return False\n    \nclass IObject(object):\n    \n    def choose_from_list(self, item_list, search_str='',\n                         prompt='Enter Selection'):\n        if not item_list:\n            print 'No Choices Available'\n            return\n        choice = None\n        while not choice:\n            n = 1\n            choices = []\n            for item in item_list:\n                if isinstance(item, basestring):\n                    print '[%d] %s' % (n, item)\n                    choices.append(item)\n                    n += 1\n                else:\n                    obj, id, desc = item\n                    if desc:\n                        if desc.find(search_str) >= 0:\n                            print '[%d] %s - %s' % (n, id, desc)\n                            choices.append(obj)\n                            n += 1\n                    else:\n                        if id.find(search_str) >= 0:\n                            print '[%d] %s' % (n, id)\n                            choices.append(obj)\n                            n += 1\n            if choices:\n                val = raw_input('%s[1-%d]: ' % (prompt, len(choices)))\n                if val.startswith('/'):\n                    search_str = val[1:]\n                else:\n                    try:\n                        int_val = int(val)\n                        if int_val == 0:\n                            return None\n                        choice = choices[int_val-1]\n                    except ValueError:\n                        print '%s is not a valid choice' % val\n                    except IndexError:\n                        print '%s is not within the range[1-%d]' % (val,\n                                                                    len(choices))\n            else:\n                print \"No objects matched your pattern\"\n                search_str = ''\n        return choice\n\n    def get_string(self, prompt, validation_fn=None):\n        okay = False\n        while not okay:\n            val = raw_input('%s: ' % prompt)\n            if validation_fn:\n                okay = validation_fn(val)\n                if not okay:\n                    print 'Invalid value: %s' % val\n            else:\n                okay = True\n        return val\n\n    def get_filename(self, prompt):\n        okay = False\n        val = ''\n        while not okay:\n            val = raw_input('%s: %s' % (prompt, val))\n            val = os.path.expanduser(val)\n            if os.path.isfile(val):\n                okay = True\n            elif os.path.isdir(val):\n                path = val\n                val = self.choose_from_list(os.listdir(path))\n                if val:\n                    val = os.path.join(path, val)\n                    okay = True\n                else:\n                    val = ''\n            else:\n                print 'Invalid value: %s' % val\n                val = ''\n        return val\n\n    def get_int(self, prompt):\n        s = self.get_string(prompt, int_val_fn)\n        return int(s)\n\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/mashups/order.py",
    "content": "# Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\n\"\"\"\nHigh-level abstraction of an EC2 order for servers\n\"\"\"\n\nimport boto\nimport boto.ec2\nfrom boto.mashups.server import Server, ServerSet\nfrom boto.mashups.iobject import IObject\nfrom boto.pyami.config import Config\nfrom boto.sdb.persist import get_domain, set_domain\nimport time, StringIO\n\nInstanceTypes = ['m1.small', 'm1.large', 'm1.xlarge', 'c1.medium', 'c1.xlarge']\n\nclass Item(IObject):\n    \n    def __init__(self):\n        self.region = None\n        self.name = None\n        self.instance_type = None\n        self.quantity = 0\n        self.zone = None\n        self.ami = None\n        self.groups = []\n        self.key = None\n        self.ec2 = None\n        self.config = None\n\n    def set_userdata(self, key, value):\n        self.userdata[key] = value\n\n    def get_userdata(self, key):\n        return self.userdata[key]\n\n    def set_region(self, region=None):\n        if region:\n            self.region = region\n        else:\n            l = [(r, r.name, r.endpoint) for r in boto.ec2.regions()]\n            self.region = self.choose_from_list(l, prompt='Choose Region')\n\n    def set_name(self, name=None):\n        if name:\n            self.name = name\n        else:\n            self.name = self.get_string('Name')\n\n    def set_instance_type(self, instance_type=None):\n        if instance_type:\n            self.instance_type = instance_type\n        else:\n            self.instance_type = self.choose_from_list(InstanceTypes, 'Instance Type')\n\n    def set_quantity(self, n=0):\n        if n > 0:\n            self.quantity = n\n        else:\n            self.quantity = self.get_int('Quantity')\n\n    def set_zone(self, zone=None):\n        if zone:\n            self.zone = zone\n        else:\n            l = [(z, z.name, z.state) for z in self.ec2.get_all_zones()]\n            self.zone = self.choose_from_list(l, prompt='Choose Availability Zone')\n            \n    def set_ami(self, ami=None):\n        if ami:\n            self.ami = ami\n        else:\n            l = [(a, a.id, a.location) for a in self.ec2.get_all_images()]\n            self.ami = self.choose_from_list(l, prompt='Choose AMI')\n\n    def add_group(self, group=None):\n        if group:\n            self.groups.append(group)\n        else:\n            l = [(s, s.name, s.description) for s in self.ec2.get_all_security_groups()]\n            self.groups.append(self.choose_from_list(l, prompt='Choose Security Group'))\n\n    def set_key(self, key=None):\n        if key:\n            self.key = key\n        else:\n            l = [(k, k.name, '') for k in self.ec2.get_all_key_pairs()]\n            self.key = self.choose_from_list(l, prompt='Choose Keypair')\n\n    def update_config(self):\n        if not self.config.has_section('Credentials'):\n            self.config.add_section('Credentials')\n            self.config.set('Credentials', 'aws_access_key_id', self.ec2.aws_access_key_id)\n            self.config.set('Credentials', 'aws_secret_access_key', self.ec2.aws_secret_access_key)\n        if not self.config.has_section('Pyami'):\n            self.config.add_section('Pyami')\n        sdb_domain = get_domain()\n        if sdb_domain:\n            self.config.set('Pyami', 'server_sdb_domain', sdb_domain)\n            self.config.set('Pyami', 'server_sdb_name', self.name)\n\n    def set_config(self, config_path=None):\n        if not config_path:\n            config_path = self.get_filename('Specify Config file')\n        self.config = Config(path=config_path)\n\n    def get_userdata_string(self):\n        s = StringIO.StringIO()\n        self.config.write(s)\n        return s.getvalue()\n\n    def enter(self, **params):\n        self.region = params.get('region', self.region)\n        if not self.region:\n            self.set_region()\n        self.ec2 = self.region.connect()\n        self.name = params.get('name', self.name)\n        if not self.name:\n            self.set_name()\n        self.instance_type = params.get('instance_type', self.instance_type)\n        if not self.instance_type:\n            self.set_instance_type()\n        self.zone = params.get('zone', self.zone)\n        if not self.zone:\n            self.set_zone()\n        self.quantity = params.get('quantity', self.quantity)\n        if not self.quantity:\n            self.set_quantity()\n        self.ami = params.get('ami', self.ami)\n        if not self.ami:\n            self.set_ami()\n        self.groups = params.get('groups', self.groups)\n        if not self.groups:\n            self.add_group()\n        self.key = params.get('key', self.key)\n        if not self.key:\n            self.set_key()\n        self.config = params.get('config', self.config)\n        if not self.config:\n            self.set_config()\n        self.update_config()\n\nclass Order(IObject):\n\n    def __init__(self):\n        self.items = []\n        self.reservation = None\n\n    def add_item(self, **params):\n        item = Item()\n        item.enter(**params)\n        self.items.append(item)\n\n    def display(self):\n        print 'This Order consists of the following items'\n        print \n        print 'QTY\\tNAME\\tTYPE\\nAMI\\t\\tGroups\\t\\t\\tKeyPair'\n        for item in self.items:\n            print '%s\\t%s\\t%s\\t%s\\t%s\\t%s' % (item.quantity, item.name, item.instance_type,\n                                              item.ami.id, item.groups, item.key.name)\n\n    def place(self, block=True):\n        if get_domain() == None:\n            print 'SDB Persistence Domain not set'\n            domain_name = self.get_string('Specify SDB Domain')\n            set_domain(domain_name)\n        s = ServerSet()\n        for item in self.items:\n            r = item.ami.run(min_count=1, max_count=item.quantity,\n                             key_name=item.key.name, user_data=item.get_userdata_string(),\n                             security_groups=item.groups, instance_type=item.instance_type,\n                             placement=item.zone.name)\n            if block:\n                states = [i.state for i in r.instances]\n                if states.count('running') != len(states):\n                    print states\n                    time.sleep(15)\n                    states = [i.update() for i in r.instances]\n            for i in r.instances:\n                server = Server()\n                server.name = item.name\n                server.instance_id = i.id\n                server.reservation = r\n                server.save()\n                s.append(server)\n        if len(s) == 1:\n            return s[0]\n        else:\n            return s\n        \n\n    \n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/mashups/server.py",
    "content": "# Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\n\"\"\"\nHigh-level abstraction of an EC2 server\n\"\"\"\nimport boto\nimport boto.utils\nfrom boto.mashups.iobject import IObject\nfrom boto.pyami.config import Config, BotoConfigPath\nfrom boto.mashups.interactive import interactive_shell\nfrom boto.sdb.db.model import Model\nfrom boto.sdb.db.property import StringProperty\nimport os\nimport StringIO\n\n\nclass ServerSet(list):\n\n    def __getattr__(self, name):\n        results = []\n        is_callable = False\n        for server in self:\n            try:\n                val = getattr(server, name)\n                if callable(val):\n                    is_callable = True\n                results.append(val)\n            except:\n                results.append(None)\n        if is_callable:\n            self.map_list = results\n            return self.map\n        return results\n\n    def map(self, *args):\n        results = []\n        for fn in self.map_list:\n            results.append(fn(*args))\n        return results\n\nclass Server(Model):\n\n    @property\n    def ec2(self):\n        if self._ec2 is None:\n            self._ec2 = boto.connect_ec2()\n        return self._ec2\n\n    @classmethod\n    def Inventory(cls):\n        \"\"\"\n        Returns a list of Server instances, one for each Server object\n        persisted in the db\n        \"\"\"\n        l = ServerSet()\n        rs = cls.find()\n        for server in rs:\n            l.append(server)\n        return l\n\n    @classmethod\n    def Register(cls, name, instance_id, description=''):\n        s = cls()\n        s.name = name\n        s.instance_id = instance_id\n        s.description = description\n        s.save()\n        return s\n\n    def __init__(self, id=None, **kw):\n        Model.__init__(self, id, **kw)\n        self._reservation = None\n        self._instance = None\n        self._ssh_client = None\n        self._pkey = None\n        self._config = None\n        self._ec2 = None\n\n    name = StringProperty(unique=True, verbose_name=\"Name\")\n    instance_id = StringProperty(verbose_name=\"Instance ID\")\n    config_uri = StringProperty()\n    ami_id = StringProperty(verbose_name=\"AMI ID\")\n    zone = StringProperty(verbose_name=\"Availability Zone\")\n    security_group = StringProperty(verbose_name=\"Security Group\", default=\"default\")\n    key_name = StringProperty(verbose_name=\"Key Name\")\n    elastic_ip = StringProperty(verbose_name=\"Elastic IP\")\n    instance_type = StringProperty(verbose_name=\"Instance Type\")\n    description = StringProperty(verbose_name=\"Description\")\n    log = StringProperty()\n\n    def setReadOnly(self, value):\n        raise AttributeError\n\n    def getInstance(self):\n        if not self._instance:\n            if self.instance_id:\n                try:\n                    rs = self.ec2.get_all_instances([self.instance_id])\n                except:\n                    return None\n                if len(rs) > 0:\n                    self._reservation = rs[0]\n                    self._instance = self._reservation.instances[0]\n        return self._instance\n\n    instance = property(getInstance, setReadOnly, None, 'The Instance for the server')\n    \n    def getAMI(self):\n        if self.instance:\n            return self.instance.image_id\n\n    ami = property(getAMI, setReadOnly, None, 'The AMI for the server')\n    \n    def getStatus(self):\n        if self.instance:\n            self.instance.update()\n            return self.instance.state\n\n    status = property(getStatus, setReadOnly, None,\n                      'The status of the server')\n    \n    def getHostname(self):\n        if self.instance:\n            return self.instance.public_dns_name\n\n    hostname = property(getHostname, setReadOnly, None,\n                        'The public DNS name of the server')\n\n    def getPrivateHostname(self):\n        if self.instance:\n            return self.instance.private_dns_name\n\n    private_hostname = property(getPrivateHostname, setReadOnly, None,\n                                'The private DNS name of the server')\n\n    def getLaunchTime(self):\n        if self.instance:\n            return self.instance.launch_time\n\n    launch_time = property(getLaunchTime, setReadOnly, None,\n                           'The time the Server was started')\n\n    def getConsoleOutput(self):\n        if self.instance:\n            return self.instance.get_console_output()\n\n    console_output = property(getConsoleOutput, setReadOnly, None,\n                              'Retrieve the console output for server')\n\n    def getGroups(self):\n        if self._reservation:\n            return self._reservation.groups\n        else:\n            return None\n\n    groups = property(getGroups, setReadOnly, None,\n                      'The Security Groups controlling access to this server')\n\n    def getConfig(self):\n        if not self._config:\n            remote_file = BotoConfigPath\n            local_file = '%s.ini' % self.instance.id\n            self.get_file(remote_file, local_file)\n            self._config = Config(local_file)\n        return self._config\n\n    def setConfig(self, config):\n        local_file = '%s.ini' % self.instance.id\n        fp = open(local_file)\n        config.write(fp)\n        fp.close()\n        self.put_file(local_file, BotoConfigPath)\n        self._config = config\n\n    config = property(getConfig, setConfig, None,\n                      'The instance data for this server')\n\n    def set_config(self, config):\n        \"\"\"\n        Set SDB based config\n        \"\"\"\n        self._config = config\n        self._config.dump_to_sdb(\"botoConfigs\", self.id)\n\n    def load_config(self):\n        self._config = Config(do_load=False)\n        self._config.load_from_sdb(\"botoConfigs\", self.id)\n\n    def stop(self):\n        if self.instance:\n            self.instance.stop()\n\n    def start(self):\n        self.stop()\n        ec2 = boto.connect_ec2()\n        ami = ec2.get_all_images(image_ids = [str(self.ami_id)])[0]\n        groups = ec2.get_all_security_groups(groupnames=[str(self.security_group)])\n        if not self._config:\n            self.load_config()\n        if not self._config.has_section(\"Credentials\"):\n            self._config.add_section(\"Credentials\")\n            self._config.set(\"Credentials\", \"aws_access_key_id\", ec2.aws_access_key_id)\n            self._config.set(\"Credentials\", \"aws_secret_access_key\", ec2.aws_secret_access_key)\n\n        if not self._config.has_section(\"Pyami\"):\n            self._config.add_section(\"Pyami\")\n\n        if self._manager.domain:\n            self._config.set('Pyami', 'server_sdb_domain', self._manager.domain.name)\n            self._config.set(\"Pyami\", 'server_sdb_name', self.name)\n\n        cfg = StringIO.StringIO()\n        self._config.write(cfg)\n        cfg = cfg.getvalue()\n        r = ami.run(min_count=1,\n                    max_count=1,\n                    key_name=self.key_name,\n                    security_groups = groups,\n                    instance_type = self.instance_type,\n                    placement = self.zone,\n                    user_data = cfg)\n        i = r.instances[0]\n        self.instance_id = i.id\n        self.put()\n        if self.elastic_ip:\n            ec2.associate_address(self.instance_id, self.elastic_ip)\n\n    def reboot(self):\n        if self.instance:\n            self.instance.reboot()\n\n    def get_ssh_client(self, key_file=None, host_key_file='~/.ssh/known_hosts',\n                       uname='root'):\n        import paramiko\n        if not self.instance:\n            print 'No instance yet!'\n            return\n        if not self._ssh_client:\n            if not key_file:\n                iobject = IObject()\n                key_file = iobject.get_filename('Path to OpenSSH Key file')\n            self._pkey = paramiko.RSAKey.from_private_key_file(key_file)\n            self._ssh_client = paramiko.SSHClient()\n            self._ssh_client.load_system_host_keys()\n            self._ssh_client.load_host_keys(os.path.expanduser(host_key_file))\n            self._ssh_client.set_missing_host_key_policy(paramiko.AutoAddPolicy())\n            self._ssh_client.connect(self.instance.public_dns_name,\n                                     username=uname, pkey=self._pkey)\n        return self._ssh_client\n\n    def get_file(self, remotepath, localpath):\n        ssh_client = self.get_ssh_client()\n        sftp_client = ssh_client.open_sftp()\n        sftp_client.get(remotepath, localpath)\n\n    def put_file(self, localpath, remotepath):\n        ssh_client = self.get_ssh_client()\n        sftp_client = ssh_client.open_sftp()\n        sftp_client.put(localpath, remotepath)\n\n    def listdir(self, remotepath):\n        ssh_client = self.get_ssh_client()\n        sftp_client = ssh_client.open_sftp()\n        return sftp_client.listdir(remotepath)\n\n    def shell(self, key_file=None):\n        ssh_client = self.get_ssh_client(key_file)\n        channel = ssh_client.invoke_shell()\n        interactive_shell(channel)\n\n    def bundle_image(self, prefix, key_file, cert_file, size):\n        print 'bundling image...'\n        print '\\tcopying cert and pk over to /mnt directory on server'\n        ssh_client = self.get_ssh_client()\n        sftp_client = ssh_client.open_sftp()\n        path, name = os.path.split(key_file)\n        remote_key_file = '/mnt/%s' % name\n        self.put_file(key_file, remote_key_file)\n        path, name = os.path.split(cert_file)\n        remote_cert_file = '/mnt/%s' % name\n        self.put_file(cert_file, remote_cert_file)\n        print '\\tdeleting %s' % BotoConfigPath\n        # delete the metadata.ini file if it exists\n        try:\n            sftp_client.remove(BotoConfigPath)\n        except:\n            pass\n        command = 'sudo ec2-bundle-vol '\n        command += '-c %s -k %s ' % (remote_cert_file, remote_key_file)\n        command += '-u %s ' % self._reservation.owner_id\n        command += '-p %s ' % prefix\n        command += '-s %d ' % size\n        command += '-d /mnt '\n        if self.instance.instance_type == 'm1.small' or self.instance_type == 'c1.medium':\n            command += '-r i386'\n        else:\n            command += '-r x86_64'\n        print '\\t%s' % command\n        t = ssh_client.exec_command(command)\n        response = t[1].read()\n        print '\\t%s' % response\n        print '\\t%s' % t[2].read()\n        print '...complete!'\n\n    def upload_bundle(self, bucket, prefix):\n        print 'uploading bundle...'\n        command = 'ec2-upload-bundle '\n        command += '-m /mnt/%s.manifest.xml ' % prefix\n        command += '-b %s ' % bucket\n        command += '-a %s ' % self.ec2.aws_access_key_id\n        command += '-s %s ' % self.ec2.aws_secret_access_key\n        print '\\t%s' % command\n        ssh_client = self.get_ssh_client()\n        t = ssh_client.exec_command(command)\n        response = t[1].read()\n        print '\\t%s' % response\n        print '\\t%s' % t[2].read()\n        print '...complete!'\n\n    def create_image(self, bucket=None, prefix=None, key_file=None, cert_file=None, size=None):\n        iobject = IObject()\n        if not bucket:\n            bucket = iobject.get_string('Name of S3 bucket')\n        if not prefix:\n            prefix = iobject.get_string('Prefix for AMI file')\n        if not key_file:\n            key_file = iobject.get_filename('Path to RSA private key file')\n        if not cert_file:\n            cert_file = iobject.get_filename('Path to RSA public cert file')\n        if not size:\n            size = iobject.get_int('Size (in MB) of bundled image')\n        self.bundle_image(prefix, key_file, cert_file, size)\n        self.upload_bundle(bucket, prefix)\n        print 'registering image...'\n        self.image_id = self.ec2.register_image('%s/%s.manifest.xml' % (bucket, prefix))\n        return self.image_id\n\n    def attach_volume(self, volume, device=\"/dev/sdp\"):\n        \"\"\"\n        Attach an EBS volume to this server\n\n        :param volume: EBS Volume to attach\n        :type volume: boto.ec2.volume.Volume\n\n        :param device: Device to attach to (default to /dev/sdp)\n        :type device: string\n        \"\"\"\n        if hasattr(volume, \"id\"):\n            volume_id = volume.id\n        else:\n            volume_id = volume\n        return self.ec2.attach_volume(volume_id=volume_id, instance_id=self.instance_id, device=device)\n\n    def detach_volume(self, volume):\n        \"\"\"\n        Detach an EBS volume from this server\n\n        :param volume: EBS Volume to detach\n        :type volume: boto.ec2.volume.Volume\n        \"\"\"\n        if hasattr(volume, \"id\"):\n            volume_id = volume.id\n        else:\n            volume_id = volume\n        return self.ec2.detach_volume(volume_id=volume_id, instance_id=self.instance_id)\n\n    def install_package(self, package_name):\n        print 'installing %s...' % package_name\n        command = 'yum -y install %s' % package_name\n        print '\\t%s' % command\n        ssh_client = self.get_ssh_client()\n        t = ssh_client.exec_command(command)\n        response = t[1].read()\n        print '\\t%s' % response\n        print '\\t%s' % t[2].read()\n        print '...complete!'\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/mturk/__init__.py",
    "content": "# Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n#\n\n\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/mturk/connection.py",
    "content": "# Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nimport xml.sax\nimport datetime\nimport itertools\n\nfrom boto import handler\nfrom boto import config\nfrom boto.mturk.price import Price\nimport boto.mturk.notification\nfrom boto.connection import AWSQueryConnection\nfrom boto.exception import EC2ResponseError\nfrom boto.resultset import ResultSet\nfrom boto.mturk.question import QuestionForm, ExternalQuestion\n\nclass MTurkRequestError(EC2ResponseError):\n    \"Error for MTurk Requests\"\n    # todo: subclass from an abstract parent of EC2ResponseError\n\nclass MTurkConnection(AWSQueryConnection):\n    \n    APIVersion = '2008-08-02'\n    \n    def __init__(self, aws_access_key_id=None, aws_secret_access_key=None,\n                 is_secure=True, port=None, proxy=None, proxy_port=None,\n                 proxy_user=None, proxy_pass=None,\n                 host=None, debug=0,\n                 https_connection_factory=None):\n        if not host:\n            if config.has_option('MTurk', 'sandbox') and config.get('MTurk', 'sandbox') == 'True':\n                host = 'mechanicalturk.sandbox.amazonaws.com'\n            else:\n                host = 'mechanicalturk.amazonaws.com'\n\n        AWSQueryConnection.__init__(self, aws_access_key_id,\n                                    aws_secret_access_key,\n                                    is_secure, port, proxy, proxy_port,\n                                    proxy_user, proxy_pass, host, debug,\n                                    https_connection_factory)\n    \n    def _required_auth_capability(self):\n        return ['mturk']\n\n    def get_account_balance(self):\n        \"\"\"\n        \"\"\"\n        params = {}\n        return self._process_request('GetAccountBalance', params,\n                                     [('AvailableBalance', Price),\n                                      ('OnHoldBalance', Price)])\n    \n    def register_hit_type(self, title, description, reward, duration,\n                          keywords=None, approval_delay=None, qual_req=None):\n        \"\"\"\n        Register a new HIT Type\n        title, description are strings\n        reward is a Price object\n        duration can be a timedelta, or an object castable to an int\n        \"\"\"\n        params = dict(\n            Title=title,\n            Description=description,\n            AssignmentDurationInSeconds=\n                self.duration_as_seconds(duration),\n            )\n        params.update(MTurkConnection.get_price_as_price(reward).get_as_params('Reward'))\n\n        if keywords:\n            params['Keywords'] = self.get_keywords_as_string(keywords)\n\n        if approval_delay is not None:\n            d = self.duration_as_seconds(approval_delay)\n            params['AutoApprovalDelayInSeconds'] = d\n\n        if qual_req is not None:\n            params.update(qual_req.get_as_params())\n\n        return self._process_request('RegisterHITType', params)\n\n    def set_email_notification(self, hit_type, email, event_types=None):\n        \"\"\"\n        Performs a SetHITTypeNotification operation to set email\n        notification for a specified HIT type\n        \"\"\"\n        return self._set_notification(hit_type, 'Email', email, event_types)\n    \n    def set_rest_notification(self, hit_type, url, event_types=None):\n        \"\"\"\n        Performs a SetHITTypeNotification operation to set REST notification\n        for a specified HIT type\n        \"\"\"\n        return self._set_notification(hit_type, 'REST', url, event_types)\n        \n    def _set_notification(self, hit_type, transport, destination, event_types=None):\n        \"\"\"\n        Common SetHITTypeNotification operation to set notification for a\n        specified HIT type\n        \"\"\"\n        assert type(hit_type) is str, \"hit_type argument should be a string.\"\n        \n        params = {'HITTypeId': hit_type}\n        \n        # from the Developer Guide:\n        # The 'Active' parameter is optional. If omitted, the active status of\n        # the HIT type's notification specification is unchanged. All HIT types\n        # begin with their notification specifications in the \"inactive\" status.\n        notification_params = {'Destination': destination,\n                               'Transport': transport,\n                               'Version': boto.mturk.notification.NotificationMessage.NOTIFICATION_VERSION,\n                               'Active': True,\n                               }\n\n        # add specific event types if required\n        if event_types:\n            self.build_list_params(notification_params, event_types, 'EventType')\n        \n        # Set up dict of 'Notification.1.Transport' etc. values\n        notification_rest_params = {}\n        num = 1\n        for key in notification_params:\n            notification_rest_params['Notification.%d.%s' % (num, key)] = notification_params[key]\n        \n        # Update main params dict\n        params.update(notification_rest_params)\n        \n        # Execute operation\n        return self._process_request('SetHITTypeNotification', params)\n    \n    def create_hit(self, hit_type=None, question=None,\n                   lifetime=datetime.timedelta(days=7),\n                   max_assignments=1, \n                   title=None, description=None, keywords=None,\n                   reward=None, duration=datetime.timedelta(days=7),\n                   approval_delay=None, annotation=None,\n                   questions=None, qualifications=None,\n                   response_groups=None):\n        \"\"\"\n        Creates a new HIT.\n        Returns a ResultSet\n        See: http://docs.amazonwebservices.com/AWSMechanicalTurkRequester/2006-10-31/ApiReference_CreateHITOperation.html\n        \"\"\"\n        \n        # handle single or multiple questions\n        neither = question is None and questions is None\n        both = question is not None and questions is not None\n        if neither or both:\n            raise ValueError(\"Must specify either question (single Question instance) or questions (list or QuestionForm instance), but not both\")\n\n        if question:\n            questions = [question]\n        question_param = QuestionForm(questions)\n        if isinstance(question, QuestionForm):\n            question_param = question\n        elif isinstance(question, ExternalQuestion):\n            question_param = question\n        \n        # Handle basic required arguments and set up params dict\n        params = {'Question': question_param.get_as_xml(),\n                  'LifetimeInSeconds' :\n                      self.duration_as_seconds(lifetime),\n                  'MaxAssignments' : max_assignments,\n                  }\n\n        # if hit type specified then add it\n        # else add the additional required parameters\n        if hit_type:\n            params['HITTypeId'] = hit_type\n        else:\n            # Handle keywords\n            final_keywords = MTurkConnection.get_keywords_as_string(keywords)\n            \n            # Handle price argument\n            final_price = MTurkConnection.get_price_as_price(reward)\n            \n            final_duration = self.duration_as_seconds(duration)\n\n            additional_params = dict(\n                Title=title,\n                Description=description,\n                Keywords=final_keywords,\n                AssignmentDurationInSeconds=final_duration,\n                )\n            additional_params.update(final_price.get_as_params('Reward'))\n\n            if approval_delay is not None:\n                d = self.duration_as_seconds(approval_delay)\n                additional_params['AutoApprovalDelayInSeconds'] = d\n\n            # add these params to the others\n            params.update(additional_params)\n\n        # add the annotation if specified\n        if annotation is not None:\n            params['RequesterAnnotation'] = annotation\n               \n        # Add the Qualifications if specified\n        if qualifications is not None:\n            params.update(qualifications.get_as_params())\n\n        # Handle optional response groups argument\n        if response_groups:\n            self.build_list_params(params, response_groups, 'ResponseGroup')\n                \n        # Submit\n        return self._process_request('CreateHIT', params, [('HIT', HIT),])\n\n    def change_hit_type_of_hit(self, hit_id, hit_type):\n        \"\"\"\n        Change the HIT type of an existing HIT. Note that the reward associated\n        with the new HIT type must match the reward of the current HIT type in\n        order for the operation to be valid.\n        \n        :type hit_id: str\n        :type hit_type: str\n        \"\"\"\n        params = {'HITId' : hit_id,\n                  'HITTypeId': hit_type}\n\n        return self._process_request('ChangeHITTypeOfHIT', params)\n    \n    def get_reviewable_hits(self, hit_type=None, status='Reviewable',\n                            sort_by='Expiration', sort_direction='Ascending', \n                            page_size=10, page_number=1):\n        \"\"\"\n        Retrieve the HITs that have a status of Reviewable, or HITs that\n        have a status of Reviewing, and that belong to the Requester\n        calling the operation.\n        \"\"\"\n        params = {'Status' : status,\n                  'SortProperty' : sort_by,\n                  'SortDirection' : sort_direction,\n                  'PageSize' : page_size,\n                  'PageNumber' : page_number}\n\n        # Handle optional hit_type argument\n        if hit_type is not None:\n            params.update({'HITTypeId': hit_type})\n\n        return self._process_request('GetReviewableHITs', params, [('HIT', HIT),])\n\n    @staticmethod\n    def _get_pages(page_size, total_records):\n        \"\"\"\n        Given a page size (records per page) and a total number of\n        records, return the page numbers to be retrieved.\n        \"\"\"\n        pages = total_records/page_size+bool(total_records%page_size)\n        return range(1, pages+1)\n\n\n    def get_all_hits(self):\n        \"\"\"\n        Return all of a Requester's HITs\n        \n        Despite what search_hits says, it does not return all hits, but\n        instead returns a page of hits. This method will pull the hits\n        from the server 100 at a time, but will yield the results\n        iteratively, so subsequent requests are made on demand.\n        \"\"\"\n        page_size = 100\n        search_rs = self.search_hits(page_size=page_size)\n        total_records = int(search_rs.TotalNumResults)\n        get_page_hits = lambda(page): self.search_hits(page_size=page_size, page_number=page)\n        page_nums = self._get_pages(page_size, total_records)\n        hit_sets = itertools.imap(get_page_hits, page_nums)\n        return itertools.chain.from_iterable(hit_sets)\n\n    def search_hits(self, sort_by='CreationTime', sort_direction='Ascending', \n                    page_size=10, page_number=1, response_groups=None):\n        \"\"\"\n        Return a page of a Requester's HITs, on behalf of the Requester.\n        The operation returns HITs of any status, except for HITs that\n        have been disposed with the DisposeHIT operation.\n        Note:\n        The SearchHITs operation does not accept any search parameters\n        that filter the results.\n        \"\"\"\n        params = {'SortProperty' : sort_by,\n                  'SortDirection' : sort_direction,\n                  'PageSize' : page_size,\n                  'PageNumber' : page_number}\n        # Handle optional response groups argument\n        if response_groups:\n            self.build_list_params(params, response_groups, 'ResponseGroup')\n                \n\n        return self._process_request('SearchHITs', params, [('HIT', HIT),])\n\n    def get_assignments(self, hit_id, status=None,\n                            sort_by='SubmitTime', sort_direction='Ascending', \n                            page_size=10, page_number=1, response_groups=None):\n        \"\"\"\n        Retrieves completed assignments for a HIT. \n        Use this operation to retrieve the results for a HIT.\n\n        The returned ResultSet will have the following attributes:\n\n        NumResults\n                The number of assignments on the page in the filtered results\n                list, equivalent to the number of assignments being returned\n                by this call.\n                A non-negative integer\n        PageNumber\n                The number of the page in the filtered results list being\n                returned.\n                A positive integer\n        TotalNumResults\n                The total number of HITs in the filtered results list based\n                on this call.\n                A non-negative integer\n\n        The ResultSet will contain zero or more Assignment objects \n\n        \"\"\"\n        params = {'HITId' : hit_id,\n                  'SortProperty' : sort_by,\n                  'SortDirection' : sort_direction,\n                  'PageSize' : page_size,\n                  'PageNumber' : page_number}\n\n        if status is not None:\n            params['AssignmentStatus'] = status\n\n        # Handle optional response groups argument\n        if response_groups:\n            self.build_list_params(params, response_groups, 'ResponseGroup')\n                \n        return self._process_request('GetAssignmentsForHIT', params,\n                                     [('Assignment', Assignment),])\n\n    def approve_assignment(self, assignment_id, feedback=None):\n        \"\"\"\n        \"\"\"\n        params = {'AssignmentId' : assignment_id,}\n        if feedback:\n            params['RequesterFeedback'] = feedback\n        return self._process_request('ApproveAssignment', params)\n\n    def reject_assignment(self, assignment_id, feedback=None):\n        \"\"\"\n        \"\"\"\n        params = {'AssignmentId' : assignment_id,}\n        if feedback:\n            params['RequesterFeedback'] = feedback\n        return self._process_request('RejectAssignment', params)\n\n    def get_hit(self, hit_id, response_groups=None):\n        \"\"\"\n        \"\"\"\n        params = {'HITId' : hit_id,}\n        # Handle optional response groups argument\n        if response_groups:\n            self.build_list_params(params, response_groups, 'ResponseGroup')\n                \n        return self._process_request('GetHIT', params, [('HIT', HIT),])\n\n    def set_reviewing(self, hit_id, revert=None):\n        \"\"\"\n        Update a HIT with a status of Reviewable to have a status of Reviewing, \n        or reverts a Reviewing HIT back to the Reviewable status.\n\n        Only HITs with a status of Reviewable can be updated with a status of\n        Reviewing.  Similarly, only Reviewing HITs can be reverted back to a\n        status of Reviewable.\n        \"\"\"\n        params = {'HITId' : hit_id,}\n        if revert:\n            params['Revert'] = revert\n        return self._process_request('SetHITAsReviewing', params)\n\n    def disable_hit(self, hit_id, response_groups=None):\n        \"\"\"\n        Remove a HIT from the Mechanical Turk marketplace, approves all\n        submitted assignments that have not already been approved or rejected,\n        and disposes of the HIT and all assignment data.\n\n        Assignments for the HIT that have already been submitted, but not yet\n        approved or rejected, will be automatically approved. Assignments in\n        progress at the time of the call to DisableHIT will be approved once\n        the assignments are submitted. You will be charged for approval of\n        these assignments.  DisableHIT completely disposes of the HIT and\n        all submitted assignment data. Assignment results data cannot be\n        retrieved for a HIT that has been disposed.\n\n        It is not possible to re-enable a HIT once it has been disabled.\n        To make the work from a disabled HIT available again, create a new HIT.\n        \"\"\"\n        params = {'HITId' : hit_id,}\n        # Handle optional response groups argument\n        if response_groups:\n            self.build_list_params(params, response_groups, 'ResponseGroup')\n                \n        return self._process_request('DisableHIT', params)\n\n    def dispose_hit(self, hit_id):\n        \"\"\"\n        Dispose of a HIT that is no longer needed.\n\n        Only HITs in the \"reviewable\" state, with all submitted\n        assignments approved or rejected, can be disposed. A Requester\n        can call GetReviewableHITs to determine which HITs are\n        reviewable, then call GetAssignmentsForHIT to retrieve the\n        assignments.  Disposing of a HIT removes the HIT from the\n        results of a call to GetReviewableHITs.  \"\"\"\n        params = {'HITId' : hit_id,}\n        return self._process_request('DisposeHIT', params)\n\n    def expire_hit(self, hit_id):\n\n        \"\"\"\n        Expire a HIT that is no longer needed.\n\n        The effect is identical to the HIT expiring on its own. The\n        HIT no longer appears on the Mechanical Turk web site, and no\n        new Workers are allowed to accept the HIT. Workers who have\n        accepted the HIT prior to expiration are allowed to complete\n        it or return it, or allow the assignment duration to elapse\n        (abandon the HIT). Once all remaining assignments have been\n        submitted, the expired HIT becomes\"reviewable\", and will be\n        returned by a call to GetReviewableHITs.\n        \"\"\"\n        params = {'HITId' : hit_id,}\n        return self._process_request('ForceExpireHIT', params)\n\n    def extend_hit(self, hit_id, assignments_increment=None, expiration_increment=None):\n        \"\"\"\n        Increase the maximum number of assignments, or extend the\n        expiration date, of an existing HIT.\n        \n        NOTE: If a HIT has a status of Reviewable and the HIT is\n        extended to make it Available, the HIT will not be returned by\n        GetReviewableHITs, and its submitted assignments will not be\n        returned by GetAssignmentsForHIT, until the HIT is Reviewable\n        again.  Assignment auto-approval will still happen on its\n        original schedule, even if the HIT has been extended. Be sure\n        to retrieve and approve (or reject) submitted assignments\n        before extending the HIT, if so desired.\n        \"\"\"\n        # must provide assignment *or* expiration increment\n        if (assignments_increment is None and expiration_increment is None) or \\\n           (assignments_increment is not None and expiration_increment is not None):\n            raise ValueError(\"Must specify either assignments_increment or expiration_increment, but not both\")\n\n        params = {'HITId' : hit_id,}\n        if assignments_increment:\n            params['MaxAssignmentsIncrement'] = assignments_increment\n        if expiration_increment:\n            params['ExpirationIncrementInSeconds'] = expiration_increment\n\n        return self._process_request('ExtendHIT', params)\n\n    def get_help(self, about, help_type='Operation'):\n        \"\"\"\n        Return information about the Mechanical Turk Service\n        operations and response group NOTE - this is basically useless\n        as it just returns the URL of the documentation\n\n        help_type: either 'Operation' or 'ResponseGroup'\n        \"\"\"\n        params = {'About': about, 'HelpType': help_type,}\n        return self._process_request('Help', params)\n\n    def grant_bonus(self, worker_id, assignment_id, bonus_price, reason):\n        \"\"\"\n        Issues a payment of money from your account to a Worker.  To\n        be eligible for a bonus, the Worker must have submitted\n        results for one of your HITs, and have had those results\n        approved or rejected. This payment happens separately from the\n        reward you pay to the Worker when you approve the Worker's\n        assignment.  The Bonus must be passed in as an instance of the\n        Price object.\n        \"\"\"\n        params = bonus_price.get_as_params('BonusAmount', 1)\n        params['WorkerId'] = worker_id\n        params['AssignmentId'] = assignment_id\n        params['Reason'] = reason\n\n        return self._process_request('GrantBonus', params)\n\n    def block_worker(self, worker_id, reason):\n        \"\"\"\n        Block a worker from working on my tasks.\n        \"\"\"\n        params = {'WorkerId': worker_id, 'Reason': reason}\n\n        return self._process_request('BlockWorker', params)\n\n    def unblock_worker(self, worker_id, reason):\n        \"\"\"\n        Unblock a worker from working on my tasks.\n        \"\"\"\n        params = {'WorkerId': worker_id, 'Reason': reason}\n\n        return self._process_request('UnblockWorker', params)\n    \n    def notify_workers(self, worker_ids, subject, message_text):\n        \"\"\"\n        Send a text message to workers.\n        \"\"\"\n        params = {'Subject' : subject,\n                  'MessageText': message_text}\n        self.build_list_params(params, worker_ids, 'WorkerId')\n\n        return self._process_request('NotifyWorkers', params)\n\n    def create_qualification_type(self,\n                                  name,\n                                  description,\n                                  status,\n                                  keywords=None,\n                                  retry_delay=None,\n                                  test=None,\n                                  answer_key=None,\n                                  answer_key_xml=None,\n                                  test_duration=None,\n                                  auto_granted=False,\n                                  auto_granted_value=1):\n        \"\"\"\n        Create a new Qualification Type.\n\n        name: This will be visible to workers and must be unique for a\n           given requester.\n\n        description: description shown to workers.  Max 2000 characters.\n\n        status: 'Active' or 'Inactive'\n\n        keywords: list of keyword strings or comma separated string.\n           Max length of 1000 characters when concatenated with commas.\n\n        retry_delay: number of seconds after requesting a\n           qualification the worker must wait before they can ask again.\n           If not specified, workers can only request this qualification\n           once.\n\n        test: a QuestionForm\n\n        answer_key: an XML string of your answer key, for automatically\n           scored qualification tests.\n           (Consider implementing an AnswerKey class for this to support.)\n\n        test_duration: the number of seconds a worker has to complete the test.\n\n        auto_granted: if True, requests for the Qualification are granted immediately.\n          Can't coexist with a test.\n\n        auto_granted_value: auto_granted qualifications are given this value.\n\n        \"\"\"\n\n        params = {'Name' : name,\n                  'Description' : description,\n                  'QualificationTypeStatus' : status,\n                  }\n        if retry_delay is not None:\n            params['RetryDelay'] = retry_delay\n\n        if test is not None:\n            assert(isinstance(test, QuestionForm))\n            assert(test_duration is not None)\n            params['Test'] = test.get_as_xml()\n\n        if test_duration is not None:\n            params['TestDurationInSeconds'] = test_duration\n\n        if answer_key is not None:\n            if isinstance(answer_key, basestring):\n                params['AnswerKey'] = answer_key # xml\n            else:\n                raise TypeError\n                # Eventually someone will write an AnswerKey class.\n\n        if auto_granted:\n            assert(test is False)\n            params['AutoGranted'] = True\n            params['AutoGrantedValue'] = auto_granted_value\n\n        if keywords:\n            params['Keywords'] = self.get_keywords_as_string(keywords)\n\n        return self._process_request('CreateQualificationType', params,\n                                     [('QualificationType', QualificationType),])\n\n    def get_qualification_type(self, qualification_type_id):\n        params = {'QualificationTypeId' : qualification_type_id }\n        return self._process_request('GetQualificationType', params,\n                                     [('QualificationType', QualificationType),])\n\n    def get_qualifications_for_qualification_type(self, qualification_type_id):\n        params = {'QualificationTypeId' : qualification_type_id }\n        return self._process_request('GetQualificationsForQualificationType', params,\n                                     [('QualificationType', QualificationType),])\n\n    def update_qualification_type(self, qualification_type_id,\n                                  description=None,\n                                  status=None,\n                                  retry_delay=None,\n                                  test=None,\n                                  answer_key=None,\n                                  test_duration=None,\n                                  auto_granted=None,\n                                  auto_granted_value=None):\n\n        params = {'QualificationTypeId' : qualification_type_id }\n\n        if description is not None:\n            params['Description'] = description\n\n        if status is not None:\n            params['QualificationTypeStatus'] = status\n\n        if retry_delay is not None:\n            params['RetryDelay'] = retry_delay\n\n        if test is not None:\n            assert(isinstance(test, QuestionForm))\n            params['Test'] = test.get_as_xml()\n\n        if test_duration is not None:\n            params['TestDuration'] = test_duration\n\n        if answer_key is not None:\n            if isinstance(answer_key, basestring):\n                params['AnswerKey'] = answer_key # xml\n            else:\n                raise TypeError\n                # Eventually someone will write an AnswerKey class.\n\n        if auto_granted is not None:\n            params['AutoGranted'] = auto_granted\n\n        if auto_granted_value is not None:\n            params['AutoGrantedValue'] = auto_granted_value\n\n        return self._process_request('UpdateQualificationType', params,\n                                     [('QualificationType', QualificationType),])\n\n    def dispose_qualification_type(self, qualification_type_id):\n        \"\"\"TODO: Document.\"\"\"\n        params = {'QualificationTypeId' : qualification_type_id}\n        return self._process_request('DisposeQualificationType', params)\n\n    def search_qualification_types(self, query=None, sort_by='Name',\n                                   sort_direction='Ascending', page_size=10,\n                                   page_number=1, must_be_requestable=True,\n                                   must_be_owned_by_caller=True):\n        \"\"\"TODO: Document.\"\"\"\n        params = {'Query' : query,\n                  'SortProperty' : sort_by,\n                  'SortDirection' : sort_direction,\n                  'PageSize' : page_size,\n                  'PageNumber' : page_number,\n                  'MustBeRequestable' : must_be_requestable,\n                  'MustBeOwnedByCaller' : must_be_owned_by_caller}\n        return self._process_request('SearchQualificationTypes', params,\n                    [('QualificationType', QualificationType),])\n\n    def get_qualification_requests(self, qualification_type_id,\n                                   sort_by='Expiration',\n                                   sort_direction='Ascending', page_size=10,\n                                   page_number=1):\n        \"\"\"TODO: Document.\"\"\"\n        params = {'QualificationTypeId' : qualification_type_id,\n                  'SortProperty' : sort_by,\n                  'SortDirection' : sort_direction,\n                  'PageSize' : page_size,\n                  'PageNumber' : page_number}\n        return self._process_request('GetQualificationRequests', params,\n                    [('QualificationRequest', QualificationRequest),])\n\n    def grant_qualification(self, qualification_request_id, integer_value=1):\n        \"\"\"TODO: Document.\"\"\"\n        params = {'QualificationRequestId' : qualification_request_id,\n                  'IntegerValue' : integer_value}\n        return self._process_request('GrantQualification', params)\n\n    def revoke_qualification(self, subject_id, qualification_type_id,\n                             reason=None):\n        \"\"\"TODO: Document.\"\"\"\n        params = {'SubjectId' : subject_id,\n                  'QualificationTypeId' : qualification_type_id,\n                  'Reason' : reason}\n        return self._process_request('RevokeQualification', params)\n\n    def assign_qualification(self, qualification_type_id, worker_id,\n                             value=1, send_notification=True):\n        params = {'QualificationTypeId' : qualification_type_id,\n                  'WorkerId' : worker_id,\n                  'IntegerValue' : value,\n                  'SendNotification' : send_notification}\n        return self._process_request('AssignQualification', params)\n\n    def get_qualification_score(self, qualification_type_id, worker_id):\n        \"\"\"TODO: Document.\"\"\"\n        params = {'QualificationTypeId' : qualification_type_id,\n                  'SubjectId' : worker_id}\n        return self._process_request('GetQualificationScore', params,\n                    [('Qualification', Qualification),])\n\n    def update_qualification_score(self, qualification_type_id, worker_id,\n                                   value):\n        \"\"\"TODO: Document.\"\"\"\n        params = {'QualificationTypeId' : qualification_type_id,\n                  'SubjectId' : worker_id,\n                  'IntegerValue' : value}\n        return self._process_request('UpdateQualificationScore', params)\n\n    def _process_request(self, request_type, params, marker_elems=None):\n        \"\"\"\n        Helper to process the xml response from AWS\n        \"\"\"\n        response = self.make_request(request_type, params, verb='POST')\n        return self._process_response(response, marker_elems)\n\n    def _process_response(self, response, marker_elems=None):\n        \"\"\"\n        Helper to process the xml response from AWS\n        \"\"\"\n        body = response.read()\n        #print body\n        if '<Errors>' not in body:\n            rs = ResultSet(marker_elems)\n            h = handler.XmlHandler(rs, self)\n            xml.sax.parseString(body, h)\n            return rs\n        else:\n            raise MTurkRequestError(response.status, response.reason, body)\n\n    @staticmethod\n    def get_keywords_as_string(keywords):\n        \"\"\"\n        Returns a comma+space-separated string of keywords from either\n        a list or a string\n        \"\"\"\n        if type(keywords) is list:\n            keywords = ', '.join(keywords)\n        if type(keywords) is str:\n            final_keywords = keywords\n        elif type(keywords) is unicode:\n            final_keywords = keywords.encode('utf-8')\n        elif keywords is None:\n            final_keywords = \"\"\n        else:\n            raise TypeError(\"keywords argument must be a string or a list of strings; got a %s\" % type(keywords))\n        return final_keywords\n    \n    @staticmethod\n    def get_price_as_price(reward):\n        \"\"\"\n        Returns a Price data structure from either a float or a Price\n        \"\"\"\n        if isinstance(reward, Price):\n            final_price = reward\n        else:\n            final_price = Price(reward)\n        return final_price\n\n    @staticmethod\n    def duration_as_seconds(duration):\n        if isinstance(duration, datetime.timedelta):\n            duration = duration.days*86400 + duration.seconds\n        try:\n            duration = int(duration)\n        except TypeError:\n            raise TypeError(\"Duration must be a timedelta or int-castable, got %s\" % type(duration))\n        return duration\n\nclass BaseAutoResultElement:\n    \"\"\"\n    Base class to automatically add attributes when parsing XML\n    \"\"\"\n    def __init__(self, connection):\n        pass\n\n    def startElement(self, name, attrs, connection):\n        return None\n\n    def endElement(self, name, value, connection):\n        setattr(self, name, value)\n\nclass HIT(BaseAutoResultElement):\n    \"\"\"\n    Class to extract a HIT structure from a response (used in ResultSet)\n    \n    Will have attributes named as per the Developer Guide, \n    e.g. HITId, HITTypeId, CreationTime\n    \"\"\"\n\n    # property helper to determine if HIT has expired\n    def _has_expired(self):\n        \"\"\" Has this HIT expired yet? \"\"\"\n        expired = False\n        if hasattr(self, 'Expiration'):\n            now = datetime.datetime.utcnow()\n            expiration = datetime.datetime.strptime(self.Expiration, '%Y-%m-%dT%H:%M:%SZ')\n            expired = (now >= expiration)\n        else:\n            raise ValueError(\"ERROR: Request for expired property, but no Expiration in HIT!\")\n        return expired\n\n    # are we there yet?\n    expired = property(_has_expired)\n\nclass Qualification(BaseAutoResultElement):\n    \"\"\"\n    Class to extract an Qualification structure from a response (used in\n    ResultSet)\n    \n    Will have attributes named as per the Developer Guide such as\n    QualificationTypeId, IntegerValue. Does not seem to contain GrantTime.\n    \"\"\"\n    \n    pass\n\nclass QualificationType(BaseAutoResultElement):\n    \"\"\"\n    Class to extract an QualificationType structure from a response (used in\n    ResultSet)\n    \n    Will have attributes named as per the Developer Guide, \n    e.g. QualificationTypeId, CreationTime, Name, etc\n    \"\"\"\n    \n    pass\n\nclass QualificationRequest(BaseAutoResultElement):\n    \"\"\"\n    Class to extract an QualificationRequest structure from a response (used in\n    ResultSet)\n    \n    Will have attributes named as per the Developer Guide, \n    e.g. QualificationRequestId, QualificationTypeId, SubjectId, etc\n\n    TODO: Ensure that Test and Answer attribute are treated properly if the\n          qualification requires a test. These attributes are XML-encoded.\n    \"\"\"\n    \n    pass\n\nclass Assignment(BaseAutoResultElement):\n    \"\"\"\n    Class to extract an Assignment structure from a response (used in\n    ResultSet)\n    \n    Will have attributes named as per the Developer Guide, \n    e.g. AssignmentId, WorkerId, HITId, Answer, etc\n    \"\"\"\n\n    def __init__(self, connection):\n        BaseAutoResultElement.__init__(self, connection)\n        self.answers = []\n\n    def endElement(self, name, value, connection):\n        # the answer consists of embedded XML, so it needs to be parsed independantly\n        if name == 'Answer':\n            answer_rs = ResultSet([('Answer', QuestionFormAnswer),])\n            h = handler.XmlHandler(answer_rs, connection)\n            value = connection.get_utf8_value(value)\n            xml.sax.parseString(value, h)\n            self.answers.append(answer_rs)\n        else:\n            BaseAutoResultElement.endElement(self, name, value, connection)\n\nclass QuestionFormAnswer(BaseAutoResultElement):\n    \"\"\"\n    Class to extract Answers from inside the embedded XML\n    QuestionFormAnswers element inside the Answer element which is\n    part of the Assignment structure\n\n    A QuestionFormAnswers element contains an Answer element for each\n    question in the HIT or Qualification test for which the Worker\n    provided an answer. Each Answer contains a QuestionIdentifier\n    element whose value corresponds to the QuestionIdentifier of a\n    Question in the QuestionForm. See the QuestionForm data structure\n    for more information about questions and answer specifications.\n\n    If the question expects a free-text answer, the Answer element\n    contains a FreeText element. This element contains the Worker's\n    answer\n\n    *NOTE* - currently really only supports free-text and selection answers\n    \"\"\"\n\n    def __init__(self, connection):\n        BaseAutoResultElement.__init__(self, connection)\n        self.fields = []\n        self.qid = None\n\n    def endElement(self, name, value, connection):\n        if name == 'QuestionIdentifier':\n            self.qid = value\n        elif name in ['FreeText', 'SelectionIdentifier', 'OtherSelectionText'] and self.qid:\n            self.fields.append((self.qid,value))\n        elif name == 'Answer':\n            self.qid = None\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/mturk/notification.py",
    "content": "# Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\n\"\"\"\nProvides NotificationMessage and Event classes, with utility methods, for\nimplementations of the Mechanical Turk Notification API.\n\"\"\"\n\nimport hmac\ntry:\n    from hashlib import sha1 as sha\nexcept ImportError:\n    import sha\nimport base64\nimport re\n\nclass NotificationMessage:\n\n    NOTIFICATION_WSDL = \"http://mechanicalturk.amazonaws.com/AWSMechanicalTurk/2006-05-05/AWSMechanicalTurkRequesterNotification.wsdl\"\n    NOTIFICATION_VERSION = '2006-05-05'\n\n    SERVICE_NAME = \"AWSMechanicalTurkRequesterNotification\"\n    OPERATION_NAME = \"Notify\"\n\n    EVENT_PATTERN = r\"Event\\.(?P<n>\\d+)\\.(?P<param>\\w+)\"\n    EVENT_RE = re.compile(EVENT_PATTERN)\n\n    def __init__(self, d):\n        \"\"\"\n        Constructor; expects parameter d to be a dict of string parameters from a REST transport notification message\n        \"\"\"\n        self.signature = d['Signature'] # vH6ZbE0NhkF/hfNyxz2OgmzXYKs=\n        self.timestamp = d['Timestamp'] # 2006-05-23T23:22:30Z\n        self.version = d['Version'] # 2006-05-05\n        assert d['method'] == NotificationMessage.OPERATION_NAME, \"Method should be '%s'\" % NotificationMessage.OPERATION_NAME\n\n        # Build Events\n        self.events = []\n        events_dict = {}\n        if 'Event' in d:\n            # TurboGears surprised me by 'doing the right thing' and making { 'Event': { '1': { 'EventType': ... } } } etc.\n            events_dict = d['Event']\n        else:\n            for k in d:\n                v = d[k]\n                if k.startswith('Event.'):\n                    ed = NotificationMessage.EVENT_RE.search(k).groupdict()\n                    n = int(ed['n'])\n                    param = str(ed['param'])\n                    if n not in events_dict:\n                        events_dict[n] = {}\n                    events_dict[n][param] = v\n        for n in events_dict:\n            self.events.append(Event(events_dict[n]))\n\n    def verify(self, secret_key):\n        \"\"\"\n        Verifies the authenticity of a notification message.\n\n        TODO: This is doing a form of authentication and\n              this functionality should really be merged\n              with the pluggable authentication mechanism\n              at some point.\n        \"\"\"\n        verification_input = NotificationMessage.SERVICE_NAME\n        verification_input += NotificationMessage.OPERATION_NAME\n        verification_input += self.timestamp\n        h = hmac.new(key=secret_key, digestmod=sha)\n        h.update(verification_input)\n        signature_calc = base64.b64encode(h.digest())\n        return self.signature == signature_calc\n\nclass Event:\n    def __init__(self, d):\n        self.event_type = d['EventType']\n        self.event_time_str = d['EventTime']\n        self.hit_type = d['HITTypeId']\n        self.hit_id = d['HITId']\n        if 'AssignmentId' in d:   # Not present in all event types\n            self.assignment_id = d['AssignmentId']\n\n        #TODO: build self.event_time datetime from string self.event_time_str\n\n    def __repr__(self):\n        return \"<boto.mturk.notification.Event: %s for HIT # %s>\" % (self.event_type, self.hit_id)\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/mturk/price.py",
    "content": "# Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nclass Price:\n\n    def __init__(self, amount=0.0, currency_code='USD'):\n        self.amount = amount\n        self.currency_code = currency_code\n        self.formatted_price = ''\n\n    def __repr__(self):\n        if self.formatted_price:\n            return self.formatted_price\n        else:\n            return str(self.amount)\n\n    def startElement(self, name, attrs, connection):\n        return None\n\n    def endElement(self, name, value, connection):\n        if name == 'Amount':\n            self.amount = float(value)\n        elif name == 'CurrencyCode':\n            self.currency_code = value\n        elif name == 'FormattedPrice':\n            self.formatted_price = value\n\n    def get_as_params(self, label, ord=1):\n        return {'%s.%d.Amount'%(label, ord) : str(self.amount),\n                '%s.%d.CurrencyCode'%(label, ord) : self.currency_code}\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/mturk/qualification.py",
    "content": "# Copyright (c) 2008 Chris Moyer http://coredumped.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nclass Qualifications:\n\n    def __init__(self, requirements=None):\n        if requirements == None:\n            requirements = []\n        self.requirements = requirements\n\n    def add(self, req):\n        self.requirements.append(req)\n\n    def get_as_params(self):\n        params = {}\n        assert(len(self.requirements) <= 10)\n        for n, req in enumerate(self.requirements):\n            reqparams = req.get_as_params()\n            for rp in reqparams:\n                params['QualificationRequirement.%s.%s' % ((n+1),rp) ] = reqparams[rp]\n        return params\n\n\nclass Requirement(object):\n    \"\"\"\n    Representation of a single requirement\n    \"\"\"\n\n    def __init__(self, qualification_type_id, comparator, integer_value=None, required_to_preview=False):\n        self.qualification_type_id = qualification_type_id\n        self.comparator = comparator\n        self.integer_value = integer_value\n        self.required_to_preview = required_to_preview\n    \n    def get_as_params(self):\n        params =  {\n            \"QualificationTypeId\": self.qualification_type_id,\n            \"Comparator\": self.comparator,\n        }\n        if self.comparator != 'Exists' and self.integer_value is not None:\n            params['IntegerValue'] = self.integer_value\n        if self.required_to_preview:\n            params['RequiredToPreview'] = \"true\"\n        return params\n\nclass PercentAssignmentsSubmittedRequirement(Requirement):\n    \"\"\"\n    The percentage of assignments the Worker has submitted, over all assignments the Worker has accepted. The value is an integer between 0 and 100.\n    \"\"\"\n\n    def __init__(self, comparator, integer_value, required_to_preview=False):\n        Requirement.__init__(self, qualification_type_id=\"00000000000000000000\", comparator=comparator, integer_value=integer_value, required_to_preview=required_to_preview)\n\nclass PercentAssignmentsAbandonedRequirement(Requirement):\n    \"\"\"\n    The percentage of assignments the Worker has abandoned (allowed the deadline to elapse), over all assignments the Worker has accepted. The value is an integer between 0 and 100.\n    \"\"\"\n\n    def __init__(self, comparator, integer_value, required_to_preview=False):\n        Requirement.__init__(self, qualification_type_id=\"00000000000000000070\", comparator=comparator, integer_value=integer_value, required_to_preview=required_to_preview)\n\nclass PercentAssignmentsReturnedRequirement(Requirement):\n    \"\"\"\n    The percentage of assignments the Worker has returned, over all assignments the Worker has accepted. The value is an integer between 0 and 100.\n    \"\"\"\n\n    def __init__(self, comparator, integer_value, required_to_preview=False):\n        Requirement.__init__(self, qualification_type_id=\"000000000000000000E0\", comparator=comparator, integer_value=integer_value, required_to_preview=required_to_preview)\n\nclass PercentAssignmentsApprovedRequirement(Requirement):\n    \"\"\"\n    The percentage of assignments the Worker has submitted that were subsequently approved by the Requester, over all assignments the Worker has submitted. The value is an integer between 0 and 100.\n    \"\"\"\n\n    def __init__(self, comparator, integer_value, required_to_preview=False):\n        Requirement.__init__(self, qualification_type_id=\"000000000000000000L0\", comparator=comparator, integer_value=integer_value, required_to_preview=required_to_preview)\n\nclass PercentAssignmentsRejectedRequirement(Requirement):\n    \"\"\"\n    The percentage of assignments the Worker has submitted that were subsequently rejected by the Requester, over all assignments the Worker has submitted. The value is an integer between 0 and 100.\n    \"\"\"\n\n    def __init__(self, comparator, integer_value, required_to_preview=False):\n        Requirement.__init__(self, qualification_type_id=\"000000000000000000S0\", comparator=comparator, integer_value=integer_value, required_to_preview=required_to_preview)\n\nclass NumberHitsApprovedRequirement(Requirement):\n    \"\"\"\n    Specifies the total number of HITs submitted by a Worker that have been approved. The value is an integer greater than or equal to 0.\n    \"\"\"\n    \n    def __init__(self, comparator, integer_value, required_to_preview=False):\n        Requirement.__init__(self, qualification_type_id=\"00000000000000000040\", comparator=comparator, integer_value=integer_value, required_to_preview=required_to_preview)\n\nclass LocaleRequirement(Requirement):\n    \"\"\"\n    A Qualification requirement based on the Worker's location. The Worker's location is specified by the Worker to Mechanical Turk when the Worker creates his account.\n    \"\"\"\n\n    def __init__(self, comparator, locale, required_to_preview=False):\n        Requirement.__init__(self, qualification_type_id=\"00000000000000000071\", comparator=comparator, integer_value=None, required_to_preview=required_to_preview)\n        self.locale = locale\n\n    def get_as_params(self):\n        params =  {\n            \"QualificationTypeId\": self.qualification_type_id,\n            \"Comparator\": self.comparator,\n            'LocaleValue.Country': self.locale,\n        }\n        if self.required_to_preview:\n            params['RequiredToPreview'] = \"true\"\n        return params\n\nclass AdultRequirement(Requirement):\n    \"\"\"\n    Requires workers to acknowledge that they are over 18 and that they agree to work on potentially offensive content. The value type is boolean, 1 (required), 0 (not required, the default).\n    \"\"\"\n    \n    def __init__(self, comparator, integer_value, required_to_preview=False):\n        Requirement.__init__(self, qualification_type_id=\"00000000000000000060\", comparator=comparator, integer_value=integer_value, required_to_preview=required_to_preview)\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/mturk/question.py",
    "content": "# Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nclass Question(object):\n    template = \"<Question>%(items)s</Question>\"\n    \n    def __init__(self, identifier, content, answer_spec,\n                 is_required=False, display_name=None):\n        # copy all of the parameters into object attributes\n        self.__dict__.update(vars())\n        del self.self\n\n    def get_as_params(self, label='Question'):\n        return { label : self.get_as_xml() }\n\n    def get_as_xml(self):\n        items = [\n            SimpleField('QuestionIdentifier', self.identifier),\n            SimpleField('IsRequired', str(self.is_required).lower()),\n            self.content,\n            self.answer_spec,\n        ]\n        if self.display_name is not None:\n            items.insert(1, SimpleField('DisplayName', self.display_name))\n        items = ''.join(item.get_as_xml() for item in items)\n        return self.template % vars()\n\ntry:\n\tfrom lxml import etree\n\tclass ValidatingXML(object):\n\t\tdef validate(self):\n\t\t\timport urllib2\n\t\t\tschema_src_file = urllib2.urlopen(self.schema_url)\n\t\t\tschema_doc = etree.parse(schema_src_file)\n\t\t\tschema = etree.XMLSchema(schema_doc)\n\t\t\tdoc = etree.fromstring(self.get_as_xml())\n\t\t\tschema.assertValid(doc)\nexcept ImportError:\n\tclass ValidatingXML(object):\n\t\tdef validate(self): pass\n\n\nclass ExternalQuestion(ValidatingXML):\n    \"\"\"\n    An object for constructing an External Question.\n    \"\"\"\n    schema_url = \"http://mechanicalturk.amazonaws.com/AWSMechanicalTurkDataSchemas/2006-07-14/ExternalQuestion.xsd\"\n    template = '<ExternalQuestion xmlns=\"%(schema_url)s\"><ExternalURL>%%(external_url)s</ExternalURL><FrameHeight>%%(frame_height)s</FrameHeight></ExternalQuestion>' % vars()\n    \n    def __init__(self, external_url, frame_height):\n        self.external_url = external_url\n        self.frame_height = frame_height\n    \n    def get_as_params(self, label='ExternalQuestion'):\n        return { label : self.get_as_xml() }\n    \n    def get_as_xml(self):\n        return self.template % vars(self)\n\nclass XMLTemplate:\n    def get_as_xml(self):\n        return self.template % vars(self)\n\nclass SimpleField(object, XMLTemplate):\n    \"\"\"\n    A Simple name/value pair that can be easily rendered as XML.\n    \n    >>> SimpleField('Text', 'A text string').get_as_xml()\n    '<Text>A text string</Text>'\n    \"\"\"\n    template = '<%(field)s>%(value)s</%(field)s>'\n    \n    def __init__(self, field, value):\n        self.field = field\n        self.value = value\n\nclass Binary(object, XMLTemplate):\n    template = \"\"\"<Binary><MimeType><Type>%(type)s</Type><SubType>%(subtype)s</SubType></MimeType><DataURL>%(url)s</DataURL><AltText>%(alt_text)s</AltText></Binary>\"\"\"\n    def __init__(self, type, subtype, url, alt_text):\n        self.__dict__.update(vars())\n        del self.self\n\nclass List(list):\n    \"\"\"A bulleted list suitable for OrderedContent or Overview content\"\"\"\n    def get_as_xml(self):\n        items = ''.join('<ListItem>%s</ListItem>' % item for item in self)\n        return '<List>%s</List>' % items\n\nclass Application(object):\n    template = \"<Application><%(class_)s>%(content)s</%(class_)s></Application>\"\n    parameter_template = \"<Name>%(name)s</Name><Value>%(value)s</Value>\"\n\n    def __init__(self, width, height, **parameters):\n        self.width = width\n        self.height = height\n        self.parameters = parameters\n\n    def get_inner_content(self, content):\n        content.append_field('Width', self.width)\n        content.append_field('Height', self.height)\n        for name, value in self.parameters.items():\n            value = self.parameter_template % vars()\n            content.append_field('ApplicationParameter', value)\n\n    def get_as_xml(self):\n        content = OrderedContent()\n        self.get_inner_content(content)\n        content = content.get_as_xml()\n        class_ = self.__class__.__name__\n        return self.template % vars()\n\nclass JavaApplet(Application):\n    def __init__(self, path, filename, *args, **kwargs):\n        self.path = path\n        self.filename = filename\n        super(JavaApplet, self).__init__(*args, **kwargs)\n\n    def get_inner_content(self, content):\n        content = OrderedContent()\n        content.append_field('AppletPath', self.path)\n        content.append_field('AppletFilename', self.filename)\n        super(JavaApplet, self).get_inner_content(content)\n\nclass Flash(Application):\n    def __init__(self, url, *args, **kwargs):\n        self.url = url\n        super(Flash, self).__init__(*args, **kwargs)\n\n    def get_inner_content(self, content):\n        content = OrderedContent()\n        content.append_field('FlashMovieURL', self.url)\n        super(Flash, self).get_inner_content(content)\n\nclass FormattedContent(object, XMLTemplate):\n    schema_url = 'http://mechanicalturk.amazonaws.com/AWSMechanicalTurkDataSchemas/2006-07-14/FormattedContentXHTMLSubset.xsd'\n    template = '<FormattedContent><![CDATA[%(content)s]]></FormattedContent>'\n    def __init__(self, content):\n        self.content = content\n\nclass OrderedContent(list):\n\n    def append_field(self, field, value):\n        self.append(SimpleField(field, value))\n\n    def get_as_xml(self):\n        return ''.join(item.get_as_xml() for item in self)\n\nclass Overview(OrderedContent):\n    template = '<Overview>%(content)s</Overview>'\n\n    def get_as_params(self, label='Overview'):\n        return { label : self.get_as_xml() }\n    \n    def get_as_xml(self):\n        content = super(Overview, self).get_as_xml()\n        return self.template % vars()\n\nclass QuestionForm(ValidatingXML, list):\n    \"\"\"\n    From the AMT API docs:\n    \n    The top-most element of the QuestionForm data structure is a\n    QuestionForm element. This element contains optional Overview\n    elements and one or more Question elements. There can be any\n    number of these two element types listed in any order. The\n    following example structure has an Overview element and a\n    Question element followed by a second Overview element and\n    Question element--all within the same QuestionForm.\n    \n    ::\n    \n        <QuestionForm xmlns=\"[the QuestionForm schema URL]\">\n            <Overview>\n                [...]\n            </Overview>\n            <Question>\n                [...]\n            </Question>\n            <Overview>\n                [...]\n            </Overview>\n            <Question>\n                [...]\n            </Question>\n            [...]\n        </QuestionForm>\n    \n    QuestionForm is implemented as a list, so to construct a\n    QuestionForm, simply append Questions and Overviews (with at least\n    one Question).\n    \"\"\"\n    schema_url = \"http://mechanicalturk.amazonaws.com/AWSMechanicalTurkDataSchemas/2005-10-01/QuestionForm.xsd\"\n    xml_template = \"\"\"<QuestionForm xmlns=\"%(schema_url)s\">%%(items)s</QuestionForm>\"\"\" % vars()\n\n    def is_valid(self):\n        return (\n            any(isinstance(item, Question) for item in self)\n            and\n            all(isinstance(item, (Question, Overview)) for item in self)\n            )\n\n    def get_as_xml(self):\n        assert self.is_valid(), \"QuestionForm contains invalid elements\"\n        items = ''.join(item.get_as_xml() for item in self)\n        return self.xml_template % vars()\n\nclass QuestionContent(OrderedContent):\n    template = '<QuestionContent>%(content)s</QuestionContent>'\n\n    def get_as_xml(self):\n        content = super(QuestionContent, self).get_as_xml()\n        return self.template % vars()\n\nclass AnswerSpecification(object):\n    template = '<AnswerSpecification>%(spec)s</AnswerSpecification>'\n\n    def __init__(self, spec):\n        self.spec = spec\n\n    def get_as_xml(self):\n        spec = self.spec.get_as_xml()\n        return self.template % vars()\n\nclass Constraints(OrderedContent):\n    template = '<Constraints>%(content)s</Constraints>'\n\n    def get_as_xml(self):\n        content = super(Constraints, self).get_as_xml()\n        return self.template % vars()\n\nclass Constraint(object):\n    def get_attributes(self):\n        pairs = zip(self.attribute_names, self.attribute_values)\n        attrs = ' '.join(\n            '%s=\"%d\"' % (name,value)\n            for (name,value) in pairs\n            if value is not None\n            )\n        return attrs\n\n    def get_as_xml(self):\n        attrs = self.get_attributes()\n        return self.template % vars()\n\nclass NumericConstraint(Constraint):\n    attribute_names = 'minValue', 'maxValue'\n    template = '<IsNumeric %(attrs)s />'\n\n    def __init__(self, min_value=None, max_value=None):\n        self.attribute_values = min_value, max_value\n\nclass LengthConstraint(Constraint):\n    attribute_names = 'minLength', 'maxLength'\n    template = '<Length %(attrs)s />'\n\n    def __init__(self, min_length=None, max_length=None):\n        self.attribute_values = min_length, max_length\n\nclass RegExConstraint(Constraint):\n    attribute_names = 'regex', 'errorText', 'flags'\n    template = '<AnswerFormatRegex %(attrs)s />'\n\n    def __init__(self, pattern, error_text=None, flags=None):\n        self.attribute_values = pattern, error_text, flags\n\nclass NumberOfLinesSuggestion(object):\n    template = '<NumberOfLinesSuggestion>%(num_lines)s</NumberOfLinesSuggestion>'\n\n    def __init__(self, num_lines=1):\n        self.num_lines = num_lines\n    \n    def get_as_xml(self):\n        num_lines = self.num_lines\n        return self.template % vars()\n    \nclass FreeTextAnswer(object):\n    template = '<FreeTextAnswer>%(items)s</FreeTextAnswer>'\n\n    def __init__(self, default=None, constraints=None, num_lines=None):\n        self.default = default\n        if constraints is None:\n            self.constraints = Constraints()\n        else:\n            self.constraints = Constraints(constraints)\n        self.num_lines = num_lines\n    \n    def get_as_xml(self):\n        items = [self.constraints]\n        if self.default:\n            items.append(SimpleField('DefaultText', self.default))\n        if self.num_lines:\n            items.append(NumberOfLinesSuggestion(self.num_lines))\n        items = ''.join(item.get_as_xml() for item in items)\n        return self.template % vars()\n\nclass FileUploadAnswer(object):\n    template = \"\"\"<FileUploadAnswer><MinFileSizeInBytes>%(min_bytes)d</MinFileSizeInBytes><MaxFileSizeInBytes>%(max_bytes)d</MaxFileSizeInBytes></FileUploadAnswer>\"\"\"\n    \n    def __init__(self, min_bytes, max_bytes):\n        assert 0 <= min_bytes <= max_bytes <= 2*10**9\n        self.min_bytes = min_bytes\n        self.max_bytes = max_bytes\n    \n    def get_as_xml(self):\n        return self.template % vars(self)\n\nclass SelectionAnswer(object):\n    \"\"\"\n    A class to generate SelectionAnswer XML data structures.\n    Does not yet implement Binary selection options.\n    \"\"\"\n    SELECTIONANSWER_XML_TEMPLATE = \"\"\"<SelectionAnswer>%s%s<Selections>%s</Selections></SelectionAnswer>\"\"\" # % (count_xml, style_xml, selections_xml)\n    SELECTION_XML_TEMPLATE = \"\"\"<Selection><SelectionIdentifier>%s</SelectionIdentifier>%s</Selection>\"\"\" # (identifier, value_xml)\n    SELECTION_VALUE_XML_TEMPLATE = \"\"\"<%s>%s</%s>\"\"\" # (type, value, type)\n    STYLE_XML_TEMPLATE = \"\"\"<StyleSuggestion>%s</StyleSuggestion>\"\"\" # (style)\n    MIN_SELECTION_COUNT_XML_TEMPLATE = \"\"\"<MinSelectionCount>%s</MinSelectionCount>\"\"\" # count\n    MAX_SELECTION_COUNT_XML_TEMPLATE = \"\"\"<MaxSelectionCount>%s</MaxSelectionCount>\"\"\" # count\n    ACCEPTED_STYLES = ['radiobutton', 'dropdown', 'checkbox', 'list', 'combobox', 'multichooser']\n    OTHER_SELECTION_ELEMENT_NAME = 'OtherSelection'\n    \n    def __init__(self, min=1, max=1, style=None, selections=None, type='text', other=False):\n        \n        if style is not None:\n            if style in SelectionAnswer.ACCEPTED_STYLES:\n                self.style_suggestion = style\n            else:\n                raise ValueError(\"style '%s' not recognized; should be one of %s\" % (style, ', '.join(SelectionAnswer.ACCEPTED_STYLES)))\n        else:\n            self.style_suggestion = None\n        \n        if selections is None:\n            raise ValueError(\"SelectionAnswer.__init__(): selections must be a non-empty list of (content, identifier) tuples\")\n        else:\n            self.selections = selections\n        \n        self.min_selections = min\n        self.max_selections = max\n        \n        assert len(selections) >= self.min_selections, \"# of selections is less than minimum of %d\" % self.min_selections\n        #assert len(selections) <= self.max_selections, \"# of selections exceeds maximum of %d\" % self.max_selections\n        \n        self.type = type\n        \n        self.other = other\n    \n    def get_as_xml(self):\n        if self.type == 'text':\n            TYPE_TAG = \"Text\"\n        elif self.type == 'binary':\n            TYPE_TAG = \"Binary\"\n        else:\n            raise ValueError(\"illegal type: %s; must be either 'text' or 'binary'\" % str(self.type))\n        \n        # build list of <Selection> elements\n        selections_xml = \"\"\n        for tpl in self.selections:\n            value_xml = SelectionAnswer.SELECTION_VALUE_XML_TEMPLATE % (TYPE_TAG, tpl[0], TYPE_TAG)\n            selection_xml = SelectionAnswer.SELECTION_XML_TEMPLATE % (tpl[1], value_xml)\n            selections_xml += selection_xml\n        \n        if self.other:\n            # add OtherSelection element as xml if available\n            if hasattr(self.other, 'get_as_xml'):\n                assert type(self.other) == FreeTextAnswer, 'OtherSelection can only be a FreeTextAnswer'\n                selections_xml += self.other.get_as_xml().replace('FreeTextAnswer', 'OtherSelection')\n            else:\n                selections_xml += \"<OtherSelection />\"\n        \n        if self.style_suggestion is not None:\n            style_xml = SelectionAnswer.STYLE_XML_TEMPLATE % self.style_suggestion\n        else:\n            style_xml = \"\"\n\n        if self.style_suggestion != 'radiobutton':\n            count_xml = SelectionAnswer.MIN_SELECTION_COUNT_XML_TEMPLATE %self.min_selections\n            count_xml += SelectionAnswer.MAX_SELECTION_COUNT_XML_TEMPLATE %self.max_selections\n        else:\n            count_xml = \"\"\n        \n        ret = SelectionAnswer.SELECTIONANSWER_XML_TEMPLATE % (count_xml, style_xml, selections_xml)\n\n        # return XML\n        return ret\n        \n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/plugin.py",
    "content": "# Copyright 2010 Google Inc.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\n\n\"\"\"\nImplements plugin related api.\n\nTo define a new plugin just subclass Plugin, like this.\n\nclass AuthPlugin(Plugin):\n  pass\n\nThen start creating subclasses of your new plugin.\n\nclass MyFancyAuth(AuthPlugin):\n  capability = ['sign', 'vmac'] \n\nThe actual interface is duck typed.\n \n\"\"\"\n\nimport glob\nimport imp, os.path\n\nclass Plugin(object):\n    \"\"\"Base class for all plugins.\"\"\"\n\n    capability = []\n\n    @classmethod\n    def is_capable(cls, requested_capability):\n        \"\"\"Returns true if the requested capability is supported by this plugin\n        \"\"\"\n        for c in requested_capability:\n            if not c in cls.capability:\n                return False\n        return True\n\ndef get_plugin(cls, requested_capability=None):\n    if not requested_capability:\n        requested_capability = []\n    result = []\n    for handler in cls.__subclasses__():\n        if handler.is_capable(requested_capability):\n            result.append(handler)\n    return result\n\ndef _import_module(filename):\n    (path, name) = os.path.split(filename)\n    (name, ext) = os.path.splitext(name)\n\n    (file, filename, data) = imp.find_module(name, [path])\n    try:\n      return imp.load_module(name, file, filename, data)\n    finally:\n      if file:\n        file.close()\n\n_plugin_loaded = False \n\ndef load_plugins(config):\n    global _plugin_loaded\n    if _plugin_loaded:\n        return\n    _plugin_loaded = True\n\n    if not config.has_option('Plugin', 'plugin_directory'):\n        return\n    directory = config.get('Plugin', 'plugin_directory')\n    for file in glob.glob(os.path.join(directory, '*.py')):\n        _import_module(file)\n\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/provider.py",
    "content": "# Copyright (c) 2010 Mitch Garnaat http://garnaat.org/\n# Copyright 2010 Google Inc.\n# Copyright (c) 2010, Eucalyptus Systems, Inc.\n# Copyright (c) 2011, Nexenta Systems Inc.\n# All rights reserved.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\"\"\"\nThis class encapsulates the provider-specific header differences.\n\"\"\"\n\nimport os\nimport boto\nfrom boto import config\nfrom boto.gs.acl import ACL\nfrom boto.gs.acl import CannedACLStrings as CannedGSACLStrings\nfrom boto.s3.acl import CannedACLStrings as CannedS3ACLStrings\nfrom boto.s3.acl import Policy\n\nHEADER_PREFIX_KEY = 'header_prefix'\nMETADATA_PREFIX_KEY = 'metadata_prefix'\n\nAWS_HEADER_PREFIX = 'x-amz-'\nGOOG_HEADER_PREFIX = 'x-goog-'\n\nACL_HEADER_KEY = 'acl-header'\nAUTH_HEADER_KEY = 'auth-header'\nCOPY_SOURCE_HEADER_KEY = 'copy-source-header'\nCOPY_SOURCE_VERSION_ID_HEADER_KEY = 'copy-source-version-id-header'\nDELETE_MARKER_HEADER_KEY = 'delete-marker-header'\nDATE_HEADER_KEY = 'date-header'\nMETADATA_DIRECTIVE_HEADER_KEY = 'metadata-directive-header'\nRESUMABLE_UPLOAD_HEADER_KEY = 'resumable-upload-header'\nSECURITY_TOKEN_HEADER_KEY = 'security-token-header'\nSTORAGE_CLASS_HEADER_KEY = 'storage-class'\nMFA_HEADER_KEY = 'mfa-header'\nSERVER_SIDE_ENCRYPTION_KEY = 'server-side-encryption-header'\nVERSION_ID_HEADER_KEY = 'version-id-header'\n\nSTORAGE_COPY_ERROR = 'StorageCopyError'\nSTORAGE_CREATE_ERROR = 'StorageCreateError'\nSTORAGE_DATA_ERROR = 'StorageDataError'\nSTORAGE_PERMISSIONS_ERROR = 'StoragePermissionsError'\nSTORAGE_RESPONSE_ERROR = 'StorageResponseError'\n\n\nclass Provider(object):\n\n    CredentialMap = {\n        'aws' : ('aws_access_key_id', 'aws_secret_access_key'),\n        'google' : ('gs_access_key_id', 'gs_secret_access_key'),\n    }\n\n    AclClassMap = {\n        'aws' : Policy,\n        'google' : ACL\n    }\n\n    CannedAclsMap = {\n        'aws' : CannedS3ACLStrings,\n        'google' : CannedGSACLStrings\n    }\n\n    HostKeyMap = {\n        'aws' : 's3',\n        'google' : 'gs'\n    }\n\n    ChunkedTransferSupport = {\n        'aws' : False,\n        'google' : True\n    }\n\n    # If you update this map please make sure to put \"None\" for the\n    # right-hand-side for any headers that don't apply to a provider, rather\n    # than simply leaving that header out (which would cause KeyErrors).\n    HeaderInfoMap = {\n        'aws' : {\n            HEADER_PREFIX_KEY : AWS_HEADER_PREFIX,\n            METADATA_PREFIX_KEY : AWS_HEADER_PREFIX + 'meta-',\n            ACL_HEADER_KEY : AWS_HEADER_PREFIX + 'acl',\n            AUTH_HEADER_KEY : 'AWS',\n            COPY_SOURCE_HEADER_KEY : AWS_HEADER_PREFIX + 'copy-source',\n            COPY_SOURCE_VERSION_ID_HEADER_KEY : AWS_HEADER_PREFIX +\n                                                'copy-source-version-id',\n            DATE_HEADER_KEY : AWS_HEADER_PREFIX + 'date',\n            DELETE_MARKER_HEADER_KEY : AWS_HEADER_PREFIX + 'delete-marker',\n            METADATA_DIRECTIVE_HEADER_KEY : AWS_HEADER_PREFIX +\n                                            'metadata-directive',\n            RESUMABLE_UPLOAD_HEADER_KEY : None,\n            SECURITY_TOKEN_HEADER_KEY : AWS_HEADER_PREFIX + 'security-token',\n            SERVER_SIDE_ENCRYPTION_KEY : AWS_HEADER_PREFIX + 'server-side-encryption',\n            VERSION_ID_HEADER_KEY : AWS_HEADER_PREFIX + 'version-id',\n            STORAGE_CLASS_HEADER_KEY : AWS_HEADER_PREFIX + 'storage-class',\n            MFA_HEADER_KEY : AWS_HEADER_PREFIX + 'mfa',\n        },\n        'google' : {\n            HEADER_PREFIX_KEY : GOOG_HEADER_PREFIX,\n            METADATA_PREFIX_KEY : GOOG_HEADER_PREFIX + 'meta-',\n            ACL_HEADER_KEY : GOOG_HEADER_PREFIX + 'acl',\n            AUTH_HEADER_KEY : 'GOOG1',\n            COPY_SOURCE_HEADER_KEY : GOOG_HEADER_PREFIX + 'copy-source',\n            COPY_SOURCE_VERSION_ID_HEADER_KEY : GOOG_HEADER_PREFIX +\n                                                'copy-source-version-id',\n            DATE_HEADER_KEY : GOOG_HEADER_PREFIX + 'date',\n            DELETE_MARKER_HEADER_KEY : GOOG_HEADER_PREFIX + 'delete-marker',\n            METADATA_DIRECTIVE_HEADER_KEY : GOOG_HEADER_PREFIX  +\n                                            'metadata-directive',\n            RESUMABLE_UPLOAD_HEADER_KEY : GOOG_HEADER_PREFIX + 'resumable',\n            SECURITY_TOKEN_HEADER_KEY : GOOG_HEADER_PREFIX + 'security-token',\n            SERVER_SIDE_ENCRYPTION_KEY : None,\n            # Note that this version header is not to be confused with\n            # the Google Cloud Storage 'x-goog-api-version' header.\n            VERSION_ID_HEADER_KEY : GOOG_HEADER_PREFIX + 'version-id',\n            STORAGE_CLASS_HEADER_KEY : None,\n            MFA_HEADER_KEY : None,\n        }\n    }\n\n    ErrorMap = {\n        'aws' : {\n            STORAGE_COPY_ERROR : boto.exception.S3CopyError,\n            STORAGE_CREATE_ERROR : boto.exception.S3CreateError,\n            STORAGE_DATA_ERROR : boto.exception.S3DataError,\n            STORAGE_PERMISSIONS_ERROR : boto.exception.S3PermissionsError,\n            STORAGE_RESPONSE_ERROR : boto.exception.S3ResponseError,\n        },\n        'google' : {\n            STORAGE_COPY_ERROR : boto.exception.GSCopyError,\n            STORAGE_CREATE_ERROR : boto.exception.GSCreateError,\n            STORAGE_DATA_ERROR : boto.exception.GSDataError,\n            STORAGE_PERMISSIONS_ERROR : boto.exception.GSPermissionsError,\n            STORAGE_RESPONSE_ERROR : boto.exception.GSResponseError,\n        }\n    }\n\n    def __init__(self, name, access_key=None, secret_key=None,\n                 security_token=None):\n        self.host = None\n        self.access_key = access_key\n        self.secret_key = secret_key\n        self.security_token = security_token\n        self.name = name\n        self.acl_class = self.AclClassMap[self.name]\n        self.canned_acls = self.CannedAclsMap[self.name]\n        self.get_credentials(access_key, secret_key)\n        self.configure_headers()\n        self.configure_errors()\n        # allow config file to override default host\n        host_opt_name = '%s_host' % self.HostKeyMap[self.name]\n        if config.has_option('Credentials', host_opt_name):\n            self.host = config.get('Credentials', host_opt_name)\n\n    def get_credentials(self, access_key=None, secret_key=None):\n        access_key_name, secret_key_name = self.CredentialMap[self.name]\n        if access_key is not None:\n            self.access_key = access_key\n        elif os.environ.has_key(access_key_name.upper()):\n            self.access_key = os.environ[access_key_name.upper()]\n        elif config.has_option('Credentials', access_key_name):\n            self.access_key = config.get('Credentials', access_key_name)\n\n        if secret_key is not None:\n            self.secret_key = secret_key\n        elif os.environ.has_key(secret_key_name.upper()):\n            self.secret_key = os.environ[secret_key_name.upper()]\n        elif config.has_option('Credentials', secret_key_name):\n            self.secret_key = config.get('Credentials', secret_key_name)\n        if isinstance(self.secret_key, unicode):\n            # the secret key must be bytes and not unicode to work\n            #  properly with hmac.new (see http://bugs.python.org/issue5285)\n            self.secret_key = str(self.secret_key)\n\n    def configure_headers(self):\n        header_info_map = self.HeaderInfoMap[self.name]\n        self.metadata_prefix = header_info_map[METADATA_PREFIX_KEY]\n        self.header_prefix = header_info_map[HEADER_PREFIX_KEY]\n        self.acl_header = header_info_map[ACL_HEADER_KEY]\n        self.auth_header = header_info_map[AUTH_HEADER_KEY]\n        self.copy_source_header = header_info_map[COPY_SOURCE_HEADER_KEY]\n        self.copy_source_version_id = header_info_map[\n            COPY_SOURCE_VERSION_ID_HEADER_KEY]\n        self.date_header = header_info_map[DATE_HEADER_KEY]\n        self.delete_marker = header_info_map[DELETE_MARKER_HEADER_KEY]\n        self.metadata_directive_header = (\n            header_info_map[METADATA_DIRECTIVE_HEADER_KEY])\n        self.security_token_header = header_info_map[SECURITY_TOKEN_HEADER_KEY]\n        self.resumable_upload_header = (\n            header_info_map[RESUMABLE_UPLOAD_HEADER_KEY])\n        self.server_side_encryption_header = header_info_map[SERVER_SIDE_ENCRYPTION_KEY]\n        self.storage_class_header = header_info_map[STORAGE_CLASS_HEADER_KEY]\n        self.version_id = header_info_map[VERSION_ID_HEADER_KEY]\n        self.mfa_header = header_info_map[MFA_HEADER_KEY]\n\n    def configure_errors(self):\n        error_map = self.ErrorMap[self.name]\n        self.storage_copy_error = error_map[STORAGE_COPY_ERROR]\n        self.storage_create_error = error_map[STORAGE_CREATE_ERROR]\n        self.storage_data_error = error_map[STORAGE_DATA_ERROR]\n        self.storage_permissions_error = error_map[STORAGE_PERMISSIONS_ERROR]\n        self.storage_response_error = error_map[STORAGE_RESPONSE_ERROR]\n\n    def get_provider_name(self):\n        return self.HostKeyMap[self.name]\n\n    def supports_chunked_transfer(self):\n        return self.ChunkedTransferSupport[self.name]\n\n# Static utility method for getting default Provider.\ndef get_default():\n    return Provider('aws')\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/pyami/__init__.py",
    "content": "# Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n#\n\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/pyami/bootstrap.py",
    "content": "# Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n#\nimport os\nimport boto\nfrom boto.utils import get_instance_metadata, get_instance_userdata\nfrom boto.pyami.config import Config, BotoConfigPath\nfrom boto.pyami.scriptbase import ScriptBase\nimport time\n\nclass Bootstrap(ScriptBase):\n    \"\"\"\n    The Bootstrap class is instantiated and run as part of the PyAMI\n    instance initialization process.  The methods in this class will\n    be run from the rc.local script of the instance and will be run\n    as the root user.\n\n    The main purpose of this class is to make sure the boto distribution\n    on the instance is the one required.\n    \"\"\"\n\n    def __init__(self):\n        self.working_dir = '/mnt/pyami'\n        self.write_metadata()\n        ScriptBase.__init__(self)\n\n    def write_metadata(self):\n        fp = open(os.path.expanduser(BotoConfigPath), 'w')\n        fp.write('[Instance]\\n')\n        inst_data = get_instance_metadata()\n        for key in inst_data:\n            fp.write('%s = %s\\n' % (key, inst_data[key]))\n        user_data = get_instance_userdata()\n        fp.write('\\n%s\\n' % user_data)\n        fp.write('[Pyami]\\n')\n        fp.write('working_dir = %s\\n' % self.working_dir)\n        fp.close()\n        # This file has the AWS credentials, should we lock it down?\n        # os.chmod(BotoConfigPath, stat.S_IREAD | stat.S_IWRITE)\n        # now that we have written the file, read it into a pyami Config object\n        boto.config = Config()\n        boto.init_logging()\n\n    def create_working_dir(self):\n        boto.log.info('Working directory: %s' % self.working_dir)\n        if not os.path.exists(self.working_dir):\n            os.mkdir(self.working_dir)\n\n    def load_boto(self):\n        update = boto.config.get('Boto', 'boto_update', 'svn:HEAD')\n        if update.startswith('svn'):\n            if update.find(':') >= 0:\n                method, version = update.split(':')\n                version = '-r%s' % version\n            else:\n                version = '-rHEAD'\n            location = boto.config.get('Boto', 'boto_location', '/usr/local/boto')\n            self.run('svn update %s %s' % (version, location))\n        elif update.startswith('git'):\n            location = boto.config.get('Boto', 'boto_location', '/usr/share/python-support/python-boto/boto')\n            num_remaining_attempts = 10\n            while num_remaining_attempts > 0:\n                num_remaining_attempts -= 1\n                try:\n                    self.run('git pull', cwd=location)\n                    num_remaining_attempts = 0\n                except Exception, e:\n                    boto.log.info('git pull attempt failed with the following exception. Trying again in a bit. %s', e)\n                    time.sleep(2)\n            if update.find(':') >= 0:\n                method, version = update.split(':')\n            else:\n                version = 'master'\n            self.run('git checkout %s' % version, cwd=location)\n        else:\n            # first remove the symlink needed when running from subversion\n            self.run('rm /usr/local/lib/python2.5/site-packages/boto')\n            self.run('easy_install %s' % update)\n\n    def fetch_s3_file(self, s3_file):\n        try:\n            from boto.utils import fetch_file\n            f = fetch_file(s3_file)\n            path = os.path.join(self.working_dir, s3_file.split(\"/\")[-1])\n            open(path, \"w\").write(f.read())\n        except:\n            boto.log.exception('Problem Retrieving file: %s' % s3_file)\n            path = None\n        return path\n\n    def load_packages(self):\n        package_str = boto.config.get('Pyami', 'packages')\n        if package_str:\n            packages = package_str.split(',')\n            for package in packages:\n                package = package.strip()\n                if package.startswith('s3:'):\n                    package = self.fetch_s3_file(package)\n                if package:\n                    # if the \"package\" is really a .py file, it doesn't have to\n                    # be installed, just being in the working dir is enough\n                    if not package.endswith('.py'):\n                        self.run('easy_install -Z %s' % package, exit_on_error=False)\n\n    def main(self):\n        self.create_working_dir()\n        self.load_boto()\n        self.load_packages()\n        self.notify('Bootstrap Completed for %s' % boto.config.get_instance('instance-id'))\n\nif __name__ == \"__main__\":\n    # because bootstrap starts before any logging configuration can be loaded from\n    # the boto config files, we will manually enable logging to /var/log/boto.log\n    boto.set_file_logger('bootstrap', '/var/log/boto.log')\n    bs = Bootstrap()\n    bs.main()\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/pyami/config.py",
    "content": "# Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/\n# Copyright (c) 2011 Chris Moyer http://coredumped.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n#\nimport StringIO, os, re\nimport warnings\nimport ConfigParser\nimport boto\n\n# If running in Google App Engine there is no \"user\" and\n# os.path.expanduser() will fail. Attempt to detect this case and use a\n# no-op expanduser function in this case.\ntry:\n  os.path.expanduser('~')\n  expanduser = os.path.expanduser\nexcept (AttributeError, ImportError):\n  # This is probably running on App Engine.\n  expanduser = (lambda x: x)\n\n# By default we use two locations for the boto configurations,\n# /etc/boto.cfg and ~/.boto (which works on Windows and Unix).\nBotoConfigPath = '/etc/boto.cfg'\nBotoConfigLocations = [BotoConfigPath]\nUserConfigPath = os.path.join(expanduser('~'), '.boto')\nBotoConfigLocations.append(UserConfigPath)\n\n# If there's a BOTO_CONFIG variable set, we load ONLY \n# that variable\nif 'BOTO_CONFIG' in os.environ:\n    BotoConfigLocations = [expanduser(os.environ['BOTO_CONFIG'])]\n\n# If there's a BOTO_PATH variable set, we use anything there\n# as the current configuration locations, split with colons\nelif 'BOTO_PATH' in os.environ:\n    BotoConfigLocations = []\n    for path in os.environ['BOTO_PATH'].split(\":\"):\n        BotoConfigLocations.append(expanduser(path))\n\n\nclass Config(ConfigParser.SafeConfigParser):\n\n    def __init__(self, path=None, fp=None, do_load=True):\n        ConfigParser.SafeConfigParser.__init__(self, {'working_dir' : '/mnt/pyami',\n                                                      'debug' : '0'})\n        if do_load:\n            if path:\n                self.load_from_path(path)\n            elif fp:\n                self.readfp(fp)\n            else:\n                self.read(BotoConfigLocations)\n            if \"AWS_CREDENTIAL_FILE\" in os.environ:\n                full_path = expanduser(os.environ['AWS_CREDENTIAL_FILE'])\n                try:\n                    self.load_credential_file(full_path)\n                except IOError:\n                    warnings.warn('Unable to load AWS_CREDENTIAL_FILE (%s)' % full_path)\n\n    def load_credential_file(self, path):\n        \"\"\"Load a credential file as is setup like the Java utilities\"\"\"\n        c_data = StringIO.StringIO()\n        c_data.write(\"[Credentials]\\n\")\n        for line in open(path, \"r\").readlines():\n            c_data.write(line.replace(\"AWSAccessKeyId\", \"aws_access_key_id\").replace(\"AWSSecretKey\", \"aws_secret_access_key\"))\n        c_data.seek(0)\n        self.readfp(c_data)\n\n    def load_from_path(self, path):\n        file = open(path)\n        for line in file.readlines():\n            match = re.match(\"^#import[\\s\\t]*([^\\s^\\t]*)[\\s\\t]*$\", line)\n            if match:\n                extended_file = match.group(1)\n                (dir, file) = os.path.split(path)\n                self.load_from_path(os.path.join(dir, extended_file))\n        self.read(path)\n\n    def save_option(self, path, section, option, value):\n        \"\"\"\n        Write the specified Section.Option to the config file specified by path.\n        Replace any previous value.  If the path doesn't exist, create it.\n        Also add the option the the in-memory config.\n        \"\"\"\n        config = ConfigParser.SafeConfigParser()\n        config.read(path)\n        if not config.has_section(section):\n            config.add_section(section)\n        config.set(section, option, value)\n        fp = open(path, 'w')\n        config.write(fp)\n        fp.close()\n        if not self.has_section(section):\n            self.add_section(section)\n        self.set(section, option, value)\n\n    def save_user_option(self, section, option, value):\n        self.save_option(UserConfigPath, section, option, value)\n\n    def save_system_option(self, section, option, value):\n        self.save_option(BotoConfigPath, section, option, value)\n\n    def get_instance(self, name, default=None):\n        try:\n            val = self.get('Instance', name)\n        except:\n            val = default\n        return val\n\n    def get_user(self, name, default=None):\n        try:\n            val = self.get('User', name)\n        except:\n            val = default\n        return val\n\n    def getint_user(self, name, default=0):\n        try:\n            val = self.getint('User', name)\n        except:\n            val = default\n        return val\n\n    def get_value(self, section, name, default=None):\n        return self.get(section, name, default)\n\n    def get(self, section, name, default=None):\n        try:\n            val = ConfigParser.SafeConfigParser.get(self, section, name)\n        except:\n            val = default\n        return val\n    \n    def getint(self, section, name, default=0):\n        try:\n            val = ConfigParser.SafeConfigParser.getint(self, section, name)\n        except:\n            val = int(default)\n        return val\n    \n    def getfloat(self, section, name, default=0.0):\n        try:\n            val = ConfigParser.SafeConfigParser.getfloat(self, section, name)\n        except:\n            val = float(default)\n        return val\n\n    def getbool(self, section, name, default=False):\n        if self.has_option(section, name):\n            val = self.get(section, name)\n            if val.lower() == 'true':\n                val = True\n            else:\n                val = False\n        else:\n            val = default\n        return val\n    \n    def setbool(self, section, name, value):\n        if value:\n            self.set(section, name, 'true')\n        else:\n            self.set(section, name, 'false')\n    \n    def dump(self):\n        s = StringIO.StringIO()\n        self.write(s)\n        print s.getvalue()\n\n    def dump_safe(self, fp=None):\n        if not fp:\n            fp = StringIO.StringIO()\n        for section in self.sections():\n            fp.write('[%s]\\n' % section)\n            for option in self.options(section):\n                if option == 'aws_secret_access_key':\n                    fp.write('%s = xxxxxxxxxxxxxxxxxx\\n' % option)\n                else:\n                    fp.write('%s = %s\\n' % (option, self.get(section, option)))\n    \n    def dump_to_sdb(self, domain_name, item_name):\n        try:\n            import simplejson as json\n        except ImportError:\n            import json\n\n        sdb = boto.connect_sdb()\n        domain = sdb.lookup(domain_name)\n        if not domain:\n            domain = sdb.create_domain(domain_name)\n        item = domain.new_item(item_name)\n        item.active = False\n        for section in self.sections():\n            d = {}\n            for option in self.options(section):\n                d[option] = self.get(section, option)\n            item[section] = json.dumps(d)\n        item.save()\n\n    def load_from_sdb(self, domain_name, item_name):\n        try:\n            import json\n        except ImportError:\n            import simplejson as json\n\n        sdb = boto.connect_sdb()\n        domain = sdb.lookup(domain_name)\n        item = domain.get_item(item_name)\n        for section in item.keys():\n            if not self.has_section(section):\n                self.add_section(section)\n            d = json.loads(item[section])\n            for attr_name in d.keys():\n                attr_value = d[attr_name]\n                if attr_value == None:\n                    attr_value = 'None'\n                if isinstance(attr_value, bool):\n                    self.setbool(section, attr_name, attr_value)\n                else:\n                    self.set(section, attr_name, attr_value)\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/pyami/copybot.py",
    "content": "# Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n#\nimport boto\nfrom boto.pyami.scriptbase import ScriptBase\nimport os, StringIO\n\nclass CopyBot(ScriptBase):\n\n    def __init__(self):\n        ScriptBase.__init__(self)\n        self.wdir = boto.config.get('Pyami', 'working_dir')\n        self.log_file = '%s.log' % self.instance_id\n        self.log_path = os.path.join(self.wdir, self.log_file)\n        boto.set_file_logger(self.name, self.log_path)\n        self.src_name = boto.config.get(self.name, 'src_bucket')\n        self.dst_name = boto.config.get(self.name, 'dst_bucket')\n        self.replace = boto.config.getbool(self.name, 'replace_dst', True)\n        s3 = boto.connect_s3()\n        self.src = s3.lookup(self.src_name)\n        if not self.src:\n            boto.log.error('Source bucket does not exist: %s' % self.src_name)\n        dest_access_key = boto.config.get(self.name, 'dest_aws_access_key_id', None)\n        if dest_access_key:\n            dest_secret_key = boto.config.get(self.name, 'dest_aws_secret_access_key', None)\n            s3 = boto.connect(dest_access_key, dest_secret_key)\n        self.dst = s3.lookup(self.dst_name)\n        if not self.dst:\n            self.dst = s3.create_bucket(self.dst_name)\n\n    def copy_bucket_acl(self):\n        if boto.config.get(self.name, 'copy_acls', True):\n            acl = self.src.get_xml_acl()\n            self.dst.set_xml_acl(acl)\n\n    def copy_key_acl(self, src, dst):\n        if boto.config.get(self.name, 'copy_acls', True):\n            acl = src.get_xml_acl()\n            dst.set_xml_acl(acl)\n\n    def copy_keys(self):\n        boto.log.info('src=%s' % self.src.name)\n        boto.log.info('dst=%s' % self.dst.name)\n        try:\n            for key in self.src:\n                if not self.replace:\n                    exists = self.dst.lookup(key.name)\n                    if exists:\n                        boto.log.info('key=%s already exists in %s, skipping' % (key.name, self.dst.name))\n                        continue\n                boto.log.info('copying %d bytes from key=%s' % (key.size, key.name))\n                prefix, base = os.path.split(key.name)\n                path = os.path.join(self.wdir, base)\n                key.get_contents_to_filename(path)\n                new_key = self.dst.new_key(key.name)\n                new_key.set_contents_from_filename(path)\n                self.copy_key_acl(key, new_key)\n                os.unlink(path)\n        except:\n            boto.log.exception('Error copying key: %s' % key.name)\n\n    def copy_log(self):\n        key = self.dst.new_key(self.log_file)\n        key.set_contents_from_filename(self.log_path)\n        \n    def main(self):\n        fp = StringIO.StringIO()\n        boto.config.dump_safe(fp)\n        self.notify('%s (%s) Starting' % (self.name, self.instance_id), fp.getvalue())\n        if self.src and self.dst:\n            self.copy_keys()\n        if self.dst:\n            self.copy_log()\n        self.notify('%s (%s) Stopping' % (self.name, self.instance_id),\n                    'Copy Operation Complete')\n        if boto.config.getbool(self.name, 'exit_on_completion', True):\n            ec2 = boto.connect_ec2()\n            ec2.terminate_instances([self.instance_id])\n        \n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/pyami/helloworld.py",
    "content": "# Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n#\nfrom boto.pyami.scriptbase import ScriptBase\n\nclass HelloWorld(ScriptBase):\n\n    def main(self):\n        self.log('Hello World!!!')\n        \n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/pyami/launch_ami.py",
    "content": "#!/usr/bin/env python\n# Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n#\nimport getopt\nimport sys\nimport imp\nimport time\nimport boto\n\nusage_string = \"\"\"\nSYNOPSIS\n    launch_ami.py -a ami_id [-b script_bucket] [-s script_name]\n                  [-m module] [-c class_name] [-r] \n                  [-g group] [-k key_name] [-n num_instances]\n                  [-w] [extra_data]\n    Where:\n        ami_id - the id of the AMI you wish to launch\n        module - The name of the Python module containing the class you\n                 want to run when the instance is started.  If you use this\n                 option the Python module must already be stored on the\n                 instance in a location that is on the Python path.\n        script_file - The name of a local Python module that you would like\n                      to have copied to S3 and then run on the instance\n                      when it is started.  The specified module must be\n                      import'able (i.e. in your local Python path).  It\n                      will then be copied to the specified bucket in S3\n                      (see the -b option).  Once the new instance(s)\n                      start up the script will be copied from S3 and then\n                      run locally on the instance.\n        class_name - The name of the class to be instantiated within the\n                     module or script file specified.\n        script_bucket - the name of the bucket in which the script will be\n                        stored\n        group - the name of the security group the instance will run in\n        key_name - the name of the keypair to use when launching the AMI\n        num_instances - how many instances of the AMI to launch (default 1)\n        input_queue_name - Name of SQS to read input messages from\n        output_queue_name - Name of SQS to write output messages to\n        extra_data - additional name-value pairs that will be passed as\n                     userdata to the newly launched instance.  These should\n                     be of the form \"name=value\"\n        The -r option reloads the Python module to S3 without launching\n        another instance.  This can be useful during debugging to allow\n        you to test a new version of your script without shutting down\n        your instance and starting up another one.\n        The -w option tells the script to run synchronously, meaning to\n        wait until the instance is actually up and running.  It then prints\n        the IP address and internal and external DNS names before exiting.\n\"\"\"\n\ndef usage():\n    print usage_string\n    sys.exit()\n\ndef main():\n    try:\n        opts, args = getopt.getopt(sys.argv[1:], 'a:b:c:g:hi:k:m:n:o:rs:w',\n                                   ['ami', 'bucket', 'class', 'group', 'help',\n                                    'inputqueue', 'keypair', 'module',\n                                    'numinstances', 'outputqueue',\n                                    'reload', 'script_name', 'wait'])\n    except:\n        usage()\n    params = {'module_name' : None,\n              'script_name' : None,\n              'class_name' : None,\n              'script_bucket' : None,\n              'group' : 'default',\n              'keypair' : None,\n              'ami' : None,\n              'num_instances' : 1,\n              'input_queue_name' : None,\n              'output_queue_name' : None}\n    reload = None\n    wait = None\n    for o, a in opts:\n        if o in ('-a', '--ami'):\n            params['ami'] = a\n        if o in ('-b', '--bucket'):\n            params['script_bucket'] = a\n        if o in ('-c', '--class'):\n            params['class_name'] = a\n        if o in ('-g', '--group'):\n            params['group'] = a\n        if o in ('-h', '--help'):\n            usage()\n        if o in ('-i', '--inputqueue'):\n            params['input_queue_name'] = a\n        if o in ('-k', '--keypair'):\n            params['keypair'] = a\n        if o in ('-m', '--module'):\n            params['module_name'] = a\n        if o in ('-n', '--num_instances'):\n            params['num_instances'] = int(a)\n        if o in ('-o', '--outputqueue'):\n            params['output_queue_name'] = a\n        if o in ('-r', '--reload'):\n            reload = True\n        if o in ('-s', '--script'):\n            params['script_name'] = a\n        if o in ('-w', '--wait'):\n            wait = True\n\n    # check required fields\n    required = ['ami']\n    for pname in required:\n        if not params.get(pname, None):\n            print '%s is required' % pname\n            usage()\n    if params['script_name']:\n        # first copy the desired module file to S3 bucket\n        if reload:\n            print 'Reloading module %s to S3' % params['script_name']\n        else:\n            print 'Copying module %s to S3' % params['script_name']\n        l = imp.find_module(params['script_name'])\n        c = boto.connect_s3()\n        bucket = c.get_bucket(params['script_bucket'])\n        key = bucket.new_key(params['script_name']+'.py')\n        key.set_contents_from_file(l[0])\n        params['script_md5'] = key.md5\n    # we have everything we need, now build userdata string\n    l = []\n    for k, v in params.items():\n        if v:\n            l.append('%s=%s' % (k, v))\n    c = boto.connect_ec2()\n    l.append('aws_access_key_id=%s' % c.aws_access_key_id)\n    l.append('aws_secret_access_key=%s' % c.aws_secret_access_key)\n    for kv in args:\n        l.append(kv)\n    s = '|'.join(l)\n    if not reload:\n        rs = c.get_all_images([params['ami']])\n        img = rs[0]\n        r = img.run(user_data=s, key_name=params['keypair'],\n                    security_groups=[params['group']],\n                    max_count=params.get('num_instances', 1))\n        print 'AMI: %s - %s (Started)' % (params['ami'], img.location)\n        print 'Reservation %s contains the following instances:' % r.id\n        for i in r.instances:\n            print '\\t%s' % i.id\n        if wait:\n            running = False\n            while not running:\n                time.sleep(30)\n                [i.update() for i in r.instances]\n                status = [i.state for i in r.instances]\n                print status\n                if status.count('running') == len(r.instances):\n                    running = True\n            for i in r.instances:\n                print 'Instance: %s' % i.ami_launch_index\n                print 'Public DNS Name: %s' % i.public_dns_name\n                print 'Private DNS Name: %s' % i.private_dns_name\n\nif __name__ == \"__main__\":\n    main()\n\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/pyami/scriptbase.py",
    "content": "import os\nimport sys\nfrom boto.utils import ShellCommand, get_ts\nimport boto\nimport boto.utils\n\nclass ScriptBase:\n\n    def __init__(self, config_file=None):\n        self.instance_id = boto.config.get('Instance', 'instance-id', 'default')\n        self.name = self.__class__.__name__\n        self.ts = get_ts()\n        if config_file:\n            boto.config.read(config_file)\n\n    def notify(self, subject, body=''):\n        boto.utils.notify(subject, body)\n\n    def mkdir(self, path):\n        if not os.path.isdir(path):\n            try:\n                os.mkdir(path)\n            except:\n                boto.log.error('Error creating directory: %s' % path)\n\n    def umount(self, path):\n        if os.path.ismount(path):\n            self.run('umount %s' % path)\n\n    def run(self, command, notify=True, exit_on_error=False, cwd=None):\n        self.last_command = ShellCommand(command, cwd=cwd)\n        if self.last_command.status != 0:\n            boto.log.error('Error running command: \"%s\". Output: \"%s\"' % (command, self.last_command.output))\n            if notify:\n                self.notify('Error encountered', \\\n                        'Error running the following command:\\n\\t%s\\n\\nCommand output:\\n\\t%s' % \\\n                        (command, self.last_command.output))\n            if exit_on_error:\n                sys.exit(-1)\n        return self.last_command.status\n\n    def main(self):\n        pass\n        \n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/pyami/startup.py",
    "content": "# Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n#\nimport sys\nimport boto\nfrom boto.utils import find_class\nfrom boto import config\nfrom boto.pyami.scriptbase import ScriptBase\n\n\nclass Startup(ScriptBase):\n\n    def run_scripts(self):\n        scripts = config.get('Pyami', 'scripts')\n        if scripts:\n            for script in scripts.split(','):\n                script = script.strip(\" \")\n                try:\n                    pos = script.rfind('.')\n                    if pos > 0:\n                        mod_name = script[0:pos]\n                        cls_name = script[pos+1:]\n                        cls = find_class(mod_name, cls_name)\n                        boto.log.info('Running Script: %s' % script)\n                        s = cls()\n                        s.main()\n                    else:\n                        boto.log.warning('Trouble parsing script: %s' % script)\n                except Exception, e:\n                    boto.log.exception('Problem Running Script: %s. Startup process halting.' % script)\n                    raise e\n\n    def main(self):\n        self.run_scripts()\n        self.notify('Startup Completed for %s' % config.get('Instance', 'instance-id'))\n\nif __name__ == \"__main__\":\n    if not config.has_section('loggers'):\n        boto.set_file_logger('startup', '/var/log/boto.log')\n    sys.path.append(config.get('Pyami', 'working_dir'))\n    su = Startup()\n    su.main()\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/rds/__init__.py",
    "content": "# Copyright (c) 2009 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n#\n\nimport boto.utils\nimport urllib\nfrom boto.connection import AWSQueryConnection\nfrom boto.rds.dbinstance import DBInstance\nfrom boto.rds.dbsecuritygroup import DBSecurityGroup\nfrom boto.rds.parametergroup import ParameterGroup\nfrom boto.rds.dbsnapshot import DBSnapshot\nfrom boto.rds.event import Event\nfrom boto.rds.regioninfo import RDSRegionInfo\n\ndef regions():\n    \"\"\"\n    Get all available regions for the RDS service.\n\n    :rtype: list\n    :return: A list of :class:`boto.rds.regioninfo.RDSRegionInfo`\n    \"\"\"\n    return [RDSRegionInfo(name='us-east-1',\n                          endpoint='rds.us-east-1.amazonaws.com'),\n            RDSRegionInfo(name='eu-west-1',\n                          endpoint='rds.eu-west-1.amazonaws.com'),\n            RDSRegionInfo(name='us-west-1',\n                          endpoint='rds.us-west-1.amazonaws.com'),\n            RDSRegionInfo(name='ap-northeast-1',\n                          endpoint='rds.ap-northeast-1.amazonaws.com'),\n            RDSRegionInfo(name='ap-southeast-1',\n                          endpoint='rds.ap-southeast-1.amazonaws.com')\n            ]\n\ndef connect_to_region(region_name, **kw_params):\n    \"\"\"\n    Given a valid region name, return a \n    :class:`boto.ec2.connection.EC2Connection`.\n    Any additional parameters after the region_name are passed on to\n    the connect method of the region object.\n\n    :type: str\n    :param region_name: The name of the region to connect to.\n\n    :rtype: :class:`boto.ec2.connection.EC2Connection` or ``None``\n    :return: A connection to the given region, or None if an invalid region\n             name is given\n    \"\"\"\n    for region in regions():\n        if region.name == region_name:\n            return region.connect(**kw_params)\n    return None\n\n#boto.set_stream_logger('rds')\n\nclass RDSConnection(AWSQueryConnection):\n\n    DefaultRegionName = 'us-east-1'\n    DefaultRegionEndpoint = 'rds.amazonaws.com'\n    APIVersion = '2011-04-01'\n\n    def __init__(self, aws_access_key_id=None, aws_secret_access_key=None,\n                 is_secure=True, port=None, proxy=None, proxy_port=None,\n                 proxy_user=None, proxy_pass=None, debug=0,\n                 https_connection_factory=None, region=None, path='/'):\n        if not region:\n            region = RDSRegionInfo(self, self.DefaultRegionName,\n                                   self.DefaultRegionEndpoint)\n        self.region = region\n        AWSQueryConnection.__init__(self, aws_access_key_id,\n                                    aws_secret_access_key,\n                                    is_secure, port, proxy, proxy_port,\n                                    proxy_user, proxy_pass,\n                                    self.region.endpoint, debug,\n                                    https_connection_factory, path)\n\n    def _required_auth_capability(self):\n        return ['rds']\n\n    # DB Instance methods\n\n    def get_all_dbinstances(self, instance_id=None, max_records=None,\n                            marker=None):\n        \"\"\"\n        Retrieve all the DBInstances in your account.\n\n        :type instance_id: str\n        :param instance_id: DB Instance identifier.  If supplied, only\n                            information this instance will be returned.\n                            Otherwise, info about all DB Instances will\n                            be returned.\n\n        :type max_records: int\n        :param max_records: The maximum number of records to be returned.\n                            If more results are available, a MoreToken will\n                            be returned in the response that can be used to\n                            retrieve additional records.  Default is 100.\n\n        :type marker: str\n        :param marker: The marker provided by a previous request.\n\n        :rtype: list\n        :return: A list of :class:`boto.rds.dbinstance.DBInstance`\n        \"\"\"\n        params = {}\n        if instance_id:\n            params['DBInstanceIdentifier'] = instance_id\n        if max_records:\n            params['MaxRecords'] = max_records\n        if marker:\n            params['Marker'] = marker\n        return self.get_list('DescribeDBInstances', params,\n                             [('DBInstance', DBInstance)])\n\n    def create_dbinstance(self, id, allocated_storage, instance_class,\n                          master_username, master_password, port=3306,\n                          engine='MySQL5.1', db_name=None, param_group=None,\n                          security_groups=None, availability_zone=None,\n                          preferred_maintenance_window=None,\n                          backup_retention_period=None,\n                          preferred_backup_window=None,\n                          multi_az=False,\n                          engine_version=None,\n                          auto_minor_version_upgrade=True):\n        \"\"\"\n        Create a new DBInstance.\n\n        :type id: str\n        :param id: Unique identifier for the new instance.\n                   Must contain 1-63 alphanumeric characters.\n                   First character must be a letter.\n                   May not end with a hyphen or contain two consecutive hyphens\n\n        :type allocated_storage: int\n        :param allocated_storage: Initially allocated storage size, in GBs.\n                                  Valid values are [5-1024]\n\n        :type instance_class: str\n        :param instance_class: The compute and memory capacity of\n                               the DBInstance. Valid values are:\n\n                               * db.m1.small\n                               * db.m1.large\n                               * db.m1.xlarge\n                               * db.m2.xlarge\n                               * db.m2.2xlarge\n                               * db.m2.4xlarge\n\n        :type engine: str\n        :param engine: Name of database engine. Must be MySQL5.1 for now.\n\n        :type master_username: str\n        :param master_username: Name of master user for the DBInstance.\n                                Must be 1-15 alphanumeric characters, first\n                                must be a letter.\n\n        :type master_password: str\n        :param master_password: Password of master user for the DBInstance.\n                                Must be 4-16 alphanumeric characters.\n\n        :type port: int\n        :param port: Port number on which database accepts connections.\n                     Valid values [1115-65535].  Defaults to 3306.\n\n        :type db_name: str\n        :param db_name: Name of a database to create when the DBInstance\n                        is created.  Default is to create no databases.\n\n        :type param_group: str\n        :param param_group: Name of DBParameterGroup to associate with\n                            this DBInstance.  If no groups are specified\n                            no parameter groups will be used.\n\n        :type security_groups: list of str or list of DBSecurityGroup objects\n        :param security_groups: List of names of DBSecurityGroup to authorize on\n                                this DBInstance.\n\n        :type availability_zone: str\n        :param availability_zone: Name of the availability zone to place\n                                  DBInstance into.\n\n        :type preferred_maintenance_window: str\n        :param preferred_maintenance_window: The weekly time range (in UTC)\n                                             during which maintenance can occur.\n                                             Default is Sun:05:00-Sun:09:00\n\n        :type backup_retention_period: int\n        :param backup_retention_period: The number of days for which automated\n                                        backups are retained.  Setting this to\n                                        zero disables automated backups.\n\n        :type preferred_backup_window: str\n        :param preferred_backup_window: The daily time range during which\n                                        automated backups are created (if\n                                        enabled).  Must be in h24:mi-hh24:mi\n                                        format (UTC).\n\n        :type multi_az: bool\n        :param multi_az: If True, specifies the DB Instance will be\n                         deployed in multiple availability zones.\n\n        :type engine_version: str\n        :param engine_version: Version number of the database engine to use.\n\n        :type auto_minor_version_upgrade: bool\n        :param auto_minor_version_upgrade: Indicates that minor engine\n                                           upgrades will be applied\n                                           automatically to the Read Replica\n                                           during the maintenance window.\n                                           Default is True.\n\n        :rtype: :class:`boto.rds.dbinstance.DBInstance`\n        :return: The new db instance.\n        \"\"\"\n        params = {'DBInstanceIdentifier' : id,\n                  'AllocatedStorage' : allocated_storage,\n                  'DBInstanceClass' : instance_class,\n                  'Engine' : engine,\n                  'MasterUsername' : master_username,\n                  'MasterUserPassword' : master_password}\n        if port:\n            params['Port'] = port\n        if db_name:\n            params['DBName'] = db_name\n        if param_group:\n            params['DBParameterGroupName'] = param_group\n        if security_groups:\n            l = []\n            for group in security_groups:\n                if isinstance(group, DBSecurityGroup):\n                    l.append(group.name)\n                else:\n                    l.append(group)\n            self.build_list_params(params, l, 'DBSecurityGroups.member')\n        if availability_zone:\n            params['AvailabilityZone'] = availability_zone\n        if preferred_maintenance_window:\n            params['PreferredMaintenanceWindow'] = preferred_maintenance_window\n        if backup_retention_period is not None:\n            params['BackupRetentionPeriod'] = backup_retention_period\n        if preferred_backup_window:\n            params['PreferredBackupWindow'] = preferred_backup_window\n        if multi_az:\n            params['MultiAZ'] = 'true'\n        if engine_version:\n            params['EngineVersion'] = engine_version\n        if auto_minor_version_upgrade is False:\n            params['AutoMinorVersionUpgrade'] = 'false'\n\n        return self.get_object('CreateDBInstance', params, DBInstance)\n\n    def create_dbinstance_read_replica(self, id, source_id,\n                                       instance_class=None,\n                                       port=3306,\n                                       availability_zone=None,\n                                       auto_minor_version_upgrade=None):\n        \"\"\"\n        Create a new DBInstance Read Replica.\n\n        :type id: str\n        :param id: Unique identifier for the new instance.\n                   Must contain 1-63 alphanumeric characters.\n                   First character must be a letter.\n                   May not end with a hyphen or contain two consecutive hyphens\n\n        :type source_id: str\n        :param source_id: Unique identifier for the DB Instance for which this\n                          DB Instance will act as a Read Replica.\n\n        :type instance_class: str\n        :param instance_class: The compute and memory capacity of the\n                               DBInstance.  Default is to inherit from\n                               the source DB Instance.\n\n                               Valid values are:\n\n                               * db.m1.small\n                               * db.m1.large\n                               * db.m1.xlarge\n                               * db.m2.xlarge\n                               * db.m2.2xlarge\n                               * db.m2.4xlarge\n\n        :type port: int\n        :param port: Port number on which database accepts connections.\n                     Default is to inherit from source DB Instance.\n                     Valid values [1115-65535].  Defaults to 3306.\n\n        :type availability_zone: str\n        :param availability_zone: Name of the availability zone to place\n                                  DBInstance into.\n\n        :type auto_minor_version_upgrade: bool\n        :param auto_minor_version_upgrade: Indicates that minor engine\n                                           upgrades will be applied\n                                           automatically to the Read Replica\n                                           during the maintenance window.\n                                           Default is to inherit this value\n                                           from the source DB Instance.\n\n        :rtype: :class:`boto.rds.dbinstance.DBInstance`\n        :return: The new db instance.\n        \"\"\"\n        params = {'DBInstanceIdentifier' : id,\n                  'SourceDBInstanceIdentifier' : source_id}\n        if instance_class:\n            params['DBInstanceClass'] = instance_class\n        if port:\n            params['Port'] = port\n        if availability_zone:\n            params['AvailabilityZone'] = availability_zone\n        if auto_minor_version_upgrade is not None:\n            if auto_minor_version_upgrade is True:\n                params['AutoMinorVersionUpgrade'] = 'true'\n            else:\n                params['AutoMinorVersionUpgrade'] = 'false'\n\n        return self.get_object('CreateDBInstanceReadReplica',\n                               params, DBInstance)\n\n    def modify_dbinstance(self, id, param_group=None, security_groups=None,\n                          preferred_maintenance_window=None,\n                          master_password=None, allocated_storage=None,\n                          instance_class=None,\n                          backup_retention_period=None,\n                          preferred_backup_window=None,\n                          multi_az=False,\n                          apply_immediately=False):\n        \"\"\"\n        Modify an existing DBInstance.\n\n        :type id: str\n        :param id: Unique identifier for the new instance.\n\n        :type security_groups: list of str or list of DBSecurityGroup objects\n        :param security_groups: List of names of DBSecurityGroup to authorize on\n                                this DBInstance.\n\n        :type preferred_maintenance_window: str\n        :param preferred_maintenance_window: The weekly time range (in UTC)\n                                             during which maintenance can\n                                             occur.\n                                             Default is Sun:05:00-Sun:09:00\n\n        :type master_password: str\n        :param master_password: Password of master user for the DBInstance.\n                                Must be 4-15 alphanumeric characters.\n\n        :type allocated_storage: int\n        :param allocated_storage: The new allocated storage size, in GBs.\n                                  Valid values are [5-1024]\n\n        :type instance_class: str\n        :param instance_class: The compute and memory capacity of the\n                               DBInstance.  Changes will be applied at\n                               next maintenance window unless\n                               apply_immediately is True.\n\n                               Valid values are:\n\n                               * db.m1.small\n                               * db.m1.large\n                               * db.m1.xlarge\n                               * db.m2.xlarge\n                               * db.m2.2xlarge\n                               * db.m2.4xlarge\n\n        :type apply_immediately: bool\n        :param apply_immediately: If true, the modifications will be applied\n                                  as soon as possible rather than waiting for\n                                  the next preferred maintenance window.\n\n        :type backup_retention_period: int\n        :param backup_retention_period: The number of days for which automated\n                                        backups are retained.  Setting this to\n                                        zero disables automated backups.\n\n        :type preferred_backup_window: str\n        :param preferred_backup_window: The daily time range during which\n                                        automated backups are created (if\n                                        enabled).  Must be in h24:mi-hh24:mi\n                                        format (UTC).\n\n        :type multi_az: bool\n        :param multi_az: If True, specifies the DB Instance will be\n                         deployed in multiple availability zones.\n\n        :rtype: :class:`boto.rds.dbinstance.DBInstance`\n        :return: The modified db instance.\n        \"\"\"\n        params = {'DBInstanceIdentifier' : id}\n        if param_group:\n            params['DBParameterGroupName'] = param_group\n        if security_groups:\n            l = []\n            for group in security_groups:\n                if isinstance(group, DBSecurityGroup):\n                    l.append(group.name)\n                else:\n                    l.append(group)\n            self.build_list_params(params, l, 'DBSecurityGroups.member')\n        if preferred_maintenance_window:\n            params['PreferredMaintenanceWindow'] = preferred_maintenance_window\n        if master_password:\n            params['MasterUserPassword'] = master_password\n        if allocated_storage:\n            params['AllocatedStorage'] = allocated_storage\n        if instance_class:\n            params['DBInstanceClass'] = instance_class\n        if backup_retention_period is not None:\n            params['BackupRetentionPeriod'] = backup_retention_period\n        if preferred_backup_window:\n            params['PreferredBackupWindow'] = preferred_backup_window\n        if multi_az:\n            params['MultiAZ'] = 'true'\n        if apply_immediately:\n            params['ApplyImmediately'] = 'true'\n\n        return self.get_object('ModifyDBInstance', params, DBInstance)\n\n    def delete_dbinstance(self, id, skip_final_snapshot=False,\n                          final_snapshot_id=''):\n        \"\"\"\n        Delete an existing DBInstance.\n\n        :type id: str\n        :param id: Unique identifier for the new instance.\n\n        :type skip_final_snapshot: bool\n        :param skip_final_snapshot: This parameter determines whether a final\n                                    db snapshot is created before the instance\n                                    is deleted.  If True, no snapshot\n                                    is created.  If False, a snapshot\n                                    is created before deleting the instance.\n\n        :type final_snapshot_id: str\n        :param final_snapshot_id: If a final snapshot is requested, this\n                                  is the identifier used for that snapshot.\n\n        :rtype: :class:`boto.rds.dbinstance.DBInstance`\n        :return: The deleted db instance.\n        \"\"\"\n        params = {'DBInstanceIdentifier' : id}\n        if skip_final_snapshot:\n            params['SkipFinalSnapshot'] = 'true'\n        else:\n            params['SkipFinalSnapshot'] = 'false'\n            params['FinalDBSnapshotIdentifier'] = final_snapshot_id\n        return self.get_object('DeleteDBInstance', params, DBInstance)\n\n\n    def reboot_dbinstance(self, id):\n        \"\"\"\n        Reboot DBInstance.\n\n        :type id: str\n        :param id: Unique identifier of the instance.\n\n        :rtype: :class:`boto.rds.dbinstance.DBInstance`\n        :return: The rebooting db instance.\n        \"\"\"\n        params = {'DBInstanceIdentifier' : id}\n        return self.get_object('RebootDBInstance', params, DBInstance)\n\n    # DBParameterGroup methods\n\n    def get_all_dbparameter_groups(self, groupname=None, max_records=None,\n                                  marker=None):\n        \"\"\"\n        Get all parameter groups associated with your account in a region.\n\n        :type groupname: str\n        :param groupname: The name of the DBParameter group to retrieve.\n                          If not provided, all DBParameter groups will be returned.\n\n        :type max_records: int\n        :param max_records: The maximum number of records to be returned.\n                            If more results are available, a MoreToken will\n                            be returned in the response that can be used to\n                            retrieve additional records.  Default is 100.\n\n        :type marker: str\n        :param marker: The marker provided by a previous request.\n\n        :rtype: list\n        :return: A list of :class:`boto.ec2.parametergroup.ParameterGroup`\n        \"\"\"\n        params = {}\n        if groupname:\n            params['DBParameterGroupName'] = groupname\n        if max_records:\n            params['MaxRecords'] = max_records\n        if marker:\n            params['Marker'] = marker\n        return self.get_list('DescribeDBParameterGroups', params,\n                             [('DBParameterGroup', ParameterGroup)])\n\n    def get_all_dbparameters(self, groupname, source=None,\n                             max_records=None, marker=None):\n        \"\"\"\n        Get all parameters associated with a ParameterGroup\n\n        :type groupname: str\n        :param groupname: The name of the DBParameter group to retrieve.\n\n        :type source: str\n        :param source: Specifies which parameters to return.\n                       If not specified, all parameters will be returned.\n                       Valid values are: user|system|engine-default\n\n        :type max_records: int\n        :param max_records: The maximum number of records to be returned.\n                            If more results are available, a MoreToken will\n                            be returned in the response that can be used to\n                            retrieve additional records.  Default is 100.\n\n        :type marker: str\n        :param marker: The marker provided by a previous request.\n\n        :rtype: :class:`boto.ec2.parametergroup.ParameterGroup`\n        :return: The ParameterGroup\n        \"\"\"\n        params = {'DBParameterGroupName' : groupname}\n        if source:\n            params['Source'] = source\n        if max_records:\n            params['MaxRecords'] = max_records\n        if marker:\n            params['Marker'] = marker\n        pg = self.get_object('DescribeDBParameters', params, ParameterGroup)\n        pg.name = groupname\n        return pg\n\n    def create_parameter_group(self, name, engine='MySQL5.1', description=''):\n        \"\"\"\n        Create a new dbparameter group for your account.\n\n        :type name: string\n        :param name: The name of the new dbparameter group\n\n        :type engine: str\n        :param engine: Name of database engine.  Must be MySQL5.1 for now.\n\n        :type description: string\n        :param description: The description of the new security group\n\n        :rtype: :class:`boto.rds.dbsecuritygroup.DBSecurityGroup`\n        :return: The newly created DBSecurityGroup\n        \"\"\"\n        params = {'DBParameterGroupName': name,\n                  'Engine': engine,\n                  'Description' : description}\n        return self.get_object('CreateDBParameterGroup', params, ParameterGroup)\n\n    def modify_parameter_group(self, name, parameters=None):\n        \"\"\"\n        Modify a parameter group for your account.\n\n        :type name: string\n        :param name: The name of the new parameter group\n\n        :type parameters: list of :class:`boto.rds.parametergroup.Parameter`\n        :param parameters: The new parameters\n\n        :rtype: :class:`boto.rds.parametergroup.ParameterGroup`\n        :return: The newly created ParameterGroup\n        \"\"\"\n        params = {'DBParameterGroupName': name}\n        for i in range(0, len(parameters)):\n            parameter = parameters[i]\n            parameter.merge(params, i+1)\n        return self.get_list('ModifyDBParameterGroup', params,\n                             ParameterGroup, verb='POST')\n\n    def reset_parameter_group(self, name, reset_all_params=False,\n                              parameters=None):\n        \"\"\"\n        Resets some or all of the parameters of a ParameterGroup to the\n        default value\n\n        :type key_name: string\n        :param key_name: The name of the ParameterGroup to reset\n\n        :type parameters: list of :class:`boto.rds.parametergroup.Parameter`\n        :param parameters: The parameters to reset.  If not supplied,\n                           all parameters will be reset.\n        \"\"\"\n        params = {'DBParameterGroupName':name}\n        if reset_all_params:\n            params['ResetAllParameters'] = 'true'\n        else:\n            params['ResetAllParameters'] = 'false'\n            for i in range(0, len(parameters)):\n                parameter = parameters[i]\n                parameter.merge(params, i+1)\n        return self.get_status('ResetDBParameterGroup', params)\n\n    def delete_parameter_group(self, name):\n        \"\"\"\n        Delete a DBSecurityGroup from your account.\n\n        :type key_name: string\n        :param key_name: The name of the DBSecurityGroup to delete\n        \"\"\"\n        params = {'DBParameterGroupName':name}\n        return self.get_status('DeleteDBParameterGroup', params)\n\n    # DBSecurityGroup methods\n\n    def get_all_dbsecurity_groups(self, groupname=None, max_records=None,\n                                  marker=None):\n        \"\"\"\n        Get all security groups associated with your account in a region.\n\n        :type groupnames: list\n        :param groupnames: A list of the names of security groups to retrieve.\n                           If not provided, all security groups will\n                           be returned.\n\n        :type max_records: int\n        :param max_records: The maximum number of records to be returned.\n                            If more results are available, a MoreToken will\n                            be returned in the response that can be used to\n                            retrieve additional records.  Default is 100.\n\n        :type marker: str\n        :param marker: The marker provided by a previous request.\n\n        :rtype: list\n        :return: A list of :class:`boto.rds.dbsecuritygroup.DBSecurityGroup`\n        \"\"\"\n        params = {}\n        if groupname:\n            params['DBSecurityGroupName'] = groupname\n        if max_records:\n            params['MaxRecords'] = max_records\n        if marker:\n            params['Marker'] = marker\n        return self.get_list('DescribeDBSecurityGroups', params,\n                             [('DBSecurityGroup', DBSecurityGroup)])\n\n    def create_dbsecurity_group(self, name, description=None):\n        \"\"\"\n        Create a new security group for your account.\n        This will create the security group within the region you\n        are currently connected to.\n\n        :type name: string\n        :param name: The name of the new security group\n\n        :type description: string\n        :param description: The description of the new security group\n\n        :rtype: :class:`boto.rds.dbsecuritygroup.DBSecurityGroup`\n        :return: The newly created DBSecurityGroup\n        \"\"\"\n        params = {'DBSecurityGroupName':name}\n        if description:\n            params['DBSecurityGroupDescription'] = description\n        group = self.get_object('CreateDBSecurityGroup', params,\n                                DBSecurityGroup)\n        group.name = name\n        group.description = description\n        return group\n\n    def delete_dbsecurity_group(self, name):\n        \"\"\"\n        Delete a DBSecurityGroup from your account.\n\n        :type key_name: string\n        :param key_name: The name of the DBSecurityGroup to delete\n        \"\"\"\n        params = {'DBSecurityGroupName':name}\n        return self.get_status('DeleteDBSecurityGroup', params)\n\n    def authorize_dbsecurity_group(self, group_name, cidr_ip=None,\n                                   ec2_security_group_name=None,\n                                   ec2_security_group_owner_id=None):\n        \"\"\"\n        Add a new rule to an existing security group.\n        You need to pass in either src_security_group_name and\n        src_security_group_owner_id OR a CIDR block but not both.\n\n        :type group_name: string\n        :param group_name: The name of the security group you are adding\n                           the rule to.\n\n        :type ec2_security_group_name: string\n        :param ec2_security_group_name: The name of the EC2 security group\n                                        you are granting access to.\n\n        :type ec2_security_group_owner_id: string\n        :param ec2_security_group_owner_id: The ID of the owner of the EC2\n                                            security group you are granting\n                                            access to.\n\n        :type cidr_ip: string\n        :param cidr_ip: The CIDR block you are providing access to.\n                        See http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing\n\n        :rtype: bool\n        :return: True if successful.\n        \"\"\"\n        params = {'DBSecurityGroupName':group_name}\n        if ec2_security_group_name:\n            params['EC2SecurityGroupName'] = ec2_security_group_name\n        if ec2_security_group_owner_id:\n            params['EC2SecurityGroupOwnerId'] = ec2_security_group_owner_id\n        if cidr_ip:\n            params['CIDRIP'] = urllib.quote(cidr_ip)\n        return self.get_object('AuthorizeDBSecurityGroupIngress', params,\n                               DBSecurityGroup)\n\n    def revoke_dbsecurity_group(self, group_name, ec2_security_group_name=None,\n                                ec2_security_group_owner_id=None, cidr_ip=None):\n        \"\"\"\n        Remove an existing rule from an existing security group.\n        You need to pass in either ec2_security_group_name and\n        ec2_security_group_owner_id OR a CIDR block.\n\n        :type group_name: string\n        :param group_name: The name of the security group you are removing\n                           the rule from.\n\n        :type ec2_security_group_name: string\n        :param ec2_security_group_name: The name of the EC2 security group\n                                        from which you are removing access.\n\n        :type ec2_security_group_owner_id: string\n        :param ec2_security_group_owner_id: The ID of the owner of the EC2\n                                            security from which you are\n                                            removing access.\n\n        :type cidr_ip: string\n        :param cidr_ip: The CIDR block from which you are removing access.\n                        See http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing\n\n        :rtype: bool\n        :return: True if successful.\n        \"\"\"\n        params = {'DBSecurityGroupName':group_name}\n        if ec2_security_group_name:\n            params['EC2SecurityGroupName'] = ec2_security_group_name\n        if ec2_security_group_owner_id:\n            params['EC2SecurityGroupOwnerId'] = ec2_security_group_owner_id\n        if cidr_ip:\n            params['CIDRIP'] = cidr_ip\n        return self.get_object('RevokeDBSecurityGroupIngress', params,\n                               DBSecurityGroup)\n\n    # For backwards compatibility.  This method was improperly named\n    # in previous versions.  I have renamed it to match the others.\n    revoke_security_group = revoke_dbsecurity_group\n\n    # DBSnapshot methods\n\n    def get_all_dbsnapshots(self, snapshot_id=None, instance_id=None,\n                            max_records=None, marker=None):\n        \"\"\"\n        Get information about DB Snapshots.\n\n        :type snapshot_id: str\n        :param snapshot_id: The unique identifier of an RDS snapshot.\n                            If not provided, all RDS snapshots will be returned.\n\n        :type instance_id: str\n        :param instance_id: The identifier of a DBInstance.  If provided,\n                            only the DBSnapshots related to that instance will\n                            be returned.\n                            If not provided, all RDS snapshots will be returned.\n\n        :type max_records: int\n        :param max_records: The maximum number of records to be returned.\n                            If more results are available, a MoreToken will\n                            be returned in the response that can be used to\n                            retrieve additional records.  Default is 100.\n\n        :type marker: str\n        :param marker: The marker provided by a previous request.\n\n        :rtype: list\n        :return: A list of :class:`boto.rds.dbsnapshot.DBSnapshot`\n        \"\"\"\n        params = {}\n        if snapshot_id:\n            params['DBSnapshotIdentifier'] = snapshot_id\n        if instance_id:\n            params['DBInstanceIdentifier'] = instance_id\n        if max_records:\n            params['MaxRecords'] = max_records\n        if marker:\n            params['Marker'] = marker\n        return self.get_list('DescribeDBSnapshots', params,\n                             [('DBSnapshot', DBSnapshot)])\n\n    def create_dbsnapshot(self, snapshot_id, dbinstance_id):\n        \"\"\"\n        Create a new DB snapshot.\n\n        :type snapshot_id: string\n        :param snapshot_id: The identifier for the DBSnapshot\n\n        :type dbinstance_id: string\n        :param dbinstance_id: The source identifier for the RDS instance from\n                              which the snapshot is created.\n\n        :rtype: :class:`boto.rds.dbsnapshot.DBSnapshot`\n        :return: The newly created DBSnapshot\n        \"\"\"\n        params = {'DBSnapshotIdentifier' : snapshot_id,\n                  'DBInstanceIdentifier' : dbinstance_id}\n        return self.get_object('CreateDBSnapshot', params, DBSnapshot)\n\n    def delete_dbsnapshot(self, identifier):\n        \"\"\"\n        Delete a DBSnapshot\n\n        :type identifier: string\n        :param identifier: The identifier of the DBSnapshot to delete\n        \"\"\"\n        params = {'DBSnapshotIdentifier' : identifier}\n        return self.get_object('DeleteDBSnapshot', params, DBSnapshot)\n\n    def restore_dbinstance_from_dbsnapshot(self, identifier, instance_id,\n                                           instance_class, port=None,\n                                           availability_zone=None):\n\n        \"\"\"\n        Create a new DBInstance from a DB snapshot.\n\n        :type identifier: string\n        :param identifier: The identifier for the DBSnapshot\n\n        :type instance_id: string\n        :param instance_id: The source identifier for the RDS instance from\n                              which the snapshot is created.\n\n        :type instance_class: str\n        :param instance_class: The compute and memory capacity of the\n                               DBInstance.  Valid values are:\n                               db.m1.small | db.m1.large | db.m1.xlarge |\n                               db.m2.2xlarge | db.m2.4xlarge\n\n        :type port: int\n        :param port: Port number on which database accepts connections.\n                     Valid values [1115-65535].  Defaults to 3306.\n\n        :type availability_zone: str\n        :param availability_zone: Name of the availability zone to place\n                                  DBInstance into.\n\n        :rtype: :class:`boto.rds.dbinstance.DBInstance`\n        :return: The newly created DBInstance\n        \"\"\"\n        params = {'DBSnapshotIdentifier' : identifier,\n                  'DBInstanceIdentifier' : instance_id,\n                  'DBInstanceClass' : instance_class}\n        if port:\n            params['Port'] = port\n        if availability_zone:\n            params['AvailabilityZone'] = availability_zone\n        return self.get_object('RestoreDBInstanceFromDBSnapshot',\n                               params, DBInstance)\n\n    def restore_dbinstance_from_point_in_time(self, source_instance_id,\n                                              target_instance_id,\n                                              use_latest=False,\n                                              restore_time=None,\n                                              dbinstance_class=None,\n                                              port=None,\n                                              availability_zone=None):\n\n        \"\"\"\n        Create a new DBInstance from a point in time.\n\n        :type source_instance_id: string\n        :param source_instance_id: The identifier for the source DBInstance.\n\n        :type target_instance_id: string\n        :param target_instance_id: The identifier of the new DBInstance.\n\n        :type use_latest: bool\n        :param use_latest: If True, the latest snapshot availabile will\n                           be used.\n\n        :type restore_time: datetime\n        :param restore_time: The date and time to restore from.  Only\n                             used if use_latest is False.\n\n        :type instance_class: str\n        :param instance_class: The compute and memory capacity of the\n                               DBInstance.  Valid values are:\n                               db.m1.small | db.m1.large | db.m1.xlarge |\n                               db.m2.2xlarge | db.m2.4xlarge\n\n        :type port: int\n        :param port: Port number on which database accepts connections.\n                     Valid values [1115-65535].  Defaults to 3306.\n\n        :type availability_zone: str\n        :param availability_zone: Name of the availability zone to place\n                                  DBInstance into.\n\n        :rtype: :class:`boto.rds.dbinstance.DBInstance`\n        :return: The newly created DBInstance\n        \"\"\"\n        params = {'SourceDBInstanceIdentifier' : source_instance_id,\n                  'TargetDBInstanceIdentifier' : target_instance_id}\n        if use_latest:\n            params['UseLatestRestorableTime'] = 'true'\n        elif restore_time:\n            params['RestoreTime'] = restore_time.isoformat()\n        if dbinstance_class:\n            params['DBInstanceClass'] = dbinstance_class\n        if port:\n            params['Port'] = port\n        if availability_zone:\n            params['AvailabilityZone'] = availability_zone\n        return self.get_object('RestoreDBInstanceToPointInTime',\n                               params, DBInstance)\n\n    # Events\n\n    def get_all_events(self, source_identifier=None, source_type=None,\n                       start_time=None, end_time=None,\n                       max_records=None, marker=None):\n        \"\"\"\n        Get information about events related to your DBInstances,\n        DBSecurityGroups and DBParameterGroups.\n\n        :type source_identifier: str\n        :param source_identifier: If supplied, the events returned will be\n                                  limited to those that apply to the identified\n                                  source.  The value of this parameter depends\n                                  on the value of source_type.  If neither\n                                  parameter is specified, all events in the time\n                                  span will be returned.\n\n        :type source_type: str\n        :param source_type: Specifies how the source_identifier should\n                            be interpreted.  Valid values are:\n                            b-instance | db-security-group |\n                            db-parameter-group | db-snapshot\n\n        :type start_time: datetime\n        :param start_time: The beginning of the time interval for events.\n                           If not supplied, all available events will\n                           be returned.\n\n        :type end_time: datetime\n        :param end_time: The ending of the time interval for events.\n                         If not supplied, all available events will\n                         be returned.\n\n        :type max_records: int\n        :param max_records: The maximum number of records to be returned.\n                            If more results are available, a MoreToken will\n                            be returned in the response that can be used to\n                            retrieve additional records.  Default is 100.\n\n        :type marker: str\n        :param marker: The marker provided by a previous request.\n\n        :rtype: list\n        :return: A list of class:`boto.rds.event.Event`\n        \"\"\"\n        params = {}\n        if source_identifier and source_type:\n            params['SourceIdentifier'] = source_identifier\n            params['SourceType'] = source_type\n        if start_time:\n            params['StartTime'] = start_time.isoformat()\n        if end_time:\n            params['EndTime'] = end_time.isoformat()\n        if max_records:\n            params['MaxRecords'] = max_records\n        if marker:\n            params['Marker'] = marker\n        return self.get_list('DescribeEvents', params, [('Event', Event)])\n\n\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/rds/dbinstance.py",
    "content": "# Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nfrom boto.rds.dbsecuritygroup import DBSecurityGroup\nfrom boto.rds.parametergroup import ParameterGroup\n\nclass DBInstance(object):\n    \"\"\"\n    Represents a RDS  DBInstance\n    \"\"\"\n    \n    def __init__(self, connection=None, id=None):\n        self.connection = connection\n        self.id = id\n        self.create_time = None\n        self.engine = None\n        self.status = None\n        self.allocated_storage = None\n        self.endpoint = None\n        self.instance_class = None\n        self.master_username = None\n        self.parameter_group = None\n        self.security_group = None\n        self.availability_zone = None\n        self.backup_retention_period = None\n        self.preferred_backup_window = None\n        self.preferred_maintenance_window = None\n        self.latest_restorable_time = None\n        self.multi_az = False\n        self.pending_modified_values = None\n        self._in_endpoint = False\n        self._port = None\n        self._address = None\n\n    def __repr__(self):\n        return 'DBInstance:%s' % self.id\n\n    def startElement(self, name, attrs, connection):\n        if name == 'Endpoint':\n            self._in_endpoint = True\n        elif name == 'DBParameterGroup':\n            self.parameter_group = ParameterGroup(self.connection)\n            return self.parameter_group\n        elif name == 'DBSecurityGroup':\n            self.security_group = DBSecurityGroup(self.connection)\n            return self.security_group\n        elif name == 'PendingModifiedValues':\n            self.pending_modified_values = PendingModifiedValues()\n            return self.pending_modified_values\n        return None\n\n    def endElement(self, name, value, connection):\n        if name == 'DBInstanceIdentifier':\n            self.id = value\n        elif name == 'DBInstanceStatus':\n            self.status = value\n        elif name == 'InstanceCreateTime':\n            self.create_time = value\n        elif name == 'Engine':\n            self.engine = value\n        elif name == 'DBInstanceStatus':\n            self.status = value\n        elif name == 'AllocatedStorage':\n            self.allocated_storage = int(value)\n        elif name == 'DBInstanceClass':\n            self.instance_class = value\n        elif name == 'MasterUsername':\n            self.master_username = value\n        elif name == 'Port':\n            if self._in_endpoint:\n                self._port = int(value)\n        elif name == 'Address':\n            if self._in_endpoint:\n                self._address = value\n        elif name == 'Endpoint':\n            self.endpoint = (self._address, self._port)\n            self._in_endpoint = False\n        elif name == 'AvailabilityZone':\n            self.availability_zone = value\n        elif name == 'BackupRetentionPeriod':\n            self.backup_retention_period = value\n        elif name == 'LatestRestorableTime':\n            self.latest_restorable_time = value\n        elif name == 'PreferredMaintenanceWindow':\n            self.preferred_maintenance_window = value\n        elif name == 'PreferredBackupWindow':\n            self.preferred_backup_window = value\n        elif name == 'MultiAZ':\n            if value.lower() == 'true':\n                self.multi_az = True\n        else:\n            setattr(self, name, value)\n\n    def snapshot(self, snapshot_id):\n        \"\"\"\n        Create a new DB snapshot of this DBInstance.\n        \n        :type identifier: string\n        :param identifier: The identifier for the DBSnapshot\n        \n        :rtype: :class:`boto.rds.dbsnapshot.DBSnapshot`\n        :return: The newly created DBSnapshot\n        \"\"\"\n        return self.connection.create_dbsnapshot(snapshot_id, self.id)\n\n    def reboot(self):\n        \"\"\"\n        Reboot this DBInstance\n        \n        :rtype: :class:`boto.rds.dbsnapshot.DBSnapshot`\n        :return: The newly created DBSnapshot\n        \"\"\"\n        return self.connection.reboot_dbinstance(self.id)\n\n    def update(self, validate=False):\n        \"\"\"\n        Update the DB instance's status information by making a call to fetch\n        the current instance attributes from the service.\n\n        :type validate: bool\n        :param validate: By default, if EC2 returns no data about the\n                         instance the update method returns quietly.  If\n                         the validate param is True, however, it will\n                         raise a ValueError exception if no data is\n                         returned from EC2.\n        \"\"\"\n        rs = self.connection.get_all_dbinstances(self.id)\n        if len(rs) > 0:\n            for i in rs:\n                if i.id == self.id:\n                    self.__dict__.update(i.__dict__)\n        elif validate:\n            raise ValueError('%s is not a valid Instance ID' % self.id)\n        return self.status\n\n\n    def stop(self, skip_final_snapshot=False, final_snapshot_id=''):\n        \"\"\"\n        Delete this DBInstance.\n\n        :type skip_final_snapshot: bool\n        :param skip_final_snapshot: This parameter determines whether a final\n                                    db snapshot is created before the instance\n                                    is deleted.  If True, no snapshot is created.\n                                    If False, a snapshot is created before\n                                    deleting the instance.\n\n        :type final_snapshot_id: str\n        :param final_snapshot_id: If a final snapshot is requested, this\n                                  is the identifier used for that snapshot.\n\n        :rtype: :class:`boto.rds.dbinstance.DBInstance`\n        :return: The deleted db instance.\n        \"\"\"\n        return self.connection.delete_dbinstance(self.id,\n                                                 skip_final_snapshot,\n                                                 final_snapshot_id)\n\n    def modify(self, param_group=None, security_groups=None,\n               preferred_maintenance_window=None,\n               master_password=None, allocated_storage=None,\n               instance_class=None,\n               backup_retention_period=None,\n               preferred_backup_window=None,\n               multi_az=False,\n               apply_immediately=False):\n        \"\"\"\n        Modify this DBInstance.\n\n        :type security_groups: list of str or list of DBSecurityGroup objects\n        :param security_groups: List of names of DBSecurityGroup to authorize on\n                                this DBInstance.\n\n        :type preferred_maintenance_window: str\n        :param preferred_maintenance_window: The weekly time range (in UTC)\n                                             during which maintenance can\n                                             occur.\n                                             Default is Sun:05:00-Sun:09:00\n\n        :type master_password: str\n        :param master_password: Password of master user for the DBInstance.\n                                Must be 4-15 alphanumeric characters.\n\n        :type allocated_storage: int\n        :param allocated_storage: The new allocated storage size, in GBs.\n                                  Valid values are [5-1024]\n\n        :type instance_class: str\n        :param instance_class: The compute and memory capacity of the\n                               DBInstance.  Changes will be applied at\n                               next maintenance window unless\n                               apply_immediately is True.\n\n                               Valid values are:\n                               \n                               * db.m1.small\n                               * db.m1.large\n                               * db.m1.xlarge\n                               * db.m2.xlarge\n                               * db.m2.2xlarge\n                               * db.m2.4xlarge\n\n        :type apply_immediately: bool\n        :param apply_immediately: If true, the modifications will be applied\n                                  as soon as possible rather than waiting for\n                                  the next preferred maintenance window.\n\n        :type backup_retention_period: int\n        :param backup_retention_period: The number of days for which automated\n                                        backups are retained.  Setting this to\n                                        zero disables automated backups.\n\n        :type preferred_backup_window: str\n        :param preferred_backup_window: The daily time range during which\n                                        automated backups are created (if\n                                        enabled).  Must be in h24:mi-hh24:mi\n                                        format (UTC).\n\n        :type multi_az: bool\n        :param multi_az: If True, specifies the DB Instance will be\n                         deployed in multiple availability zones.\n\n        :rtype: :class:`boto.rds.dbinstance.DBInstance`\n        :return: The modified db instance.\n        \"\"\"\n        return self.connection.modify_dbinstance(self.id,\n                                                 param_group,\n                                                 security_groups,\n                                                 preferred_maintenance_window,\n                                                 master_password,\n                                                 allocated_storage,\n                                                 instance_class,\n                                                 backup_retention_period,\n                                                 preferred_backup_window,\n                                                 multi_az,\n                                                 apply_immediately)\n        \nclass PendingModifiedValues(dict):\n\n    def startElement(self, name, attrs, connection):\n        return None\n\n    def endElement(self, name, value, connection):\n        if name != 'PendingModifiedValues':\n            self[name] = value\n\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/rds/dbsecuritygroup.py",
    "content": "# Copyright (c) 2009 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\n\"\"\"\nRepresents an DBSecurityGroup\n\"\"\"\nfrom boto.ec2.securitygroup import SecurityGroup\n\nclass DBSecurityGroup(object):\n\n    def __init__(self, connection=None, owner_id=None,\n                 name=None, description=None):\n        self.connection = connection\n        self.owner_id = owner_id\n        self.name = name\n        self.description = description\n        self.ec2_groups = []\n        self.ip_ranges = []\n\n    def __repr__(self):\n        return 'DBSecurityGroup:%s' % self.name\n\n    def startElement(self, name, attrs, connection):\n        if name == 'IPRange':\n            cidr = IPRange(self)\n            self.ip_ranges.append(cidr)\n            return cidr\n        elif name == 'EC2SecurityGroup':\n            ec2_grp = EC2SecurityGroup(self)\n            self.ec2_groups.append(ec2_grp)\n            return ec2_grp\n        else:\n            return None\n\n    def endElement(self, name, value, connection):\n        if name == 'OwnerId':\n            self.owner_id = value\n        elif name == 'DBSecurityGroupName':\n            self.name = value\n        elif name == 'DBSecurityGroupDescription':\n            self.description = value\n        elif name == 'IPRanges':\n            pass\n        else:\n            setattr(self, name, value)\n\n    def delete(self):\n        return self.connection.delete_dbsecurity_group(self.name)\n\n    def authorize(self, cidr_ip=None, ec2_group=None):\n        \"\"\"\n        Add a new rule to this DBSecurity group.\n        You need to pass in either a CIDR block to authorize or\n        and EC2 SecurityGroup.\n\n        @type cidr_ip: string\n        @param cidr_ip: A valid CIDR IP range to authorize\n\n        @type ec2_group: :class:`boto.ec2.securitygroup.SecurityGroup>`\n\n        @rtype: bool\n        @return: True if successful.\n        \"\"\"\n        if isinstance(ec2_group, SecurityGroup):\n            group_name = ec2_group.name\n            group_owner_id = ec2_group.owner_id\n        else:\n            group_name = None\n            group_owner_id = None\n        return self.connection.authorize_dbsecurity_group(self.name,\n                                                          cidr_ip,\n                                                          group_name,\n                                                          group_owner_id)\n\n    def revoke(self, cidr_ip=None, ec2_group=None):\n        \"\"\"\n        Revoke access to a CIDR range or EC2 SecurityGroup.\n        You need to pass in either a CIDR block or\n        an EC2 SecurityGroup from which to revoke access.\n\n        @type cidr_ip: string\n        @param cidr_ip: A valid CIDR IP range to revoke\n\n        @type ec2_group: :class:`boto.ec2.securitygroup.SecurityGroup>`\n\n        @rtype: bool\n        @return: True if successful.\n        \"\"\"\n        if isinstance(ec2_group, SecurityGroup):\n            group_name = ec2_group.name\n            group_owner_id = ec2_group.owner_id\n            return self.connection.revoke_dbsecurity_group(\n                self.name,\n                ec2_security_group_name=group_name,\n                ec2_security_group_owner_id=group_owner_id)\n\n        # Revoking by CIDR IP range\n        return self.connection.revoke_dbsecurity_group(\n            self.name, cidr_ip=cidr_ip)\n\nclass IPRange(object):\n\n    def __init__(self, parent=None):\n        self.parent = parent\n        self.cidr_ip = None\n        self.status = None\n\n    def __repr__(self):\n        return 'IPRange:%s' % self.cidr_ip\n\n    def startElement(self, name, attrs, connection):\n        pass\n\n    def endElement(self, name, value, connection):\n        if name == 'CIDRIP':\n            self.cidr_ip = value\n        elif name == 'Status':\n            self.status = value\n        else:\n            setattr(self, name, value)\n\nclass EC2SecurityGroup(object):\n\n    def __init__(self, parent=None):\n        self.parent = parent\n        self.name = None\n        self.owner_id = None\n\n    def __repr__(self):\n        return 'EC2SecurityGroup:%s' % self.name\n\n    def startElement(self, name, attrs, connection):\n        pass\n\n    def endElement(self, name, value, connection):\n        if name == 'EC2SecurityGroupName':\n            self.name = value\n        elif name == 'EC2SecurityGroupOwnerId':\n            self.owner_id = value\n        else:\n            setattr(self, name, value)\n\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/rds/dbsnapshot.py",
    "content": "# Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nclass DBSnapshot(object):\n    \"\"\"\n    Represents a RDS DB Snapshot\n    \"\"\"\n    \n    def __init__(self, connection=None, id=None):\n        self.connection = connection\n        self.id = id\n        self.engine = None\n        self.snapshot_create_time = None\n        self.instance_create_time = None\n        self.port = None\n        self.status = None\n        self.availability_zone = None\n        self.master_username = None\n        self.allocated_storage = None\n        self.instance_id = None\n        self.availability_zone = None\n\n    def __repr__(self):\n        return 'DBSnapshot:%s' % self.id\n\n    def startElement(self, name, attrs, connection):\n        pass\n\n    def endElement(self, name, value, connection):\n        if name == 'Engine':\n            self.engine = value\n        elif name == 'InstanceCreateTime':\n            self.instance_create_time = value\n        elif name == 'SnapshotCreateTime':\n            self.snapshot_create_time = value\n        elif name == 'DBInstanceIdentifier':\n            self.instance_id = value\n        elif name == 'DBSnapshotIdentifier':\n            self.id = value\n        elif name == 'Port':\n            self.port = int(value)\n        elif name == 'Status':\n            self.status = value\n        elif name == 'AvailabilityZone':\n            self.availability_zone = value\n        elif name == 'MasterUsername':\n            self.master_username = value\n        elif name == 'AllocatedStorage':\n            self.allocated_storage = int(value)\n        elif name == 'SnapshotTime':\n            self.time = value\n        else:\n            setattr(self, name, value)\n\n            \n\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/rds/event.py",
    "content": "# Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nclass Event(object):\n\n    def __init__(self, connection=None):\n        self.connection = connection\n        self.message = None\n        self.source_identifier = None\n        self.source_type = None\n        self.engine = None\n        self.date = None\n        \n    def __repr__(self):\n        return '\"%s\"' % self.message\n\n    def startElement(self, name, attrs, connection):\n        pass\n\n    def endElement(self, name, value, connection):\n        if name == 'SourceIdentifier':\n            self.source_identifier = value\n        elif name == 'SourceType':\n            self.source_type = value\n        elif name == 'Message':\n            self.message = value\n        elif name == 'Date':\n            self.date = value\n        else:\n            setattr(self, name, value)\n\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/rds/parametergroup.py",
    "content": "# Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nclass ParameterGroup(dict):\n\n    def __init__(self, connection=None):\n        dict.__init__(self)\n        self.connection = connection\n        self.name = None\n        self.description = None\n        self.engine = None\n        self._current_param = None\n        \n    def __repr__(self):\n        return 'ParameterGroup:%s' % self.name\n\n    def startElement(self, name, attrs, connection):\n        if name == 'Parameter':\n            if self._current_param:\n                self[self._current_param.name] = self._current_param\n            self._current_param = Parameter(self)\n            return self._current_param\n\n    def endElement(self, name, value, connection):\n        if name == 'DBParameterGroupName':\n            self.name = value\n        elif name == 'Description':\n            self.description = value\n        elif name == 'Engine':\n            self.engine = value\n        else:\n            setattr(self, name, value)\n\n    def modifiable(self):\n        mod = []\n        for key in self:\n            p = self[key]\n            if p.is_modifiable:\n                mod.append(p)\n        return mod\n\n    def get_params(self):\n        pg = self.connection.get_all_dbparameters(self.name)\n        self.update(pg)\n    \n    def add_param(self, name, value, apply_method):\n        param = Parameter()\n        param.name = name\n        param.value = value\n        param.apply_method = apply_method\n        self.params.append(param)\n\nclass Parameter(object):\n    \"\"\"\n    Represents a RDS Parameter\n    \"\"\"\n\n    ValidTypes = {'integer' : int,\n                  'string' : str,\n                  'boolean' : bool}\n    ValidSources = ['user', 'system', 'engine-default']\n    ValidApplyTypes = ['static', 'dynamic']\n    ValidApplyMethods = ['immediate', 'pending-reboot']\n    \n    def __init__(self, group=None, name=None):\n        self.group = group\n        self.name = name\n        self._value = None\n        self.type = str\n        self.source = None\n        self.is_modifiable = True\n        self.description = None\n        self.apply_method = None\n        self.allowed_values = None\n\n    def __repr__(self):\n        return 'Parameter:%s' % self.name\n\n    def startElement(self, name, attrs, connection):\n        pass\n\n    def endElement(self, name, value, connection):\n        if name == 'ParameterName':\n            self.name = value\n        elif name == 'ParameterValue':\n            self._value = value\n        elif name == 'DataType':\n            if value in self.ValidTypes:\n                self.type = value\n        elif name == 'Source':\n            if value in self.ValidSources:\n                self.source = value\n        elif name == 'IsModifiable':\n            if value.lower() == 'true':\n                self.is_modifiable = True\n            else:\n                self.is_modifiable = False\n        elif name == 'Description':\n            self.description = value\n        elif name == 'ApplyType':\n            if value in self.ValidApplyTypes:\n                self.apply_type = value\n        elif name == 'AllowedValues':\n            self.allowed_values = value\n        else:\n            setattr(self, name, value)\n\n    def merge(self, d, i):\n        prefix = 'Parameters.member.%d.' % i\n        if self.name:\n            d[prefix+'ParameterName'] = self.name\n        if self._value:\n            d[prefix+'ParameterValue'] = self._value\n        if self.apply_type:\n            d[prefix+'ApplyMethod'] = self.apply_method\n\n    def _set_string_value(self, value):\n        if not isinstance(value, str) or isinstance(value, unicode):\n            raise ValueError, 'value must be of type str'\n        if self.allowed_values:\n            choices = self.allowed_values.split(',')\n            if value not in choices:\n                raise ValueError, 'value must be in %s' % self.allowed_values\n        self._value = value\n\n    def _set_integer_value(self, value):\n        if isinstance(value, str) or isinstance(value, unicode):\n            value = int(value)\n        if isinstance(value, int) or isinstance(value, long):\n            if self.allowed_values:\n                min, max = self.allowed_values.split('-')\n                if value < int(min) or value > int(max):\n                    raise ValueError, 'range is %s' % self.allowed_values\n            self._value = value\n        else:\n            raise ValueError, 'value must be integer'\n\n    def _set_boolean_value(self, value):\n        if isinstance(value, bool):\n            self._value = value\n        elif isinstance(value, str) or isinstance(value, unicode):\n            if value.lower() == 'true':\n                self._value = True\n            else:\n                self._value = False\n        else:\n            raise ValueError, 'value must be boolean'\n        \n    def set_value(self, value):\n        if self.type == 'string':\n            self._set_string_value(value)\n        elif self.type == 'integer':\n            self._set_integer_value(value)\n        elif self.type == 'boolean':\n            self._set_boolean_value(value)\n        else:\n            raise TypeError, 'unknown type (%s)' % self.type\n\n    def get_value(self):\n        if self._value == None:\n            return self._value\n        if self.type == 'string':\n            return self._value\n        elif self.type == 'integer':\n            if not isinstance(self._value, int) and not isinstance(self._value, long):\n                self._set_integer_value(self._value)\n            return self._value\n        elif self.type == 'boolean':\n            if not isinstance(self._value, bool):\n                self._set_boolean_value(self._value)\n            return self._value\n        else:\n            raise TypeError, 'unknown type (%s)' % self.type\n\n    value = property(get_value, set_value, 'The value of the parameter')\n\n    def apply(self, immediate=False):\n        if immediate:\n            self.apply_method = 'immediate'\n        else:\n            self.apply_method = 'pending-reboot'\n        self.group.connection.modify_parameter_group(self.group.name, [self])\n\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/rds/regioninfo.py",
    "content": "# Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/\n# Copyright (c) 2010, Eucalyptus Systems, Inc.\n# All rights reserved.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n#\n\nfrom boto.regioninfo import RegionInfo\n\nclass RDSRegionInfo(RegionInfo):\n\n    def __init__(self, connection=None, name=None, endpoint=None):\n        from boto.rds import RDSConnection\n        RegionInfo.__init__(self, connection, name, endpoint,\n                            RDSConnection)\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/regioninfo.py",
    "content": "# Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/\n# Copyright (c) 2010, Eucalyptus Systems, Inc.\n# All rights reserved.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nclass RegionInfo(object):\n    \"\"\"\n    Represents an AWS Region\n    \"\"\"\n    \n    def __init__(self, connection=None, name=None, endpoint=None,\n                 connection_cls=None):\n        self.connection = connection\n        self.name = name\n        self.endpoint = endpoint\n        self.connection_cls = connection_cls\n\n    def __repr__(self):\n        return 'RegionInfo:%s' % self.name\n\n    def startElement(self, name, attrs, connection):\n        return None\n\n    def endElement(self, name, value, connection):\n        if name == 'regionName':\n            self.name = value\n        elif name == 'regionEndpoint':\n            self.endpoint = value\n        else:\n            setattr(self, name, value)\n\n    def connect(self, **kw_params):\n        \"\"\"\n        Connect to this Region's endpoint. Returns an connection\n        object pointing to the endpoint associated with this region.\n        You may pass any of the arguments accepted by the connection\n        class's constructor as keyword arguments and they will be\n        passed along to the connection object.\n        \n        :rtype: Connection object\n        :return: The connection to this regions endpoint\n        \"\"\"\n        if self.connection_cls:\n            return self.connection_cls(region=self, **kw_params)\n\n\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/resultset.py",
    "content": "# Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nclass ResultSet(list):\n    \"\"\"\n    The ResultSet is used to pass results back from the Amazon services\n    to the client. It is light wrapper around Python's :py:class:`list` class,\n    with some additional methods for parsing XML results from AWS. \n    Because I don't really want any dependencies on external libraries, \n    I'm using the standard SAX parser that comes with Python. The good news is \n    that it's quite fast and efficient but it makes some things rather \n    difficult.\n\n    You can pass in, as the marker_elem parameter, a list of tuples.\n    Each tuple contains a string as the first element which represents\n    the XML element that the resultset needs to be on the lookout for\n    and a Python class as the second element of the tuple. Each time the\n    specified element is found in the XML, a new instance of the class\n    will be created and popped onto the stack.\n\n    :ivar str next_token: A hash used to assist in paging through very long\n        result sets. In most cases, passing this value to certain methods\n        will give you another 'page' of results.\n    \"\"\"\n    def __init__(self, marker_elem=None):\n        list.__init__(self)\n        if isinstance(marker_elem, list):\n            self.markers = marker_elem\n        else:\n            self.markers = []\n        self.marker = None\n        self.key_marker = None\n        self.next_key_marker = None\n        self.next_version_id_marker = None\n        self.version_id_marker = None\n        self.is_truncated = False\n        self.next_token = None\n        self.status = True\n\n    def startElement(self, name, attrs, connection):\n        for t in self.markers:\n            if name == t[0]:\n                obj = t[1](connection)\n                self.append(obj)\n                return obj\n        return None\n\n    def to_boolean(self, value, true_value='true'):\n        if value == true_value:\n            return True\n        else:\n            return False\n\n    def endElement(self, name, value, connection):\n        if name == 'IsTruncated':\n            self.is_truncated = self.to_boolean(value)\n        elif name == 'Marker':\n            self.marker = value\n        elif name == 'KeyMarker':\n            self.key_marker = value\n        elif name == 'NextKeyMarker':\n            self.next_key_marker = value\n        elif name == 'VersionIdMarker':\n            self.version_id_marker = value\n        elif name == 'NextVersionIdMarker':\n            self.next_version_id_marker = value\n        elif name == 'UploadIdMarker':\n            self.upload_id_marker = value\n        elif name == 'NextUploadIdMarker':\n            self.next_upload_id_marker = value\n        elif name == 'Bucket':\n            self.bucket = value\n        elif name == 'MaxUploads':\n            self.max_uploads = int(value)\n        elif name == 'Prefix':\n            self.prefix = value\n        elif name == 'return':\n            self.status = self.to_boolean(value)\n        elif name == 'StatusCode':\n            self.status = self.to_boolean(value, 'Success')\n        elif name == 'ItemName':\n            self.append(value)\n        elif name == 'NextToken':\n            self.next_token = value\n        elif name == 'BoxUsage':\n            try:\n                connection.box_usage += float(value)\n            except:\n                pass\n        elif name == 'IsValid':\n            self.status = self.to_boolean(value, 'True')\n        else:\n            setattr(self, name, value)\n\nclass BooleanResult(object):\n\n    def __init__(self, marker_elem=None):\n        self.status = True\n        self.request_id = None\n        self.box_usage = None\n\n    def __repr__(self):\n        if self.status:\n            return 'True'\n        else:\n            return 'False'\n\n    def __nonzero__(self):\n        return self.status\n\n    def startElement(self, name, attrs, connection):\n        return None\n\n    def to_boolean(self, value, true_value='true'):\n        if value == true_value:\n            return True\n        else:\n            return False\n\n    def endElement(self, name, value, connection):\n        if name == 'return':\n            self.status = self.to_boolean(value)\n        elif name == 'StatusCode':\n            self.status = self.to_boolean(value, 'Success')\n        elif name == 'IsValid':\n            self.status = self.to_boolean(value, 'True')\n        elif name == 'RequestId':\n            self.request_id = value\n        elif name == 'requestId':\n            self.request_id = value\n        elif name == 'BoxUsage':\n            self.request_id = value\n        else:\n            setattr(self, name, value)\n\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/roboto/__init__.py",
    "content": "#\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/roboto/awsqueryrequest.py",
    "content": "# Copyright (c) 2010 Mitch Garnaat http://garnaat.org/\n# Copyright (c) 2010, Eucalyptus Systems, Inc.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nimport sys\nimport os\nimport boto\nimport optparse\nimport copy\nimport boto.exception\nimport boto.roboto.awsqueryservice\n\nimport bdb\nimport traceback\ntry:\n    import epdb as debugger\nexcept ImportError:\n    import pdb as debugger\n\ndef boto_except_hook(debugger_flag, debug_flag):\n    def excepthook(typ, value, tb):\n        if typ is bdb.BdbQuit:\n            sys.exit(1)\n        sys.excepthook = sys.__excepthook__\n\n        if debugger_flag and sys.stdout.isatty() and sys.stdin.isatty():\n            if debugger.__name__ == 'epdb':\n                debugger.post_mortem(tb, typ, value)\n            else:\n                debugger.post_mortem(tb)\n        elif debug_flag:\n            print traceback.print_tb(tb)\n            sys.exit(1)\n        else:\n            print value\n            sys.exit(1)\n\n    return excepthook\n\nclass Line(object):\n\n    def __init__(self, fmt, data, label):\n        self.fmt = fmt\n        self.data = data\n        self.label = label\n        self.line = '%s\\t' % label\n        self.printed = False\n\n    def append(self, datum):\n        self.line += '%s\\t' % datum\n\n    def print_it(self):\n        if not self.printed:\n            print self.line\n            self.printed = True\n\nclass RequiredParamError(boto.exception.BotoClientError):\n\n    def __init__(self, required):\n        self.required = required\n        s = 'Required parameters are missing: %s' % self.required\n        boto.exception.BotoClientError.__init__(self, s)\n\nclass EncoderError(boto.exception.BotoClientError):\n\n    def __init__(self, error_msg):\n        s = 'Error encoding value (%s)' % error_msg\n        boto.exception.BotoClientError.__init__(self, s)\n        \nclass FilterError(boto.exception.BotoClientError):\n\n    def __init__(self, filters):\n        self.filters = filters\n        s = 'Unknown filters: %s' % self.filters\n        boto.exception.BotoClientError.__init__(self, s)\n        \nclass Encoder:\n\n    @classmethod\n    def encode(cls, p, rp, v, label=None):\n        if p.name.startswith('_'):\n            return\n        try:\n            mthd = getattr(cls, 'encode_'+p.ptype)\n            mthd(p, rp, v, label)\n        except AttributeError:\n            raise EncoderError('Unknown type: %s' % p.ptype)\n        \n    @classmethod\n    def encode_string(cls, p, rp, v, l):\n        if l:\n            label = l\n        else:\n            label = p.name\n        rp[label] = v\n\n    encode_file = encode_string\n    encode_enum = encode_string\n\n    @classmethod\n    def encode_integer(cls, p, rp, v, l):\n        if l:\n            label = l\n        else:\n            label = p.name\n        rp[label] = '%d' % v\n        \n    @classmethod\n    def encode_boolean(cls, p, rp, v, l):\n        if l:\n            label = l\n        else:\n            label = p.name\n        if v:\n            v = 'true'\n        else:\n            v = 'false'\n        rp[label] = v\n        \n    @classmethod\n    def encode_datetime(cls, p, rp, v, l):\n        if l:\n            label = l\n        else:\n            label = p.name\n        rp[label] = v\n        \n    @classmethod\n    def encode_array(cls, p, rp, v, l):\n        v = boto.utils.mklist(v)\n        if l:\n            label = l\n        else:\n            label = p.name\n        label = label + '.%d'\n        for i, value in enumerate(v):\n            rp[label%(i+1)] = value\n            \nclass AWSQueryRequest(object):\n\n    ServiceClass = None\n\n    Description = ''\n    Params = []\n    Args = []\n    Filters = []\n    Response = {}\n\n    CLITypeMap = {'string' : 'string',\n                  'integer' : 'int',\n                  'int' : 'int',\n                  'enum' : 'choice',\n                  'datetime' : 'string',\n                  'dateTime' : 'string',\n                  'file' : 'string',\n                  'boolean' : None}\n\n    @classmethod\n    def name(cls):\n        return cls.__name__\n\n    def __init__(self, **args):\n        self.args = args\n        self.parser = None\n        self.cli_options = None\n        self.cli_args = None\n        self.cli_output_format = None\n        self.connection = None\n        self.list_markers = []\n        self.item_markers = []\n        self.request_params = {}\n        self.connection_args = None\n\n    def __repr__(self):\n        return self.name()\n\n    def get_connection(self, **args):\n        if self.connection is None:\n            self.connection = self.ServiceClass(**args)\n        return self.connection\n\n    @property\n    def status(self):\n        retval = None\n        if self.http_response is not None:\n            retval = self.http_response.status\n        return retval\n\n    @property\n    def reason(self):\n        retval = None\n        if self.http_response is not None:\n            retval = self.http_response.reason\n        return retval\n\n    @property\n    def request_id(self):\n        retval = None\n        if self.aws_response is not None:\n            retval = getattr(self.aws_response, 'requestId')\n        return retval\n\n    def process_filters(self):\n        filters = self.args.get('filters', [])\n        filter_names = [f['name'] for f in self.Filters]\n        unknown_filters = [f for f in filters if f not in filter_names]\n        if unknown_filters:\n            raise FilterError, 'Unknown filters: %s' % unknown_filters\n        for i, filter in enumerate(self.Filters):\n            name = filter['name']\n            if name in filters:\n                self.request_params['Filter.%d.Name' % (i+1)] = name\n                for j, value in enumerate(boto.utils.mklist(filters[name])):\n                    Encoder.encode(filter, self.request_params, value,\n                                   'Filter.%d.Value.%d' % (i+1,j+1))\n\n    def process_args(self, **args):\n        \"\"\"\n        Responsible for walking through Params defined for the request and:\n\n        * Matching them with keyword parameters passed to the request\n          constructor or via the command line.\n        * Checking to see if all required parameters have been specified\n          and raising an exception, if not.\n        * Encoding each value into the set of request parameters that will\n          be sent in the request to the AWS service.\n        \"\"\"\n        self.args.update(args)\n        self.connection_args = copy.copy(self.args)\n        if 'debug' in self.args and self.args['debug'] >= 2:\n            boto.set_stream_logger(self.name())\n        required = [p.name for p in self.Params+self.Args if not p.optional]\n        for param in self.Params+self.Args:\n            if param.long_name:\n                python_name = param.long_name.replace('-', '_')\n            else:\n                python_name = boto.utils.pythonize_name(param.name, '_')\n            value = None\n            if python_name in self.args:\n                value = self.args[python_name]\n            if value is None:\n                value = param.default\n            if value is not None:\n                if param.name in required:\n                    required.remove(param.name)\n                if param.request_param:\n                    if param.encoder:\n                        param.encoder(param, self.request_params, value)\n                    else:\n                        Encoder.encode(param, self.request_params, value)\n            if python_name in self.args:\n                del self.connection_args[python_name]\n        if required:\n            l = []\n            for p in self.Params+self.Args:\n                if p.name in required:\n                    if p.short_name and p.long_name:\n                        l.append('(%s, %s)' % (p.optparse_short_name,\n                                               p.optparse_long_name))\n                    elif p.short_name:\n                        l.append('(%s)' % p.optparse_short_name)\n                    else:\n                        l.append('(%s)' % p.optparse_long_name)\n            raise RequiredParamError(','.join(l))\n        boto.log.debug('request_params: %s' % self.request_params)\n        self.process_markers(self.Response)\n\n    def process_markers(self, fmt, prev_name=None):\n        if fmt and fmt['type'] == 'object':\n            for prop in fmt['properties']:\n                self.process_markers(prop, fmt['name'])\n        elif fmt and fmt['type'] == 'array':\n            self.list_markers.append(prev_name)\n            self.item_markers.append(fmt['name'])\n        \n    def send(self, verb='GET', **args):\n        self.process_args(**args)\n        self.process_filters()\n        conn = self.get_connection(**self.connection_args)\n        self.http_response = conn.make_request(self.name(),\n                                               self.request_params,\n                                               verb=verb)\n        self.body = self.http_response.read()\n        boto.log.debug(self.body)\n        if self.http_response.status == 200:\n            self.aws_response = boto.jsonresponse.Element(list_marker=self.list_markers,\n                                                          item_marker=self.item_markers)\n            h = boto.jsonresponse.XmlHandler(self.aws_response, self)\n            h.parse(self.body)\n            return self.aws_response\n        else:\n            boto.log.error('%s %s' % (self.http_response.status,\n                                      self.http_response.reason))\n            boto.log.error('%s' % self.body)\n            raise conn.ResponseError(self.http_response.status,\n                                     self.http_response.reason,\n                                     self.body)\n\n    def add_standard_options(self):\n        group = optparse.OptionGroup(self.parser, 'Standard Options')\n        # add standard options that all commands get\n        group.add_option('-D', '--debug', action='store_true',\n                         help='Turn on all debugging output')\n        group.add_option('--debugger', action='store_true',\n                         default=False,\n                         help='Enable interactive debugger on error')\n        group.add_option('-U', '--url', action='store',\n                         help='Override service URL with value provided')\n        group.add_option('--region', action='store',\n                         help='Name of the region to connect to')\n        group.add_option('-I', '--access-key-id', action='store',\n                         help='Override access key value')\n        group.add_option('-S', '--secret-key', action='store',\n                         help='Override secret key value')\n        group.add_option('--version', action='store_true',\n                         help='Display version string')\n        if self.Filters:\n            self.group.add_option('--help-filters', action='store_true',\n                                   help='Display list of available filters')\n            self.group.add_option('--filter', action='append',\n                                   metavar=' name=value',\n                                   help='A filter for limiting the results')\n        self.parser.add_option_group(group)\n\n    def process_standard_options(self, options, args, d):\n        if hasattr(options, 'help_filters') and options.help_filters:\n            print 'Available filters:'\n            for filter in self.Filters:\n                print '%s\\t%s' % (filter.name, filter.doc)\n            sys.exit(0)\n        if options.debug:\n            self.args['debug'] = 2\n        if options.url:\n            self.args['url'] = options.url\n        if options.region:\n            self.args['region'] = options.region\n        if options.access_key_id:\n            self.args['aws_access_key_id'] = options.access_key_id\n        if options.secret_key:\n            self.args['aws_secret_access_key'] = options.secret_key\n        if options.version:\n            # TODO - Where should the version # come from?\n            print 'version x.xx'\n            exit(0)\n        sys.excepthook = boto_except_hook(options.debugger,\n                                          options.debug)\n\n    def get_usage(self):\n        s = 'usage: %prog [options] '\n        l = [ a.long_name for a in self.Args ]\n        s += ' '.join(l)\n        for a in self.Args:\n            if a.doc:\n                s += '\\n\\n\\t%s - %s' % (a.long_name, a.doc)\n        return s\n    \n    def build_cli_parser(self):\n        self.parser = optparse.OptionParser(description=self.Description,\n                                            usage=self.get_usage())\n        self.add_standard_options()\n        for param in self.Params:\n            ptype = action = choices = None\n            if param.ptype in self.CLITypeMap:\n                ptype = self.CLITypeMap[param.ptype]\n                action = 'store'\n            if param.ptype == 'boolean':\n                action = 'store_true'\n            elif param.ptype == 'array':\n                if len(param.items) == 1:\n                    ptype = param.items[0]['type']\n                    action = 'append'\n            elif param.cardinality != 1:\n                action = 'append'\n            if ptype or action == 'store_true':\n                if param.short_name:\n                    self.parser.add_option(param.optparse_short_name,\n                                           param.optparse_long_name,\n                                           action=action, type=ptype,\n                                           choices=param.choices,\n                                           help=param.doc)\n                elif param.long_name:\n                    self.parser.add_option(param.optparse_long_name,\n                                           action=action, type=ptype,\n                                           choices=param.choices,\n                                           help=param.doc)\n\n    def do_cli(self):\n        if not self.parser:\n            self.build_cli_parser()\n        self.cli_options, self.cli_args = self.parser.parse_args()\n        d = {}\n        self.process_standard_options(self.cli_options, self.cli_args, d)\n        for param in self.Params:\n            if param.long_name:\n                p_name = param.long_name.replace('-', '_')\n            else:\n                p_name = boto.utils.pythonize_name(param.name)\n            value = getattr(self.cli_options, p_name)\n            if param.ptype == 'file' and value:\n                if value == '-':\n                    value = sys.stdin.read()\n                else:\n                    path = os.path.expanduser(value)\n                    path = os.path.expandvars(path)\n                    if os.path.isfile(path):\n                        fp = open(path)\n                        value = fp.read()\n                        fp.close()\n                    else:\n                        self.parser.error('Unable to read file: %s' % path)\n            d[p_name] = value\n        for arg in self.Args:\n            if arg.long_name:\n                p_name = arg.long_name.replace('-', '_')\n            else:\n                p_name = boto.utils.pythonize_name(arg.name)\n            value = None\n            if arg.cardinality == 1:\n                if len(self.cli_args) >= 1:\n                    value = self.cli_args[0]\n            else:\n                value = self.cli_args\n            d[p_name] = value\n        self.args.update(d)\n        if hasattr(self.cli_options, 'filter') and self.cli_options.filter:\n            d = {}\n            for filter in self.cli_options.filter:\n                name, value = filter.split('=')\n                d[name] = value\n            if 'filters' in self.args:\n                self.args['filters'].update(d)\n            else:\n                self.args['filters'] = d\n        try:\n            response = self.main()\n            self.cli_formatter(response)\n        except RequiredParamError, e:\n            print e\n            sys.exit(1)\n        except self.ServiceClass.ResponseError, err:\n            print 'Error(%s): %s' % (err.error_code, err.error_message)\n            sys.exit(1)\n        except boto.roboto.awsqueryservice.NoCredentialsError, err:\n            print 'Unable to find credentials.'\n            sys.exit(1)\n        except Exception, e:\n            print e\n            sys.exit(1)\n\n    def _generic_cli_formatter(self, fmt, data, label=''):\n        if fmt['type'] == 'object':\n            for prop in fmt['properties']:\n                if 'name' in fmt:\n                    if fmt['name'] in data:\n                        data = data[fmt['name']]\n                    if fmt['name'] in self.list_markers:\n                        label = fmt['name']\n                        if label[-1] == 's':\n                            label = label[0:-1]\n                        label = label.upper()\n                self._generic_cli_formatter(prop, data, label)\n        elif fmt['type'] == 'array':\n            for item in data:\n                line = Line(fmt, item, label)\n                if isinstance(item, dict):\n                    for field_name in item:\n                        line.append(item[field_name])\n                elif isinstance(item, basestring):\n                    line.append(item)\n                line.print_it()\n\n    def cli_formatter(self, data):\n        \"\"\"\n        This method is responsible for formatting the output for the\n        command line interface.  The default behavior is to call the\n        generic CLI formatter which attempts to print something\n        reasonable.  If you want specific formatting, you should\n        override this method and do your own thing.\n\n        :type data: dict\n        :param data: The data returned by AWS.\n        \"\"\"\n        if data:\n            self._generic_cli_formatter(self.Response, data)\n\n\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/roboto/awsqueryservice.py",
    "content": "import os\nimport urlparse\nimport boto\nimport boto.connection\nimport boto.jsonresponse\nimport boto.exception\nimport awsqueryrequest\n\nclass NoCredentialsError(boto.exception.BotoClientError):\n\n    def __init__(self):\n        s = 'Unable to find credentials'\n        boto.exception.BotoClientError.__init__(self, s)\n\nclass AWSQueryService(boto.connection.AWSQueryConnection):\n\n    Name = ''\n    Description = ''\n    APIVersion = ''\n    Authentication = 'sign-v2'\n    Path = '/'\n    Port = 443\n    Provider = 'aws'\n    EnvURL = 'AWS_URL'\n\n    Regions = []\n\n    def __init__(self, **args):\n        self.args = args\n        self.check_for_credential_file()\n        self.check_for_env_url()\n        if 'host' not in self.args:\n            if self.Regions:\n                region_name = self.args.get('region_name',\n                                            self.Regions[0]['name'])\n                for region in self.Regions:\n                    if region['name'] == region_name:\n                        self.args['host'] = region['endpoint']\n        if 'path' not in self.args:\n            self.args['path'] = self.Path\n        if 'port' not in self.args:\n            self.args['port'] = self.Port\n        try:\n            boto.connection.AWSQueryConnection.__init__(self, **self.args)\n            self.aws_response = None\n        except boto.exception.NoAuthHandlerFound:\n            raise NoCredentialsError()\n\n    def check_for_credential_file(self):\n        \"\"\"\n        Checks for the existance of an AWS credential file.\n        If the environment variable AWS_CREDENTIAL_FILE is\n        set and points to a file, that file will be read and\n        will be searched credentials.\n        Note that if credentials have been explicitelypassed\n        into the class constructor, those values always take\n        precedence.\n        \"\"\"\n        if 'AWS_CREDENTIAL_FILE' in os.environ:\n            path = os.environ['AWS_CREDENTIAL_FILE']\n            path = os.path.expanduser(path)\n            path = os.path.expandvars(path)\n            if os.path.isfile(path):\n                fp = open(path)\n                lines = fp.readlines()\n                fp.close()\n                for line in lines:\n                    if line[0] != '#':\n                        if '=' in line:\n                            name, value = line.split('=', 1)\n                            if name.strip() == 'AWSAccessKeyId':\n                                if 'aws_access_key_id' not in self.args:\n                                    value = value.strip()\n                                    self.args['aws_access_key_id'] = value\n                            elif name.strip() == 'AWSSecretKey':\n                                if 'aws_secret_access_key' not in self.args:\n                                    value = value.strip()\n                                    self.args['aws_secret_access_key'] = value\n            else:\n                print 'Warning: unable to read AWS_CREDENTIAL_FILE'\n\n    def check_for_env_url(self):\n        \"\"\"\n        First checks to see if a url argument was explicitly passed\n        in.  If so, that will be used.  If not, it checks for the\n        existence of the environment variable specified in ENV_URL.\n        If this is set, it should contain a fully qualified URL to the\n        service you want to use.\n        Note that any values passed explicitly to the class constructor\n        will take precedence.\n        \"\"\"\n        url = self.args.get('url', None)\n        if url:\n            del self.args['url']\n        if not url and self.EnvURL in os.environ:\n            url = os.environ[self.EnvURL]\n        if url:\n            rslt = urlparse.urlparse(url)\n            if 'is_secure' not in self.args:\n                if rslt.scheme == 'https':\n                    self.args['is_secure'] = True\n                else:\n                    self.args['is_secure'] = False\n\n            host = rslt.netloc\n            port = None\n            l = host.split(':')\n            if len(l) > 1:\n                host = l[0]\n                port = int(l[1])\n            if 'host' not in self.args:\n                self.args['host'] = host\n            if port and 'port' not in self.args:\n                self.args['port'] = port\n\n            if rslt.path and 'path' not in self.args:\n                self.args['path'] = rslt.path\n            \n    def _required_auth_capability(self):\n        return [self.Authentication]\n        \n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/roboto/param.py",
    "content": "# Copyright (c) 2010 Mitch Garnaat http://garnaat.org/\n# Copyright (c) 2010, Eucalyptus Systems, Inc.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nimport os\n\nclass Converter(object):\n    \n    @classmethod\n    def convert_string(cls, param, value):\n        # TODO: could do length validation, etc. here\n        if not isinstance(value, basestring):\n            raise ValueError\n        return value\n\n    @classmethod\n    def convert_integer(cls, param, value):\n        # TODO: could do range checking here\n        return int(value)\n        \n    @classmethod\n    def convert_boolean(cls, param, value):\n        \"\"\"\n        For command line arguments, just the presence\n        of the option means True so just return True\n        \"\"\"\n        return True\n        \n    @classmethod\n    def convert_file(cls, param, value):\n        if os.path.isfile(value):\n            return value\n        raise ValueError\n        \n    @classmethod\n    def convert_dir(cls, param, value):\n        if os.path.isdir(value):\n            return value\n        raise ValueError\n        \n    @classmethod\n    def convert(cls, param, value):\n        try:\n            if hasattr(cls, 'convert_'+param.ptype):\n                mthd = getattr(cls, 'convert_'+param.ptype)\n            else:\n                mthd = cls.convert_string\n            return mthd(param, value)\n        except:\n            raise ValidationException(param, '')\n        \nclass Param(object):\n\n    def __init__(self, name=None, ptype='string', optional=True,\n                 short_name=None, long_name=None, doc='',\n                 metavar=None, cardinality=1, default=None,\n                 choices=None, encoder=None, request_param=True):\n        self.name = name\n        self.ptype = ptype\n        self.optional = optional\n        self.short_name = short_name\n        self.long_name = long_name\n        self.doc = doc\n        self.metavar = metavar\n        self.cardinality = cardinality\n        self.default = default\n        self.choices = choices\n        self.encoder = encoder\n        self.request_param = request_param\n\n    @property\n    def optparse_long_name(self):\n        ln = None\n        if self.long_name:\n            ln = '--%s' % self.long_name\n        return ln\n\n    @property\n    def synopsis_long_name(self):\n        ln = None\n        if self.long_name:\n            ln = '--%s' % self.long_name\n        return ln\n\n    @property\n    def getopt_long_name(self):\n        ln = None\n        if self.long_name:\n            ln = '%s' % self.long_name\n            if self.ptype != 'boolean':\n                ln += '='\n        return ln\n\n    @property\n    def optparse_short_name(self):\n        sn = None\n        if self.short_name:\n            sn = '-%s' % self.short_name\n        return sn\n\n    @property\n    def synopsis_short_name(self):\n        sn = None\n        if self.short_name:\n            sn = '-%s' % self.short_name\n        return sn\n\n    @property\n    def getopt_short_name(self):\n        sn = None\n        if self.short_name:\n            sn = '%s' % self.short_name\n            if self.ptype != 'boolean':\n                sn += ':'\n        return sn\n\n    def convert(self, value):\n        \"\"\"\n        Convert a string value as received in the command line\n        tools and convert to the appropriate type of value.\n        Raise a ValidationError if the value can't be converted.\n\n        :type value: str\n        :param value: The value to convert.  This should always\n                      be a string.\n        \"\"\"\n        return Converter.convert(self, value)\n\n\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/route53/__init__.py",
    "content": "# Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/\n# Copyright (c) 2010, Eucalyptus Systems, Inc.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n#\n\n# this is here for backward compatibility\n# originally, the Route53Connection class was defined here\nfrom connection import Route53Connection\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/route53/connection.py",
    "content": "# Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/\n# Copyright (c) 2010, Eucalyptus Systems, Inc.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n#\n\nimport xml.sax\nimport time\nimport uuid\nimport urllib\nimport boto\nfrom boto.connection import AWSAuthConnection\nfrom boto import handler\nfrom boto.resultset import ResultSet\nimport boto.jsonresponse\nimport exception\nimport hostedzone\n\nHZXML = \"\"\"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<CreateHostedZoneRequest xmlns=\"%(xmlns)s\">\n  <Name>%(name)s</Name>\n  <CallerReference>%(caller_ref)s</CallerReference>\n  <HostedZoneConfig>\n    <Comment>%(comment)s</Comment>\n  </HostedZoneConfig>\n</CreateHostedZoneRequest>\"\"\"\n        \n#boto.set_stream_logger('dns')\n\nclass Route53Connection(AWSAuthConnection):\n    DefaultHost = 'route53.amazonaws.com'\n    \"\"\"The default Route53 API endpoint to connect to.\"\"\"\n\n    Version = '2011-05-05'\n    \"\"\"Route53 API version.\"\"\"\n\n    XMLNameSpace = 'https://route53.amazonaws.com/doc/2011-05-05/'\n    \"\"\"XML schema for this Route53 API version.\"\"\"\n\n    def __init__(self, aws_access_key_id=None, aws_secret_access_key=None,\n                 port=None, proxy=None, proxy_port=None,\n                 host=DefaultHost, debug=0):\n        AWSAuthConnection.__init__(self, host,\n                aws_access_key_id, aws_secret_access_key,\n                True, port, proxy, proxy_port, debug=debug)\n\n    def _required_auth_capability(self):\n        return ['route53']\n\n    def make_request(self, action, path, headers=None, data='', params=None):\n        if params:\n            pairs = []\n            for key, val in params.iteritems():\n                if val is None: continue\n                pairs.append(key + '=' + urllib.quote(str(val)))\n            path += '?' + '&'.join(pairs)\n        return AWSAuthConnection.make_request(self, action, path, headers, data)\n\n    # Hosted Zones\n\n    def get_all_hosted_zones(self, start_marker=None, zone_list=None):\n        \"\"\"\n        Returns a Python data structure with information about all\n        Hosted Zones defined for the AWS account.\n\n        :param int start_marker: start marker to pass when fetching additional\n            results after a truncated list\n        :param list zone_list: a HostedZones list to prepend to results\n        \"\"\"\n        params = {}\n        if start_marker:\n            params = {'marker': start_marker}\n        response = self.make_request('GET', '/%s/hostedzone' % self.Version,\n                params=params)\n        body = response.read()\n        boto.log.debug(body)\n        if response.status >= 300:\n            raise exception.DNSServerError(response.status,\n                                           response.reason,\n                                           body)\n        e = boto.jsonresponse.Element(list_marker='HostedZones',\n                                      item_marker=('HostedZone',))\n        h = boto.jsonresponse.XmlHandler(e, None)\n        h.parse(body)\n        if zone_list:\n            e['ListHostedZonesResponse']['HostedZones'].extend(zone_list)\n        while e['ListHostedZonesResponse'].has_key('NextMarker'):\n            next_marker = e['ListHostedZonesResponse']['NextMarker']\n            zone_list = e['ListHostedZonesResponse']['HostedZones']\n            e = self.get_all_hosted_zones(next_marker, zone_list)\n        return e\n\n    def get_hosted_zone(self, hosted_zone_id):\n        \"\"\"\n        Get detailed information about a particular Hosted Zone.\n        \n        :type hosted_zone_id: str\n        :param hosted_zone_id: The unique identifier for the Hosted Zone\n\n        \"\"\"\n        uri = '/%s/hostedzone/%s' % (self.Version, hosted_zone_id)\n        response = self.make_request('GET', uri)\n        body = response.read()\n        boto.log.debug(body)\n        if response.status >= 300:\n            raise exception.DNSServerError(response.status,\n                                           response.reason,\n                                           body)\n        e = boto.jsonresponse.Element(list_marker='NameServers',\n                                      item_marker=('NameServer',))\n        h = boto.jsonresponse.XmlHandler(e, None)\n        h.parse(body)\n        return e\n\n    def create_hosted_zone(self, domain_name, caller_ref=None, comment=''):\n        \"\"\"\n        Create a new Hosted Zone.  Returns a Python data structure with\n        information about the newly created Hosted Zone.\n        \n        :type domain_name: str\n        :param domain_name: The name of the domain. This should be a\n            fully-specified domain, and should end with a final period\n            as the last label indication.  If you omit the final period,\n            Amazon Route 53 assumes the domain is relative to the root.\n            This is the name you have registered with your DNS registrar.\n            It is also the name you will delegate from your registrar to\n            the Amazon Route 53 delegation servers returned in\n            response to this request.A list of strings with the image\n            IDs wanted.\n\n        :type caller_ref: str\n        :param caller_ref: A unique string that identifies the request\n            and that allows failed CreateHostedZone requests to be retried\n            without the risk of executing the operation twice.  If you don't\n            provide a value for this, boto will generate a Type 4 UUID and\n            use that.\n\n        :type comment: str\n        :param comment: Any comments you want to include about the hosted      \n            zone.\n\n        \"\"\"\n        if caller_ref is None:\n            caller_ref = str(uuid.uuid4())\n        params = {'name' : domain_name,\n                  'caller_ref' : caller_ref,\n                  'comment' : comment,\n                  'xmlns' : self.XMLNameSpace}\n        xml = HZXML % params\n        uri = '/%s/hostedzone' % self.Version\n        response = self.make_request('POST', uri,\n                                     {'Content-Type' : 'text/xml'}, xml)\n        body = response.read()\n        boto.log.debug(body)\n        if response.status == 201:\n            e = boto.jsonresponse.Element(list_marker='NameServers',\n                                          item_marker=('NameServer',))\n            h = boto.jsonresponse.XmlHandler(e, None)\n            h.parse(body)\n            return e\n        else:\n            raise exception.DNSServerError(response.status,\n                                           response.reason,\n                                           body)\n        \n    def delete_hosted_zone(self, hosted_zone_id):\n        uri = '/%s/hostedzone/%s' % (self.Version, hosted_zone_id)\n        response = self.make_request('DELETE', uri)\n        body = response.read()\n        boto.log.debug(body)\n        if response.status not in (200, 204):\n            raise exception.DNSServerError(response.status,\n                                           response.reason,\n                                           body)\n        e = boto.jsonresponse.Element()\n        h = boto.jsonresponse.XmlHandler(e, None)\n        h.parse(body)\n        return e\n\n    # Resource Record Sets\n\n    def get_all_rrsets(self, hosted_zone_id, type=None,\n                       name=None, identifier=None, maxitems=None):\n        \"\"\"\n        Retrieve the Resource Record Sets defined for this Hosted Zone.\n        Returns the raw XML data returned by the Route53 call.\n        \n        :type hosted_zone_id: str\n        :param hosted_zone_id: The unique identifier for the Hosted Zone\n\n        :type type: str\n        :param type: The type of resource record set to begin the record\n            listing from.  Valid choices are:\n\n                * A\n                * AAAA\n                * CNAME\n                * MX\n                * NS\n                * PTR\n                * SOA\n                * SPF\n                * SRV\n                * TXT\n\n            Valid values for weighted resource record sets:\n\n                * A\n                * AAAA\n                * CNAME\n                * TXT\n\n            Valid values for Zone Apex Aliases:\n\n                * A\n                * AAAA\n\n        :type name: str\n        :param name: The first name in the lexicographic ordering of domain\n                     names to be retrieved\n\n        :type identifier: str\n        :param identifier: In a hosted zone that includes weighted resource\n            record sets (multiple resource record sets with the same DNS\n            name and type that are differentiated only by SetIdentifier),\n            if results were truncated for a given DNS name and type,\n            the value of SetIdentifier for the next resource record\n            set that has the current DNS name and type\n\n        :type maxitems: int\n        :param maxitems: The maximum number of records\n\n        \"\"\"\n        from boto.route53.record import ResourceRecordSets\n        params = {'type': type, 'name': name,\n                  'Identifier': identifier, 'maxitems': maxitems}\n        uri = '/%s/hostedzone/%s/rrset' % (self.Version, hosted_zone_id)\n        response = self.make_request('GET', uri, params=params)\n        body = response.read()\n        boto.log.debug(body)\n        if response.status >= 300:\n            raise exception.DNSServerError(response.status,\n                                           response.reason,\n                                           body)\n        rs = ResourceRecordSets(connection=self, hosted_zone_id=hosted_zone_id)\n        h = handler.XmlHandler(rs, self)\n        xml.sax.parseString(body, h)\n        return rs\n\n    def change_rrsets(self, hosted_zone_id, xml_body):\n        \"\"\"\n        Create or change the authoritative DNS information for this\n        Hosted Zone.\n        Returns a Python data structure with information about the set of\n        changes, including the Change ID.\n\n        :type hosted_zone_id: str\n        :param hosted_zone_id: The unique identifier for the Hosted Zone\n\n        :type xml_body: str\n        :param xml_body: The list of changes to be made, defined in the\n            XML schema defined by the Route53 service.\n\n        \"\"\"\n        uri = '/%s/hostedzone/%s/rrset' % (self.Version, hosted_zone_id)\n        response = self.make_request('POST', uri,\n                                     {'Content-Type' : 'text/xml'},\n                                     xml_body)\n        body = response.read()\n        boto.log.debug(body)\n        if response.status >= 300:\n            raise exception.DNSServerError(response.status,\n                                           response.reason,\n                                           body)\n        e = boto.jsonresponse.Element()\n        h = boto.jsonresponse.XmlHandler(e, None)\n        h.parse(body)\n        return e\n\n    def get_change(self, change_id):\n        \"\"\"\n        Get information about a proposed set of changes, as submitted\n        by the change_rrsets method.\n        Returns a Python data structure with status information about the\n        changes.\n\n        :type change_id: str\n        :param change_id: The unique identifier for the set of changes.\n            This ID is returned in the response to the change_rrsets method.\n\n        \"\"\"\n        uri = '/%s/change/%s' % (self.Version, change_id)\n        response = self.make_request('GET', uri)\n        body = response.read()\n        boto.log.debug(body)\n        if response.status >= 300:\n            raise exception.DNSServerError(response.status,\n                                           response.reason,\n                                           body)\n        e = boto.jsonresponse.Element()\n        h = boto.jsonresponse.XmlHandler(e, None)\n        h.parse(body)\n        return e\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/route53/exception.py",
    "content": "# Copyright (c) 2010 Mitch Garnaat http://garnaat.org/\n# Copyright (c) 2010, Eucalyptus Systems, Inc.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nfrom boto.exception import BotoServerError\n\nclass DNSServerError(BotoServerError):\n\n    pass\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/route53/hostedzone.py",
    "content": "# Copyright (c) 2010 Mitch Garnaat http://garnaat.org/\n# Copyright (c) 2010, Eucalyptus Systems, Inc.\n# All rights reserved.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n#\n\nclass HostedZone(object):\n\n    def __init__(self, id=None, name=None, owner=None, version=None,\n                 caller_reference=None, config=None):\n        self.id = id\n        self.name = name\n        self.owner = owner\n        self.version = version\n        self.caller_reference = caller_reference\n        self.config = config\n\n    def startElement(self, name, attrs, connection):\n        if name == 'Config':\n            self.config = Config()\n            return self.config\n        else:\n            return None\n\n    def endElement(self, name, value, connection):\n        if name == 'Id':\n            self.id = value\n        elif name == 'Name':\n            self.name = value\n        elif name == 'Owner':\n            self.owner = value\n        elif name == 'Version':\n            self.version = value\n        elif name == 'CallerReference':\n            self.caller_reference = value\n        else:\n            setattr(self, name, value)\n        \n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/route53/record.py",
    "content": "# Copyright (c) 2010 Chris Moyer http://coredumped.org/\n# All rights reserved.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nRECORD_TYPES = ['A', 'AAAA', 'TXT', 'CNAME', 'MX', 'PTR', 'SRV', 'SPF']\n\nfrom boto.resultset import ResultSet\nclass ResourceRecordSets(ResultSet):\n\n    ChangeResourceRecordSetsBody = \"\"\"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n    <ChangeResourceRecordSetsRequest xmlns=\"https://route53.amazonaws.com/doc/2011-05-05/\">\n            <ChangeBatch>\n                <Comment>%(comment)s</Comment>\n                <Changes>%(changes)s</Changes>\n            </ChangeBatch>\n        </ChangeResourceRecordSetsRequest>\"\"\"\n\n    ChangeXML = \"\"\"<Change>\n        <Action>%(action)s</Action>\n        %(record)s\n    </Change>\"\"\"\n\n\n    def __init__(self, connection=None, hosted_zone_id=None, comment=None):\n        self.connection = connection\n        self.hosted_zone_id = hosted_zone_id\n        self.comment = comment\n        self.changes = []\n        self.next_record_name = None\n        self.next_record_type = None\n        ResultSet.__init__(self, [('ResourceRecordSet', Record)])\n\n    def __repr__(self):\n        return '<ResourceRecordSets: %s>' % self.hosted_zone_id\n\n    def add_change(self, action, name, type, ttl=600, alias_hosted_zone_id=None, alias_dns_name=None):\n        \"\"\"Add a change request\"\"\"\n        change = Record(name, type, ttl, alias_hosted_zone_id=alias_hosted_zone_id, alias_dns_name=alias_dns_name)\n        self.changes.append([action, change])\n        return change\n\n    def to_xml(self):\n        \"\"\"Convert this ResourceRecordSet into XML\n        to be saved via the ChangeResourceRecordSetsRequest\"\"\"\n        changesXML = \"\"\n        for change in self.changes:\n            changeParams = {\"action\": change[0], \"record\": change[1].to_xml()}\n            changesXML += self.ChangeXML % changeParams\n        params = {\"comment\": self.comment, \"changes\": changesXML}\n        return self.ChangeResourceRecordSetsBody % params\n\n    def commit(self):\n        \"\"\"Commit this change\"\"\"\n        if not self.connection:\n            import boto\n            self.connection = boto.connect_route53()\n        return self.connection.change_rrsets(self.hosted_zone_id, self.to_xml())\n\n    def endElement(self, name, value, connection):\n        \"\"\"Overwritten to also add the NextRecordName and \n        NextRecordType to the base object\"\"\"\n        if name == 'NextRecordName':\n            self.next_record_name = value\n        elif name == 'NextRecordType':\n            self.next_record_type = value\n        else:\n            return ResultSet.endElement(self, name, value, connection)\n\n    def __iter__(self):\n        \"\"\"Override the next function to support paging\"\"\"\n        results = ResultSet.__iter__(self)\n        while results:\n            for obj in results:\n                yield obj\n            if self.is_truncated:\n                self.is_truncated = False\n                results = self.connection.get_all_rrsets(self.hosted_zone_id, name=self.next_record_name, type=self.next_record_type)\n            else:\n                results = None\n\n\n\nclass Record(object):\n    \"\"\"An individual ResourceRecordSet\"\"\"\n\n    XMLBody = \"\"\"<ResourceRecordSet>\n        <Name>%(name)s</Name>\n        <Type>%(type)s</Type>\n        %(body)s\n    </ResourceRecordSet>\"\"\"\n\n    ResourceRecordsBody = \"\"\"\n        <TTL>%(ttl)s</TTL>\n        <ResourceRecords>\n            %(records)s\n        </ResourceRecords>\"\"\"\n\n    ResourceRecordBody = \"\"\"<ResourceRecord>\n        <Value>%s</Value>\n    </ResourceRecord>\"\"\"\n\n    AliasBody = \"\"\"<AliasTarget>\n        <HostedZoneId>%s</HostedZoneId>\n        <DNSName>%s</DNSName>\n    </AliasTarget>\"\"\"\n\n    def __init__(self, name=None, type=None, ttl=600, resource_records=None, alias_hosted_zone_id=None, alias_dns_name=None):\n        self.name = name\n        self.type = type\n        self.ttl = ttl\n        if resource_records == None:\n            resource_records = []\n        self.resource_records = resource_records\n        self.alias_hosted_zone_id = alias_hosted_zone_id\n        self.alias_dns_name = alias_dns_name\n    \n    def add_value(self, value):\n        \"\"\"Add a resource record value\"\"\"\n        self.resource_records.append(value)\n\n    def set_alias(self, alias_hosted_zone_id, alias_dns_name):\n        \"\"\"Make this an alias resource record set\"\"\"\n        self.alias_hosted_zone_id = alias_hosted_zone_id\n        self.alias_dns_name = alias_dns_name\n\n    def to_xml(self):\n        \"\"\"Spit this resource record set out as XML\"\"\"\n        if self.alias_hosted_zone_id != None and self.alias_dns_name != None:\n            # Use alias\n            body = self.AliasBody % (self.alias_hosted_zone_id, self.alias_dns_name)\n        else:\n            # Use resource record(s)\n            records = \"\"\n            for r in self.resource_records:\n                records += self.ResourceRecordBody % r\n            body = self.ResourceRecordsBody % {\n                \"ttl\": self.ttl,\n                \"records\": records,\n            }\n        params = {\n            \"name\": self.name,\n            \"type\": self.type,\n            \"body\": body,\n        }\n        return self.XMLBody % params\n\n    def to_print(self):\n        if self.alias_hosted_zone_id != None and self.alias_dns_name != None:\n            # Show alias\n            return 'ALIAS ' + self.alias_hosted_zone_id + ' ' + self.alias_dns_name\n        else:\n            # Show resource record(s)\n            return \",\".join(self.resource_records)\n\n    def endElement(self, name, value, connection):\n        if name == 'Name':\n            self.name = value\n        elif name == 'Type':\n            self.type = value\n        elif name == 'TTL':\n            self.ttl = value\n        elif name == 'Value':\n            self.resource_records.append(value)\n        elif name == 'HostedZoneId':\n            self.alias_hosted_zone_id = value\n        elif name == 'DNSName':\n            self.alias_dns_name = value\n\n    def startElement(self, name, attrs, connection):\n        return None\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/s3/__init__.py",
    "content": "# Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/\n# Copyright (c) 2010, Eucalyptus Systems, Inc.\n# All rights reserved.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n#\n\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/s3/acl.py",
    "content": "# Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nfrom boto.s3.user import User\n\n\nCannedACLStrings = ['private', 'public-read',\n                    'public-read-write', 'authenticated-read',\n                    'bucket-owner-read', 'bucket-owner-full-control']\n\n\nclass Policy:\n\n    def __init__(self, parent=None):\n        self.parent = parent\n        self.acl = None\n\n    def __repr__(self):\n        grants = []\n        for g in self.acl.grants:\n            if g.id == self.owner.id:\n                grants.append(\"%s (owner) = %s\" % (g.display_name, g.permission))\n            else:\n                if g.type == 'CanonicalUser':\n                    u = g.display_name\n                elif g.type == 'Group':\n                    u = g.uri\n                else:\n                    u = g.email_address\n                grants.append(\"%s = %s\" % (u, g.permission))\n        return \"<Policy: %s>\" % \", \".join(grants)\n\n    def startElement(self, name, attrs, connection):\n        if name == 'Owner':\n            self.owner = User(self)\n            return self.owner\n        elif name == 'AccessControlList':\n            self.acl = ACL(self)\n            return self.acl\n        else:\n            return None\n\n    def endElement(self, name, value, connection):\n        if name == 'Owner':\n            pass\n        elif name == 'AccessControlList':\n            pass\n        else:\n            setattr(self, name, value)\n\n    def to_xml(self):\n        s = '<AccessControlPolicy>'\n        s += self.owner.to_xml()\n        s += self.acl.to_xml()\n        s += '</AccessControlPolicy>'\n        return s\n\nclass ACL:\n\n    def __init__(self, policy=None):\n        self.policy = policy\n        self.grants = []\n\n    def add_grant(self, grant):\n        self.grants.append(grant)\n\n    def add_email_grant(self, permission, email_address):\n        grant = Grant(permission=permission, type='AmazonCustomerByEmail',\n                      email_address=email_address)\n        self.grants.append(grant)\n\n    def add_user_grant(self, permission, user_id, display_name=None):\n        grant = Grant(permission=permission, type='CanonicalUser', id=user_id, display_name=display_name)\n        self.grants.append(grant)\n\n    def startElement(self, name, attrs, connection):\n        if name == 'Grant':\n            self.grants.append(Grant(self))\n            return self.grants[-1]\n        else:\n            return None\n\n    def endElement(self, name, value, connection):\n        if name == 'Grant':\n            pass\n        else:\n            setattr(self, name, value)\n\n    def to_xml(self):\n        s = '<AccessControlList>'\n        for grant in self.grants:\n            s += grant.to_xml()\n        s += '</AccessControlList>'\n        return s\n        \nclass Grant:\n\n    NameSpace = 'xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"'\n\n    def __init__(self, permission=None, type=None, id=None,\n                 display_name=None, uri=None, email_address=None):\n        self.permission = permission\n        self.id = id\n        self.display_name = display_name\n        self.uri = uri\n        self.email_address = email_address\n        self.type = type\n\n    def startElement(self, name, attrs, connection):\n        if name == 'Grantee':\n            self.type = attrs['xsi:type']\n        return None\n\n    def endElement(self, name, value, connection):\n        if name == 'ID':\n            self.id = value\n        elif name == 'DisplayName':\n            self.display_name = value\n        elif name == 'URI':\n            self.uri = value\n        elif name == 'EmailAddress':\n            self.email_address = value\n        elif name == 'Grantee':\n            pass\n        elif name == 'Permission':\n            self.permission = value\n        else:\n            setattr(self, name, value)\n\n    def to_xml(self):\n        s = '<Grant>'\n        s += '<Grantee %s xsi:type=\"%s\">' % (self.NameSpace, self.type)\n        if self.type == 'CanonicalUser':\n            s += '<ID>%s</ID>' % self.id\n            s += '<DisplayName>%s</DisplayName>' % self.display_name\n        elif self.type == 'Group':\n            s += '<URI>%s</URI>' % self.uri\n        else:\n            s += '<EmailAddress>%s</EmailAddress>' % self.email_address\n        s += '</Grantee>'\n        s += '<Permission>%s</Permission>' % self.permission\n        s += '</Grant>'\n        return s\n        \n            \n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/s3/bucket.py",
    "content": "# Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/\n# Copyright (c) 2010, Eucalyptus Systems, Inc.\n# All rights reserved.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nimport boto\nfrom boto import handler\nfrom boto.resultset import ResultSet\nfrom boto.s3.acl import Policy, CannedACLStrings, Grant\nfrom boto.s3.key import Key\nfrom boto.s3.prefix import Prefix\nfrom boto.s3.deletemarker import DeleteMarker\nfrom boto.s3.multipart import MultiPartUpload\nfrom boto.s3.multipart import CompleteMultiPartUpload\nfrom boto.s3.bucketlistresultset import BucketListResultSet\nfrom boto.s3.bucketlistresultset import VersionedBucketListResultSet\nfrom boto.s3.bucketlistresultset import MultiPartUploadListResultSet\nimport boto.jsonresponse\nimport boto.utils\nimport xml.sax\nimport urllib\nimport re\nfrom collections import defaultdict\n\n# as per http://goo.gl/BDuud (02/19/2011)\nclass S3WebsiteEndpointTranslate:\n    trans_region = defaultdict(lambda :'s3-website-us-east-1')\n\n    trans_region['EU'] = 's3-website-eu-west-1'\n    trans_region['us-west-1'] = 's3-website-us-west-1'\n    trans_region['ap-northeast-1'] = 's3-website-ap-northeast-1'\n    trans_region['ap-southeast-1'] = 's3-website-ap-southeast-1'\n\n    @classmethod\n    def translate_region(self, reg):\n        return self.trans_region[reg]\n\nS3Permissions = ['READ', 'WRITE', 'READ_ACP', 'WRITE_ACP', 'FULL_CONTROL']\n\nclass Bucket(object):\n\n    BucketLoggingBody = \"\"\"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n       <BucketLoggingStatus xmlns=\"http://s3.amazonaws.com/doc/2006-03-01/\">\n         <LoggingEnabled>\n           <TargetBucket>%s</TargetBucket>\n           <TargetPrefix>%s</TargetPrefix>\n         </LoggingEnabled>\n       </BucketLoggingStatus>\"\"\"\n    \n    EmptyBucketLoggingBody = \"\"\"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n       <BucketLoggingStatus xmlns=\"http://s3.amazonaws.com/doc/2006-03-01/\">\n       </BucketLoggingStatus>\"\"\"\n\n    LoggingGroup = 'http://acs.amazonaws.com/groups/s3/LogDelivery'\n\n    BucketPaymentBody = \"\"\"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n       <RequestPaymentConfiguration xmlns=\"http://s3.amazonaws.com/doc/2006-03-01/\">\n         <Payer>%s</Payer>\n       </RequestPaymentConfiguration>\"\"\"\n\n    VersioningBody = \"\"\"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n       <VersioningConfiguration xmlns=\"http://s3.amazonaws.com/doc/2006-03-01/\">\n         <Status>%s</Status>\n         <MfaDelete>%s</MfaDelete>\n       </VersioningConfiguration>\"\"\"\n\n    WebsiteBody = \"\"\"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n      <WebsiteConfiguration xmlns=\"http://s3.amazonaws.com/doc/2006-03-01/\">\n        <IndexDocument><Suffix>%s</Suffix></IndexDocument>\n        %s\n      </WebsiteConfiguration>\"\"\"\n\n    WebsiteErrorFragment = \"\"\"<ErrorDocument><Key>%s</Key></ErrorDocument>\"\"\"\n\n    VersionRE = '<Status>([A-Za-z]+)</Status>'\n    MFADeleteRE = '<MfaDelete>([A-Za-z]+)</MfaDelete>'\n\n    def __init__(self, connection=None, name=None, key_class=Key):\n        self.name = name\n        self.connection = connection\n        self.key_class = key_class\n\n    def __repr__(self):\n        return '<Bucket: %s>' % self.name\n\n    def __iter__(self):\n        return iter(BucketListResultSet(self))\n\n    def __contains__(self, key_name):\n        return not (self.get_key(key_name) is None)\n\n    def startElement(self, name, attrs, connection):\n        return None\n\n    def endElement(self, name, value, connection):\n        if name == 'Name':\n            self.name = value\n        elif name == 'CreationDate':\n            self.creation_date = value\n        else:\n            setattr(self, name, value)\n\n    def set_key_class(self, key_class):\n        \"\"\"\n        Set the Key class associated with this bucket.  By default, this\n        would be the boto.s3.key.Key class but if you want to subclass that\n        for some reason this allows you to associate your new class with a\n        bucket so that when you call bucket.new_key() or when you get a listing\n        of keys in the bucket you will get an instances of your key class\n        rather than the default.\n        \n        :type key_class: class\n        :param key_class: A subclass of Key that can be more specific\n        \"\"\"\n        self.key_class = key_class\n\n    def lookup(self, key_name, headers=None):\n        \"\"\"\n        Deprecated: Please use get_key method.\n        \n        :type key_name: string\n        :param key_name: The name of the key to retrieve\n        \n        :rtype: :class:`boto.s3.key.Key`\n        :returns: A Key object from this bucket.\n        \"\"\"\n        return self.get_key(key_name, headers=headers)\n        \n    def get_key(self, key_name, headers=None, version_id=None):\n        \"\"\"\n        Check to see if a particular key exists within the bucket.  This\n        method uses a HEAD request to check for the existance of the key.\n        Returns: An instance of a Key object or None\n        \n        :type key_name: string\n        :param key_name: The name of the key to retrieve\n        \n        :rtype: :class:`boto.s3.key.Key`\n        :returns: A Key object from this bucket.\n        \"\"\"\n        if version_id:\n            query_args = 'versionId=%s' % version_id\n        else:\n            query_args = None\n        response = self.connection.make_request('HEAD', self.name, key_name,\n                                                headers=headers,\n                                                query_args=query_args)\n        # Allow any success status (2xx) - for example this lets us\n        # support Range gets, which return status 206:\n        if response.status/100 == 2:\n            response.read()\n            k = self.key_class(self)\n            provider = self.connection.provider\n            k.metadata = boto.utils.get_aws_metadata(response.msg, provider)\n            k.etag = response.getheader('etag')\n            k.content_type = response.getheader('content-type')\n            k.content_encoding = response.getheader('content-encoding')\n            k.last_modified = response.getheader('last-modified')\n            # the following machinations are a workaround to the fact that\n            # apache/fastcgi omits the content-length header on HEAD\n            # requests when the content-length is zero.\n            # See http://goo.gl/0Tdax for more details.\n            clen = response.getheader('content-length')\n            if clen:\n                k.size = int(response.getheader('content-length'))\n            else:\n                k.size = 0\n            k.cache_control = response.getheader('cache-control')\n            k.name = key_name\n            k.handle_version_headers(response)\n            k.handle_encryption_headers(response)\n            return k\n        else:\n            if response.status == 404:\n                response.read()\n                return None\n            else:\n                raise self.connection.provider.storage_response_error(\n                    response.status, response.reason, '')\n\n    def list(self, prefix='', delimiter='', marker='', headers=None):\n        \"\"\"\n        List key objects within a bucket.  This returns an instance of an\n        BucketListResultSet that automatically handles all of the result\n        paging, etc. from S3.  You just need to keep iterating until\n        there are no more results.\n        \n        Called with no arguments, this will return an iterator object across\n        all keys within the bucket.\n\n        The Key objects returned by the iterator are obtained by parsing\n        the results of a GET on the bucket, also known as the List Objects\n        request.  The XML returned by this request contains only a subset\n        of the information about each key.  Certain metadata fields such\n        as Content-Type and user metadata are not available in the XML.\n        Therefore, if you want these additional metadata fields you will\n        have to do a HEAD request on the Key in the bucket.\n        \n        :type prefix: string\n        :param prefix: allows you to limit the listing to a particular\n                        prefix.  For example, if you call the method with\n                        prefix='/foo/' then the iterator will only cycle\n                        through the keys that begin with the string '/foo/'.\n                        \n        :type delimiter: string\n        :param delimiter: can be used in conjunction with the prefix\n                        to allow you to organize and browse your keys\n                        hierarchically. See:\n                        http://docs.amazonwebservices.com/AmazonS3/2006-03-01/\n                        for more details.\n                        \n        :type marker: string\n        :param marker: The \"marker\" of where you are in the result set\n        \n        :rtype: :class:`boto.s3.bucketlistresultset.BucketListResultSet`\n        :return: an instance of a BucketListResultSet that handles paging, etc\n        \"\"\"\n        return BucketListResultSet(self, prefix, delimiter, marker, headers)\n\n    def list_versions(self, prefix='', delimiter='', key_marker='',\n                      version_id_marker='', headers=None):\n        \"\"\"\n        List version objects within a bucket.  This returns an instance of an\n        VersionedBucketListResultSet that automatically handles all of the result\n        paging, etc. from S3.  You just need to keep iterating until\n        there are no more results.\n        Called with no arguments, this will return an iterator object across\n        all keys within the bucket.\n        \n        :type prefix: string\n        :param prefix: allows you to limit the listing to a particular\n                        prefix.  For example, if you call the method with\n                        prefix='/foo/' then the iterator will only cycle\n                        through the keys that begin with the string '/foo/'.\n                        \n        :type delimiter: string\n        :param delimiter: can be used in conjunction with the prefix\n                        to allow you to organize and browse your keys\n                        hierarchically. See:\n                        http://docs.amazonwebservices.com/AmazonS3/2006-03-01/\n                        for more details.\n                        \n        :type marker: string\n        :param marker: The \"marker\" of where you are in the result set\n        \n        :rtype: :class:`boto.s3.bucketlistresultset.BucketListResultSet`\n        :return: an instance of a BucketListResultSet that handles paging, etc\n        \"\"\"\n        return VersionedBucketListResultSet(self, prefix, delimiter, key_marker,\n                                            version_id_marker, headers)\n\n    def list_multipart_uploads(self, key_marker='',\n                               upload_id_marker='',\n                               headers=None):\n        \"\"\"\n        List multipart upload objects within a bucket.  This returns an\n        instance of an MultiPartUploadListResultSet that automatically\n        handles all of the result paging, etc. from S3.  You just need\n        to keep iterating until there are no more results.\n        \n        :type marker: string\n        :param marker: The \"marker\" of where you are in the result set\n        \n        :rtype: :class:`boto.s3.bucketlistresultset.BucketListResultSet`\n        :return: an instance of a BucketListResultSet that handles paging, etc\n        \"\"\"\n        return MultiPartUploadListResultSet(self, key_marker,\n                                            upload_id_marker,\n                                            headers)\n\n    def _get_all(self, element_map, initial_query_string='',\n                 headers=None, **params):\n        l = []\n        for k, v in params.items():\n            k = k.replace('_', '-')\n            if  k == 'maxkeys':\n                k = 'max-keys'\n            if isinstance(v, unicode):\n                v = v.encode('utf-8')\n            if v is not None and v != '':\n                l.append('%s=%s' % (urllib.quote(k), urllib.quote(str(v))))\n        if len(l):\n            s = initial_query_string + '&' + '&'.join(l)\n        else:\n            s = initial_query_string\n        response = self.connection.make_request('GET', self.name,\n                                                headers=headers,\n                                                query_args=s)\n        body = response.read()\n        boto.log.debug(body)\n        if response.status == 200:\n            rs = ResultSet(element_map)\n            h = handler.XmlHandler(rs, self)\n            xml.sax.parseString(body, h)\n            return rs\n        else:\n            raise self.connection.provider.storage_response_error(\n                response.status, response.reason, body)\n\n    def get_all_keys(self, headers=None, **params):\n        \"\"\"\n        A lower-level method for listing contents of a bucket.\n        This closely models the actual S3 API and requires you to manually\n        handle the paging of results.  For a higher-level method\n        that handles the details of paging for you, you can use the list method.\n        \n        :type max_keys: int\n        :param max_keys: The maximum number of keys to retrieve\n        \n        :type prefix: string\n        :param prefix: The prefix of the keys you want to retrieve\n        \n        :type marker: string\n        :param marker: The \"marker\" of where you are in the result set\n        \n        :type delimiter: string \n        :param delimiter: If this optional, Unicode string parameter\n                          is included with your request, then keys that\n                          contain the same string between the prefix and\n                          the first occurrence of the delimiter will be\n                          rolled up into a single result element in the\n                          CommonPrefixes collection. These rolled-up keys\n                          are not returned elsewhere in the response.\n\n        :rtype: ResultSet\n        :return: The result from S3 listing the keys requested\n        \n        \"\"\"\n        return self._get_all([('Contents', self.key_class),\n                              ('CommonPrefixes', Prefix)],\n                             '', headers, **params)\n\n    def get_all_versions(self, headers=None, **params):\n        \"\"\"\n        A lower-level, version-aware method for listing contents of a bucket.\n        This closely models the actual S3 API and requires you to manually\n        handle the paging of results.  For a higher-level method\n        that handles the details of paging for you, you can use the list method.\n        \n        :type max_keys: int\n        :param max_keys: The maximum number of keys to retrieve\n        \n        :type prefix: string\n        :param prefix: The prefix of the keys you want to retrieve\n        \n        :type key_marker: string\n        :param key_marker: The \"marker\" of where you are in the result set\n                           with respect to keys.\n        \n        :type version_id_marker: string\n        :param version_id_marker: The \"marker\" of where you are in the result\n                                  set with respect to version-id's.\n        \n        :type delimiter: string \n        :param delimiter: If this optional, Unicode string parameter\n                          is included with your request, then keys that\n                          contain the same string between the prefix and\n                          the first occurrence of the delimiter will be\n                          rolled up into a single result element in the\n                          CommonPrefixes collection. These rolled-up keys\n                          are not returned elsewhere in the response.\n\n        :rtype: ResultSet\n        :return: The result from S3 listing the keys requested\n        \n        \"\"\"\n        return self._get_all([('Version', self.key_class),\n                              ('CommonPrefixes', Prefix),\n                              ('DeleteMarker', DeleteMarker)],\n                             'versions', headers, **params)\n\n    def get_all_multipart_uploads(self, headers=None, **params):\n        \"\"\"\n        A lower-level, version-aware method for listing active\n        MultiPart uploads for a bucket.  This closely models the\n        actual S3 API and requires you to manually handle the paging\n        of results.  For a higher-level method that handles the\n        details of paging for you, you can use the list method.\n        \n        :type max_uploads: int\n        :param max_uploads: The maximum number of uploads to retrieve.\n                            Default value is 1000.\n        \n        :type key_marker: string\n        :param key_marker: Together with upload_id_marker, this parameter\n                           specifies the multipart upload after which listing\n                           should begin.  If upload_id_marker is not specified,\n                           only the keys lexicographically greater than the\n                           specified key_marker will be included in the list.\n\n                           If upload_id_marker is specified, any multipart\n                           uploads for a key equal to the key_marker might\n                           also be included, provided those multipart uploads\n                           have upload IDs lexicographically greater than the\n                           specified upload_id_marker.\n        \n        :type upload_id_marker: string\n        :param upload_id_marker: Together with key-marker, specifies\n                                 the multipart upload after which listing\n                                 should begin. If key_marker is not specified,\n                                 the upload_id_marker parameter is ignored.\n                                 Otherwise, any multipart uploads for a key\n                                 equal to the key_marker might be included\n                                 in the list only if they have an upload ID\n                                 lexicographically greater than the specified\n                                 upload_id_marker.\n\n        \n        :rtype: ResultSet\n        :return: The result from S3 listing the uploads requested\n        \n        \"\"\"\n        return self._get_all([('Upload', MultiPartUpload)],\n                             'uploads', headers, **params)\n\n    def new_key(self, key_name=None):\n        \"\"\"\n        Creates a new key\n        \n        :type key_name: string\n        :param key_name: The name of the key to create\n        \n        :rtype: :class:`boto.s3.key.Key` or subclass\n        :returns: An instance of the newly created key object\n        \"\"\"\n        return self.key_class(self, key_name)\n\n    def generate_url(self, expires_in, method='GET', headers=None,\n                     force_http=False, response_headers=None):\n        return self.connection.generate_url(expires_in, method, self.name,\n                                            headers=headers,\n                                            force_http=force_http,\n                                            response_headers=response_headers)\n\n    def delete_key(self, key_name, headers=None,\n                   version_id=None, mfa_token=None):\n        \"\"\"\n        Deletes a key from the bucket.  If a version_id is provided,\n        only that version of the key will be deleted.\n        \n        :type key_name: string\n        :param key_name: The key name to delete\n\n        :type version_id: string\n        :param version_id: The version ID (optional)\n        \n        :type mfa_token: tuple or list of strings\n        :param mfa_token: A tuple or list consisting of the serial number\n                          from the MFA device and the current value of\n                          the six-digit token associated with the device.\n                          This value is required anytime you are\n                          deleting versioned objects from a bucket\n                          that has the MFADelete option on the bucket.\n        \"\"\"\n        provider = self.connection.provider\n        if version_id:\n            query_args = 'versionId=%s' % version_id\n        else:\n            query_args = None\n        if mfa_token:\n            if not headers:\n                headers = {}\n            headers[provider.mfa_header] = ' '.join(mfa_token)\n        response = self.connection.make_request('DELETE', self.name, key_name,\n                                                headers=headers,\n                                                query_args=query_args)\n        body = response.read()\n        if response.status != 204:\n            raise provider.storage_response_error(response.status,\n                                                  response.reason, body)\n\n    def copy_key(self, new_key_name, src_bucket_name,\n                 src_key_name, metadata=None, src_version_id=None,\n                 storage_class='STANDARD', preserve_acl=False,\n                 encrypt_key=False):\n        \"\"\"\n        Create a new key in the bucket by copying another existing key.\n\n        :type new_key_name: string\n        :param new_key_name: The name of the new key\n\n        :type src_bucket_name: string\n        :param src_bucket_name: The name of the source bucket\n\n        :type src_key_name: string\n        :param src_key_name: The name of the source key\n\n        :type src_version_id: string\n        :param src_version_id: The version id for the key.  This param\n                               is optional.  If not specified, the newest\n                               version of the key will be copied.\n\n        :type metadata: dict\n        :param metadata: Metadata to be associated with new key.\n                         If metadata is supplied, it will replace the\n                         metadata of the source key being copied.\n                         If no metadata is supplied, the source key's\n                         metadata will be copied to the new key.\n\n        :type storage_class: string\n        :param storage_class: The storage class of the new key.\n                              By default, the new key will use the\n                              standard storage class.  Possible values are:\n                              STANDARD | REDUCED_REDUNDANCY\n\n        :type preserve_acl: bool\n        :param preserve_acl: If True, the ACL from the source key\n                             will be copied to the destination\n                             key.  If False, the destination key\n                             will have the default ACL.\n                             Note that preserving the ACL in the\n                             new key object will require two\n                             additional API calls to S3, one to\n                             retrieve the current ACL and one to\n                             set that ACL on the new object.  If\n                             you don't care about the ACL, a value\n                             of False will be significantly more\n                             efficient.\n\n        :type encrypt_key: bool\n        :param encrypt_key: If True, the new copy of the object will\n                            be encrypted on the server-side by S3 and\n                            will be stored in an encrypted form while\n                            at rest in S3.\n\n        :rtype: :class:`boto.s3.key.Key` or subclass\n        :returns: An instance of the newly created key object\n        \"\"\"\n        headers = {}\n        provider = self.connection.provider\n        src_key_name = boto.utils.get_utf8_value(src_key_name)\n        if preserve_acl:\n            if self.name == src_bucket_name:\n                src_bucket = self\n            else:\n                src_bucket = self.connection.get_bucket(src_bucket_name)\n            acl = src_bucket.get_xml_acl(src_key_name)\n        if encrypt_key:\n            headers[provider.server_side_encryption_header] = 'AES256'\n        src = '%s/%s' % (src_bucket_name, urllib.quote(src_key_name))\n        if src_version_id:\n            src += '?version_id=%s' % src_version_id\n        headers = {provider.copy_source_header : str(src)}\n        headers[provider.storage_class_header] = storage_class\n        if metadata:\n            headers[provider.metadata_directive_header] = 'REPLACE'\n            headers = boto.utils.merge_meta(headers, metadata, provider)\n        else:\n            headers[provider.metadata_directive_header] = 'COPY'\n        response = self.connection.make_request('PUT', self.name, new_key_name,\n                                                headers=headers)\n        body = response.read()\n        if response.status == 200:\n            key = self.new_key(new_key_name)\n            h = handler.XmlHandler(key, self)\n            xml.sax.parseString(body, h)\n            if hasattr(key, 'Error'):\n                raise provider.storage_copy_error(key.Code, key.Message, body)\n            key.handle_version_headers(response)\n            if preserve_acl:\n                self.set_xml_acl(acl, new_key_name)\n            return key\n        else:\n            raise provider.storage_response_error(response.status,\n                                                  response.reason, body)\n\n    def set_canned_acl(self, acl_str, key_name='', headers=None,\n                       version_id=None):\n        assert acl_str in CannedACLStrings\n\n        if headers:\n            headers[self.connection.provider.acl_header] = acl_str\n        else:\n            headers={self.connection.provider.acl_header: acl_str}\n\n        query_args = 'acl'\n        if version_id:\n            query_args += '&versionId=%s' % version_id\n        response = self.connection.make_request('PUT', self.name, key_name,\n                headers=headers, query_args=query_args)\n        body = response.read()\n        if response.status != 200:\n            raise self.connection.provider.storage_response_error(\n                response.status, response.reason, body)\n\n    def get_xml_acl(self, key_name='', headers=None, version_id=None):\n        query_args = 'acl'\n        if version_id:\n            query_args += '&versionId=%s' % version_id\n        response = self.connection.make_request('GET', self.name, key_name,\n                                                query_args=query_args,\n                                                headers=headers)\n        body = response.read()\n        if response.status != 200:\n            raise self.connection.provider.storage_response_error(\n                response.status, response.reason, body)\n        return body\n\n    def set_xml_acl(self, acl_str, key_name='', headers=None, version_id=None):\n        query_args = 'acl'\n        if version_id:\n            query_args += '&versionId=%s' % version_id\n        response = self.connection.make_request('PUT', self.name, key_name,\n                                                data=acl_str.encode('ISO-8859-1'),\n                                                query_args=query_args,\n                                                headers=headers)\n        body = response.read()\n        if response.status != 200:\n            raise self.connection.provider.storage_response_error(\n                response.status, response.reason, body)\n\n    def set_acl(self, acl_or_str, key_name='', headers=None, version_id=None):\n        if isinstance(acl_or_str, Policy):\n            self.set_xml_acl(acl_or_str.to_xml(), key_name,\n                             headers, version_id)\n        else:\n            self.set_canned_acl(acl_or_str, key_name,\n                                headers, version_id)\n\n    def get_acl(self, key_name='', headers=None, version_id=None):\n        query_args = 'acl'\n        if version_id:\n            query_args += '&versionId=%s' % version_id\n        response = self.connection.make_request('GET', self.name, key_name,\n                                                query_args=query_args,\n                                                headers=headers)\n        body = response.read()\n        if response.status == 200:\n            policy = Policy(self)\n            h = handler.XmlHandler(policy, self)\n            xml.sax.parseString(body, h)\n            return policy\n        else:\n            raise self.connection.provider.storage_response_error(\n                response.status, response.reason, body)\n\n    def set_subresource(self, subresource, value, key_name = '', headers=None,\n                        version_id=None):\n        \"\"\"\n        Set a subresource for a bucket or key.\n\n        :type subresource: string\n        :param subresource: The subresource to set.\n\n        :type value: string\n        :param value: The value of the subresource.\n\n        :type key_name: string\n        :param key_name: The key to operate on, or None to operate on the\n                         bucket.\n\n        :type headers: dict\n        :param headers: Additional HTTP headers to include in the request.\n\n        :type src_version_id: string\n        :param src_version_id: Optional. The version id of the key to operate\n                               on. If not specified, operate on the newest\n                               version.\n        \"\"\"\n        if not subresource:\n            raise TypeError('set_subresource called with subresource=None')\n        query_args = subresource\n        if version_id:\n            query_args += '&versionId=%s' % version_id\n        response = self.connection.make_request('PUT', self.name, key_name,\n                                                data=value.encode('UTF-8'),\n                                                query_args=query_args,\n                                                headers=headers)\n        body = response.read()\n        if response.status != 200:\n            raise self.connection.provider.storage_response_error(\n                response.status, response.reason, body)\n\n    def get_subresource(self, subresource, key_name='', headers=None,\n                        version_id=None):\n        \"\"\"\n        Get a subresource for a bucket or key.\n\n        :type subresource: string\n        :param subresource: The subresource to get.\n\n        :type key_name: string\n        :param key_name: The key to operate on, or None to operate on the\n                         bucket.\n\n        :type headers: dict\n        :param headers: Additional HTTP headers to include in the request.\n\n        :type src_version_id: string\n        :param src_version_id: Optional. The version id of the key to operate\n                               on. If not specified, operate on the newest\n                               version.\n\n        :rtype: string\n        :returns: The value of the subresource.\n        \"\"\"\n        if not subresource:\n            raise TypeError('get_subresource called with subresource=None')\n        query_args = subresource\n        if version_id:\n            query_args += '&versionId=%s' % version_id\n        response = self.connection.make_request('GET', self.name, key_name,\n                                                query_args=query_args,\n                                                headers=headers)\n        body = response.read()\n        if response.status != 200:\n            raise self.connection.provider.storage_response_error(\n                response.status, response.reason, body)\n        return body\n\n    def make_public(self, recursive=False, headers=None):\n        self.set_canned_acl('public-read', headers=headers)\n        if recursive:\n            for key in self:\n                self.set_canned_acl('public-read', key.name, headers=headers)\n\n    def add_email_grant(self, permission, email_address,\n                        recursive=False, headers=None):\n        \"\"\"\n        Convenience method that provides a quick way to add an email grant\n        to a bucket. This method retrieves the current ACL, creates a new\n        grant based on the parameters passed in, adds that grant to the ACL\n        and then PUT's the new ACL back to S3.\n        \n        :type permission: string\n        :param permission: The permission being granted. Should be one of:\n                           (READ, WRITE, READ_ACP, WRITE_ACP, FULL_CONTROL).\n        \n        :type email_address: string\n        :param email_address: The email address associated with the AWS\n                              account your are granting the permission to.\n        \n        :type recursive: boolean\n        :param recursive: A boolean value to controls whether the command\n                          will apply the grant to all keys within the bucket\n                          or not.  The default value is False.  By passing a\n                          True value, the call will iterate through all keys\n                          in the bucket and apply the same grant to each key.\n                          CAUTION: If you have a lot of keys, this could take\n                          a long time!\n        \"\"\"\n        if permission not in S3Permissions:\n            raise self.connection.provider.storage_permissions_error(\n                'Unknown Permission: %s' % permission)\n        policy = self.get_acl(headers=headers)\n        policy.acl.add_email_grant(permission, email_address)\n        self.set_acl(policy, headers=headers)\n        if recursive:\n            for key in self:\n                key.add_email_grant(permission, email_address, headers=headers)\n\n    def add_user_grant(self, permission, user_id, recursive=False,\n                       headers=None, display_name=None):\n        \"\"\"\n        Convenience method that provides a quick way to add a canonical\n        user grant to a bucket.  This method retrieves the current ACL,\n        creates a new grant based on the parameters passed in, adds that\n        grant to the ACL and then PUT's the new ACL back to S3.\n        \n        :type permission: string\n        :param permission: The permission being granted. Should be one of:\n                           (READ, WRITE, READ_ACP, WRITE_ACP, FULL_CONTROL).\n        \n        :type user_id: string\n        :param user_id:     The canonical user id associated with the AWS\n                            account your are granting the permission to.\n                            \n        :type recursive: boolean\n        :param recursive: A boolean value to controls whether the command\n                          will apply the grant to all keys within the bucket\n                          or not.  The default value is False.  By passing a\n                          True value, the call will iterate through all keys\n                          in the bucket and apply the same grant to each key.\n                          CAUTION: If you have a lot of keys, this could take\n                          a long time!\n                          \n        :type display_name: string\n        :param display_name: An option string containing the user's\n                             Display Name.  Only required on Walrus.\n        \"\"\"\n        if permission not in S3Permissions:\n            raise self.connection.provider.storage_permissions_error(\n                'Unknown Permission: %s' % permission)\n        policy = self.get_acl(headers=headers)\n        policy.acl.add_user_grant(permission, user_id,\n                                  display_name=display_name)\n        self.set_acl(policy, headers=headers)\n        if recursive:\n            for key in self:\n                key.add_user_grant(permission, user_id, headers=headers,\n                                   display_name=display_name)\n\n    def list_grants(self, headers=None):\n        policy = self.get_acl(headers=headers)\n        return policy.acl.grants\n\n    def get_location(self):\n        \"\"\"\n        Returns the LocationConstraint for the bucket.\n\n        :rtype: str\n        :return: The LocationConstraint for the bucket or the empty\n                 string if no constraint was specified when bucket\n                 was created.\n        \"\"\"\n        response = self.connection.make_request('GET', self.name,\n                                                query_args='location')\n        body = response.read()\n        if response.status == 200:\n            rs = ResultSet(self)\n            h = handler.XmlHandler(rs, self)\n            xml.sax.parseString(body, h)\n            return rs.LocationConstraint\n        else:\n            raise self.connection.provider.storage_response_error(\n                response.status, response.reason, body)\n\n    def enable_logging(self, target_bucket, target_prefix='', headers=None):\n        if isinstance(target_bucket, Bucket):\n            target_bucket = target_bucket.name\n        body = self.BucketLoggingBody % (target_bucket, target_prefix)\n        response = self.connection.make_request('PUT', self.name, data=body,\n                query_args='logging', headers=headers)\n        body = response.read()\n        if response.status == 200:\n            return True\n        else:\n            raise self.connection.provider.storage_response_error(\n                response.status, response.reason, body)\n        \n    def disable_logging(self, headers=None):\n        body = self.EmptyBucketLoggingBody\n        response = self.connection.make_request('PUT', self.name, data=body,\n                query_args='logging', headers=headers)\n        body = response.read()\n        if response.status == 200:\n            return True\n        else:\n            raise self.connection.provider.storage_response_error(\n                response.status, response.reason, body)\n\n    def get_logging_status(self, headers=None):\n        response = self.connection.make_request('GET', self.name,\n                query_args='logging', headers=headers)\n        body = response.read()\n        if response.status == 200:\n            return body\n        else:\n            raise self.connection.provider.storage_response_error(\n                response.status, response.reason, body)\n\n    def set_as_logging_target(self, headers=None):\n        policy = self.get_acl(headers=headers)\n        g1 = Grant(permission='WRITE', type='Group', uri=self.LoggingGroup)\n        g2 = Grant(permission='READ_ACP', type='Group', uri=self.LoggingGroup)\n        policy.acl.add_grant(g1)\n        policy.acl.add_grant(g2)\n        self.set_acl(policy, headers=headers)\n\n    def get_request_payment(self, headers=None):\n        response = self.connection.make_request('GET', self.name,\n                query_args='requestPayment', headers=headers)\n        body = response.read()\n        if response.status == 200:\n            return body\n        else:\n            raise self.connection.provider.storage_response_error(\n                response.status, response.reason, body)\n\n    def set_request_payment(self, payer='BucketOwner', headers=None):\n        body = self.BucketPaymentBody % payer\n        response = self.connection.make_request('PUT', self.name, data=body,\n                query_args='requestPayment', headers=headers)\n        body = response.read()\n        if response.status == 200:\n            return True\n        else:\n            raise self.connection.provider.storage_response_error(\n                response.status, response.reason, body)\n        \n    def configure_versioning(self, versioning, mfa_delete=False,\n                             mfa_token=None, headers=None):\n        \"\"\"\n        Configure versioning for this bucket.\n        \n        ..note:: This feature is currently in beta.\n                 \n        :type versioning: bool\n        :param versioning: A boolean indicating whether version is\n                           enabled (True) or disabled (False).\n\n        :type mfa_delete: bool\n        :param mfa_delete: A boolean indicating whether the Multi-Factor\n                           Authentication Delete feature is enabled (True)\n                           or disabled (False).  If mfa_delete is enabled\n                           then all Delete operations will require the\n                           token from your MFA device to be passed in\n                           the request.\n\n        :type mfa_token: tuple or list of strings\n        :param mfa_token: A tuple or list consisting of the serial number\n                          from the MFA device and the current value of\n                          the six-digit token associated with the device.\n                          This value is required when you are changing\n                          the status of the MfaDelete property of\n                          the bucket.\n        \"\"\"\n        if versioning:\n            ver = 'Enabled'\n        else:\n            ver = 'Suspended'\n        if mfa_delete:\n            mfa = 'Enabled'\n        else:\n            mfa = 'Disabled'\n        body = self.VersioningBody % (ver, mfa)\n        if mfa_token:\n            if not headers:\n                headers = {}\n            provider = self.connection.provider\n            headers[provider.mfa_header] = ' '.join(mfa_token)\n        response = self.connection.make_request('PUT', self.name, data=body,\n                query_args='versioning', headers=headers)\n        body = response.read()\n        if response.status == 200:\n            return True\n        else:\n            raise self.connection.provider.storage_response_error(\n                response.status, response.reason, body)\n        \n    def get_versioning_status(self, headers=None):\n        \"\"\"\n        Returns the current status of versioning on the bucket.\n\n        :rtype: dict\n        :returns: A dictionary containing a key named 'Versioning'\n                  that can have a value of either Enabled, Disabled,\n                  or Suspended. Also, if MFADelete has ever been enabled\n                  on the bucket, the dictionary will contain a key\n                  named 'MFADelete' which will have a value of either\n                  Enabled or Suspended.\n        \"\"\"\n        response = self.connection.make_request('GET', self.name,\n                query_args='versioning', headers=headers)\n        body = response.read()\n        boto.log.debug(body)\n        if response.status == 200:\n            d = {}\n            ver = re.search(self.VersionRE, body)\n            if ver:\n                d['Versioning'] = ver.group(1)\n            mfa = re.search(self.MFADeleteRE, body)\n            if mfa:\n                d['MfaDelete'] = mfa.group(1)\n            return d\n        else:\n            raise self.connection.provider.storage_response_error(\n                response.status, response.reason, body)\n\n    def configure_website(self, suffix, error_key='', headers=None):\n        \"\"\"\n        Configure this bucket to act as a website\n\n        :type suffix: str\n        :param suffix: Suffix that is appended to a request that is for a\n                       \"directory\" on the website endpoint (e.g. if the suffix\n                       is index.html and you make a request to\n                       samplebucket/images/ the data that is returned will\n                       be for the object with the key name images/index.html).\n                       The suffix must not be empty and must not include a\n                       slash character.\n\n        :type error_key: str\n        :param error_key: The object key name to use when a 4XX class\n                          error occurs.  This is optional.\n\n        \"\"\"\n        if error_key:\n            error_frag = self.WebsiteErrorFragment % error_key\n        else:\n            error_frag = ''\n        body = self.WebsiteBody % (suffix, error_frag)\n        response = self.connection.make_request('PUT', self.name, data=body,\n                                                query_args='website',\n                                                headers=headers)\n        body = response.read()\n        if response.status == 200:\n            return True\n        else:\n            raise self.connection.provider.storage_response_error(\n                response.status, response.reason, body)\n        \n    def get_website_configuration(self, headers=None):\n        \"\"\"\n        Returns the current status of website configuration on the bucket.\n\n        :rtype: dict\n        :returns: A dictionary containing a Python representation\n                  of the XML response from S3. The overall structure is:\n\n            * WebsiteConfiguration\n    \n              * IndexDocument\n    \n                * Suffix : suffix that is appended to request that\n                is for a \"directory\" on the website endpoint\n                * ErrorDocument\n    \n                  * Key : name of object to serve when an error occurs\n        \"\"\"\n        response = self.connection.make_request('GET', self.name,\n                query_args='website', headers=headers)\n        body = response.read()\n        boto.log.debug(body)\n        if response.status == 200:\n            e = boto.jsonresponse.Element()\n            h = boto.jsonresponse.XmlHandler(e, None)\n            h.parse(body)\n            return e\n        else:\n            raise self.connection.provider.storage_response_error(\n                response.status, response.reason, body)\n\n    def delete_website_configuration(self, headers=None):\n        \"\"\"\n        Removes all website configuration from the bucket.\n        \"\"\"\n        response = self.connection.make_request('DELETE', self.name,\n                query_args='website', headers=headers)\n        body = response.read()\n        boto.log.debug(body)\n        if response.status == 204:\n            return True\n        else:\n            raise self.connection.provider.storage_response_error(\n                response.status, response.reason, body)\n\n    def get_website_endpoint(self):\n        \"\"\"\n        Returns the fully qualified hostname to use is you want to access this\n        bucket as a website.  This doesn't validate whether the bucket has\n        been correctly configured as a website or not.\n        \"\"\"\n        l = [self.name]\n        l.append(S3WebsiteEndpointTranslate.translate_region(self.get_location()))\n        l.append('.'.join(self.connection.host.split('.')[-2:]))\n        return '.'.join(l)\n\n    def get_policy(self, headers=None):\n        response = self.connection.make_request('GET', self.name,\n                query_args='policy', headers=headers)\n        body = response.read()\n        if response.status == 200:\n            return body\n        else:\n            raise self.connection.provider.storage_response_error(\n                response.status, response.reason, body)\n\n    def set_policy(self, policy, headers=None):\n        response = self.connection.make_request('PUT', self.name,\n                                                data=policy,\n                                                query_args='policy',\n                                                headers=headers)\n        body = response.read()\n        if response.status >= 200 and response.status <= 204:\n            return True\n        else:\n            raise self.connection.provider.storage_response_error(\n                response.status, response.reason, body)\n\n    def delete_policy(self, headers=None):\n        response = self.connection.make_request('DELETE', self.name,\n                                                data='/?policy',\n                                                query_args='policy',\n                                                headers=headers)\n        body = response.read()\n        if response.status >= 200 and response.status <= 204:\n            return True\n        else:\n            raise self.connection.provider.storage_response_error(\n                response.status, response.reason, body)\n        \n\n    def initiate_multipart_upload(self, key_name, headers=None,\n                                  reduced_redundancy=False,\n                                  metadata=None, encrypt_key=False):\n        \"\"\"\n        Start a multipart upload operation.\n\n        :type key_name: string\n        :param key_name: The name of the key that will ultimately result from\n                         this multipart upload operation.  This will be exactly\n                         as the key appears in the bucket after the upload\n                         process has been completed.\n\n        :type headers: dict\n        :param headers: Additional HTTP headers to send and store with the\n                        resulting key in S3.\n\n        :type reduced_redundancy: boolean\n        :param reduced_redundancy: In multipart uploads, the storage class is\n                                   specified when initiating the upload,\n                                   not when uploading individual parts.  So\n                                   if you want the resulting key to use the\n                                   reduced redundancy storage class set this\n                                   flag when you initiate the upload.\n\n        :type metadata: dict\n        :param metadata: Any metadata that you would like to set on the key\n                         that results from the multipart upload.\n                         \n        :type encrypt_key: bool\n        :param encrypt_key: If True, the new copy of the object will\n                            be encrypted on the server-side by S3 and\n                            will be stored in an encrypted form while\n                            at rest in S3.\n        \"\"\"\n        query_args = 'uploads'\n        provider = self.connection.provider\n        if headers is None:\n            headers = {}\n        if reduced_redundancy:\n            storage_class_header = provider.storage_class_header\n            if storage_class_header:\n                headers[storage_class_header] = 'REDUCED_REDUNDANCY'\n            # TODO: what if the provider doesn't support reduced redundancy?\n            # (see boto.s3.key.Key.set_contents_from_file)\n        if encrypt_key:\n            headers[provider.server_side_encryption_header] = 'AES256'\n        if metadata is None:\n            metadata = {}\n\n        headers = boto.utils.merge_meta(headers, metadata,\n                self.connection.provider)\n        response = self.connection.make_request('POST', self.name, key_name,\n                                                query_args=query_args,\n                                                headers=headers)\n        body = response.read()\n        boto.log.debug(body)\n        if response.status == 200:\n            resp = MultiPartUpload(self)\n            h = handler.XmlHandler(resp, self)\n            xml.sax.parseString(body, h)\n            return resp\n        else:\n            raise self.connection.provider.storage_response_error(\n                response.status, response.reason, body)\n        \n    def complete_multipart_upload(self, key_name, upload_id,\n                                  xml_body, headers=None):\n        \"\"\"\n        Complete a multipart upload operation.\n        \"\"\"\n        query_args = 'uploadId=%s' % upload_id\n        if headers is None:\n            headers = {}\n        headers['Content-Type'] = 'text/xml'\n        response = self.connection.make_request('POST', self.name, key_name,\n                                                query_args=query_args,\n                                                headers=headers, data=xml_body)\n        contains_error = False\n        body = response.read()\n        # Some errors will be reported in the body of the response\n        # even though the HTTP response code is 200.  This check\n        # does a quick and dirty peek in the body for an error element.\n        if body.find('<Error>') > 0:\n            contains_error = True\n        boto.log.debug(body)\n        if response.status == 200 and not contains_error:\n            resp = CompleteMultiPartUpload(self)\n            h = handler.XmlHandler(resp, self)\n            xml.sax.parseString(body, h)\n            return resp\n        else:\n            raise self.connection.provider.storage_response_error(\n                response.status, response.reason, body)\n        \n    def cancel_multipart_upload(self, key_name, upload_id, headers=None):\n        query_args = 'uploadId=%s' % upload_id\n        response = self.connection.make_request('DELETE', self.name, key_name,\n                                                query_args=query_args,\n                                                headers=headers)\n        body = response.read()\n        boto.log.debug(body)\n        if response.status != 204:\n            raise self.connection.provider.storage_response_error(\n                response.status, response.reason, body)\n        \n    def delete(self, headers=None):\n        return self.connection.delete_bucket(self.name, headers=headers)\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/s3/bucketlistresultset.py",
    "content": "# Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\ndef bucket_lister(bucket, prefix='', delimiter='', marker='', headers=None):\n    \"\"\"\n    A generator function for listing keys in a bucket.\n    \"\"\"\n    more_results = True\n    k = None\n    while more_results:\n        rs = bucket.get_all_keys(prefix=prefix, marker=marker,\n                                 delimiter=delimiter, headers=headers)\n        for k in rs:\n            yield k\n        if k:\n            marker = k.name\n        more_results= rs.is_truncated\n        \nclass BucketListResultSet:\n    \"\"\"\n    A resultset for listing keys within a bucket.  Uses the bucket_lister\n    generator function and implements the iterator interface.  This\n    transparently handles the results paging from S3 so even if you have\n    many thousands of keys within the bucket you can iterate over all\n    keys in a reasonably efficient manner.\n    \"\"\"\n\n    def __init__(self, bucket=None, prefix='', delimiter='', marker='', headers=None):\n        self.bucket = bucket\n        self.prefix = prefix\n        self.delimiter = delimiter\n        self.marker = marker\n        self.headers = headers\n\n    def __iter__(self):\n        return bucket_lister(self.bucket, prefix=self.prefix,\n                             delimiter=self.delimiter, marker=self.marker,\n                             headers=self.headers)\n\ndef versioned_bucket_lister(bucket, prefix='', delimiter='',\n                            key_marker='', version_id_marker='', headers=None):\n    \"\"\"\n    A generator function for listing versions in a bucket.\n    \"\"\"\n    more_results = True\n    k = None\n    while more_results:\n        rs = bucket.get_all_versions(prefix=prefix, key_marker=key_marker,\n                                     version_id_marker=version_id_marker,\n                                     delimiter=delimiter, headers=headers,\n                                     max_keys=999)\n        for k in rs:\n            yield k\n        key_marker = rs.next_key_marker\n        version_id_marker = rs.next_version_id_marker\n        more_results= rs.is_truncated\n        \nclass VersionedBucketListResultSet:\n    \"\"\"\n    A resultset for listing versions within a bucket.  Uses the bucket_lister\n    generator function and implements the iterator interface.  This\n    transparently handles the results paging from S3 so even if you have\n    many thousands of keys within the bucket you can iterate over all\n    keys in a reasonably efficient manner.\n    \"\"\"\n\n    def __init__(self, bucket=None, prefix='', delimiter='', key_marker='',\n                 version_id_marker='', headers=None):\n        self.bucket = bucket\n        self.prefix = prefix\n        self.delimiter = delimiter\n        self.key_marker = key_marker\n        self.version_id_marker = version_id_marker\n        self.headers = headers\n\n    def __iter__(self):\n        return versioned_bucket_lister(self.bucket, prefix=self.prefix,\n                                       delimiter=self.delimiter,\n                                       key_marker=self.key_marker,\n                                       version_id_marker=self.version_id_marker,\n                                       headers=self.headers)\n\ndef multipart_upload_lister(bucket, key_marker='',\n                            upload_id_marker='',\n                            headers=None):\n    \"\"\"\n    A generator function for listing multipart uploads in a bucket.\n    \"\"\"\n    more_results = True\n    k = None\n    while more_results:\n        rs = bucket.get_all_multipart_uploads(key_marker=key_marker,\n                                              upload_id_marker=upload_id_marker,\n                                              headers=headers)\n        for k in rs:\n            yield k\n        key_marker = rs.next_key_marker\n        upload_id_marker = rs.next_upload_id_marker\n        more_results= rs.is_truncated\n        \nclass MultiPartUploadListResultSet:\n    \"\"\"\n    A resultset for listing multipart uploads within a bucket.\n    Uses the multipart_upload_lister generator function and\n    implements the iterator interface.  This\n    transparently handles the results paging from S3 so even if you have\n    many thousands of uploads within the bucket you can iterate over all\n    keys in a reasonably efficient manner.\n    \"\"\"\n    def __init__(self, bucket=None, key_marker='',\n                 upload_id_marker='', headers=None):\n        self.bucket = bucket\n        self.key_marker = key_marker\n        self.upload_id_marker = upload_id_marker\n        self.headers = headers\n\n    def __iter__(self):\n        return multipart_upload_lister(self.bucket,\n                                       key_marker=self.key_marker,\n                                       upload_id_marker=self.upload_id_marker,\n                                       headers=self.headers)\n\n    \n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/s3/connection.py",
    "content": "# Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/\n# Copyright (c) 2010, Eucalyptus Systems, Inc.\n# All rights reserved.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nimport xml.sax\nimport urllib, base64\nimport time\nimport boto.utils\nfrom boto.connection import AWSAuthConnection\nfrom boto import handler\nfrom boto.s3.bucket import Bucket\nfrom boto.s3.key import Key\nfrom boto.resultset import ResultSet\nfrom boto.exception import BotoClientError\n\ndef check_lowercase_bucketname(n):\n    \"\"\"\n    Bucket names must not contain uppercase characters. We check for\n    this by appending a lowercase character and testing with islower().\n    Note this also covers cases like numeric bucket names with dashes.\n        \n    >>> check_lowercase_bucketname(\"Aaaa\")\n    Traceback (most recent call last):\n    ...\n    BotoClientError: S3Error: Bucket names cannot contain upper-case\n    characters when using either the sub-domain or virtual hosting calling\n    format.\n    \n    >>> check_lowercase_bucketname(\"1234-5678-9123\")\n    True\n    >>> check_lowercase_bucketname(\"abcdefg1234\")\n    True\n    \"\"\"\n    if not (n + 'a').islower():\n        raise BotoClientError(\"Bucket names cannot contain upper-case \" \\\n            \"characters when using either the sub-domain or virtual \" \\\n            \"hosting calling format.\")\n    return True\n\ndef assert_case_insensitive(f):\n    def wrapper(*args, **kwargs):\n        if len(args) == 3 and check_lowercase_bucketname(args[2]):\n            pass\n        return f(*args, **kwargs)\n    return wrapper\n\nclass _CallingFormat(object):\n\n    def get_bucket_server(self, server, bucket):\n        return ''\n\n    def build_url_base(self, connection, protocol, server, bucket, key=''):\n        url_base = '%s://' % protocol\n        url_base += self.build_host(server, bucket)\n        url_base += connection.get_path(self.build_path_base(bucket, key))\n        return url_base\n\n    def build_host(self, server, bucket):\n        if bucket == '':\n            return server\n        else:\n            return self.get_bucket_server(server, bucket)\n\n    def build_auth_path(self, bucket, key=''):\n        key = boto.utils.get_utf8_value(key)\n        path = ''\n        if bucket != '':\n            path = '/' + bucket\n        return path + '/%s' % urllib.quote(key)\n\n    def build_path_base(self, bucket, key=''):\n        key = boto.utils.get_utf8_value(key)\n        return '/%s' % urllib.quote(key)\n\nclass SubdomainCallingFormat(_CallingFormat):\n\n    @assert_case_insensitive\n    def get_bucket_server(self, server, bucket):\n        return '%s.%s' % (bucket, server)\n\nclass VHostCallingFormat(_CallingFormat):\n\n    @assert_case_insensitive\n    def get_bucket_server(self, server, bucket):\n        return bucket\n\nclass OrdinaryCallingFormat(_CallingFormat):\n    \n    def get_bucket_server(self, server, bucket):\n        return server\n\n    def build_path_base(self, bucket, key=''):\n        key = boto.utils.get_utf8_value(key)\n        path_base = '/'\n        if bucket:\n            path_base += \"%s/\" % bucket\n        return path_base + urllib.quote(key)\n\nclass ProtocolIndependentOrdinaryCallingFormat(OrdinaryCallingFormat):\n    \n    def build_url_base(self, connection, protocol, server, bucket, key=''):\n        url_base = '//'\n        url_base += self.build_host(server, bucket)\n        url_base += connection.get_path(self.build_path_base(bucket, key))\n        return url_base\n\nclass Location:\n    DEFAULT = '' # US Classic Region\n    EU = 'EU'\n    USWest = 'us-west-1'\n    APNortheast = 'ap-northeast-1'\n    APSoutheast = 'ap-southeast-1'\n\nclass S3Connection(AWSAuthConnection):\n\n    DefaultHost = 's3.amazonaws.com'\n    QueryString = 'Signature=%s&Expires=%d&AWSAccessKeyId=%s'\n\n    def __init__(self, aws_access_key_id=None, aws_secret_access_key=None,\n                 is_secure=True, port=None, proxy=None, proxy_port=None,\n                 proxy_user=None, proxy_pass=None,\n                 host=DefaultHost, debug=0, https_connection_factory=None,\n                 calling_format=SubdomainCallingFormat(), path='/',\n                 provider='aws', bucket_class=Bucket, security_token=None):\n        self.calling_format = calling_format\n        self.bucket_class = bucket_class\n        AWSAuthConnection.__init__(self, host,\n                aws_access_key_id, aws_secret_access_key,\n                is_secure, port, proxy, proxy_port, proxy_user, proxy_pass,\n                debug=debug, https_connection_factory=https_connection_factory,\n                path=path, provider=provider, security_token=security_token)\n\n    def _required_auth_capability(self):\n        return ['s3']\n\n    def __iter__(self):\n        for bucket in self.get_all_buckets():\n            yield bucket\n\n    def __contains__(self, bucket_name):\n        return not (self.lookup(bucket_name) is None)\n\n    def set_bucket_class(self, bucket_class):\n        \"\"\"\n        Set the Bucket class associated with this bucket.  By default, this\n        would be the boto.s3.key.Bucket class but if you want to subclass that\n        for some reason this allows you to associate your new class.\n        \n        :type bucket_class: class\n        :param bucket_class: A subclass of Bucket that can be more specific\n        \"\"\"\n        self.bucket_class = bucket_class\n\n    def build_post_policy(self, expiration_time, conditions):\n        \"\"\"\n        Taken from the AWS book Python examples and modified for use with boto\n        \"\"\"\n        assert type(expiration_time) == time.struct_time, \\\n            'Policy document must include a valid expiration Time object'\n\n        # Convert conditions object mappings to condition statements\n\n        return '{\"expiration\": \"%s\",\\n\"conditions\": [%s]}' % \\\n            (time.strftime(boto.utils.ISO8601, expiration_time), \",\".join(conditions))\n\n\n    def build_post_form_args(self, bucket_name, key, expires_in = 6000,\n                             acl = None, success_action_redirect = None,\n                             max_content_length = None,\n                             http_method = \"http\", fields=None,\n                             conditions=None):\n        \"\"\"\n        Taken from the AWS book Python examples and modified for use with boto\n        This only returns the arguments required for the post form, not the actual form\n        This does not return the file input field which also needs to be added\n        \n        :param bucket_name: Bucket to submit to\n        :type bucket_name: string \n        \n        :param key:  Key name, optionally add ${filename} to the end to attach the submitted filename\n        :type key: string\n        \n        :param expires_in: Time (in seconds) before this expires, defaults to 6000\n        :type expires_in: integer\n        \n        :param acl: ACL rule to use, if any\n        :type acl: :class:`boto.s3.acl.ACL`\n        \n        :param success_action_redirect: URL to redirect to on success\n        :type success_action_redirect: string \n        \n        :param max_content_length: Maximum size for this file\n        :type max_content_length: integer \n        \n        :type http_method: string\n        :param http_method:  HTTP Method to use, \"http\" or \"https\"\n        \n        \n        :rtype: dict\n        :return: A dictionary containing field names/values as well as a url to POST to\n        \n            .. code-block:: python\n            \n                {\n                    \"action\": action_url_to_post_to, \n                    \"fields\": [ \n                        {\n                            \"name\": field_name, \n                            \"value\":  field_value\n                        }, \n                        {\n                            \"name\": field_name2, \n                            \"value\": field_value2\n                        } \n                    ] \n                }\n            \n        \"\"\"\n        if fields == None:\n            fields = []\n        if conditions == None:\n            conditions = []\n        expiration = time.gmtime(int(time.time() + expires_in))\n\n        # Generate policy document\n        conditions.append('{\"bucket\": \"%s\"}' % bucket_name)\n        if key.endswith(\"${filename}\"):\n            conditions.append('[\"starts-with\", \"$key\", \"%s\"]' % key[:-len(\"${filename}\")])\n        else:\n            conditions.append('{\"key\": \"%s\"}' % key)\n        if acl:\n            conditions.append('{\"acl\": \"%s\"}' % acl)\n            fields.append({ \"name\": \"acl\", \"value\": acl})\n        if success_action_redirect:\n            conditions.append('{\"success_action_redirect\": \"%s\"}' % success_action_redirect)\n            fields.append({ \"name\": \"success_action_redirect\", \"value\": success_action_redirect})\n        if max_content_length:\n            conditions.append('[\"content-length-range\", 0, %i]' % max_content_length)\n            fields.append({\"name\":'content-length-range', \"value\": \"0,%i\" % max_content_length})\n\n        policy = self.build_post_policy(expiration, conditions)\n\n        # Add the base64-encoded policy document as the 'policy' field\n        policy_b64 = base64.b64encode(policy)\n        fields.append({\"name\": \"policy\", \"value\": policy_b64})\n\n        # Add the AWS access key as the 'AWSAccessKeyId' field\n        fields.append({\"name\": \"AWSAccessKeyId\", \"value\": self.aws_access_key_id})\n\n        # Add signature for encoded policy document as the 'AWSAccessKeyId' field\n        signature = self._auth_handler.sign_string(policy_b64)\n        fields.append({\"name\": \"signature\", \"value\": signature})\n        fields.append({\"name\": \"key\", \"value\": key})\n\n        # HTTPS protocol will be used if the secure HTTP option is enabled.\n        url = '%s://%s/' % (http_method, self.calling_format.build_host(self.server_name(), bucket_name))\n\n        return {\"action\": url, \"fields\": fields}\n\n\n    def generate_url(self, expires_in, method, bucket='', key='', headers=None,\n                     query_auth=True, force_http=False, response_headers=None):\n        if not headers:\n            headers = {}\n        expires = int(time.time() + expires_in)\n        auth_path = self.calling_format.build_auth_path(bucket, key)\n        auth_path = self.get_path(auth_path)\n        # Arguments to override response headers become part of the canonical\n        # string to be signed.\n        if response_headers:\n            response_hdrs = [\"%s=%s\" % (k, v) for k, v in\n                             response_headers.items()]\n            delimiter = '?' if '?' not in auth_path else '&'\n            auth_path = \"%s%s%s\" % (auth_path, delimiter, '&'.join(response_hdrs))\n        else:\n            response_headers = {}\n        c_string = boto.utils.canonical_string(method, auth_path, headers,\n                                               expires, self.provider)\n        b64_hmac = self._auth_handler.sign_string(c_string)\n        encoded_canonical = urllib.quote_plus(b64_hmac)\n        self.calling_format.build_path_base(bucket, key)\n        if query_auth:\n            query_part = '?' + self.QueryString % (encoded_canonical, expires,\n                                                   self.aws_access_key_id)\n            # The response headers must also be GET parameters in the URL.\n            headers.update(response_headers)\n            hdrs = [ '%s=%s'%(name, urllib.quote(val)) for name,val in headers.items() ]\n            q_str = '&'.join(hdrs)\n            if q_str:\n                query_part += '&' + q_str\n        else:\n            query_part = ''\n        if force_http:\n            protocol = 'http'\n            port = 80\n        else:\n            protocol = self.protocol\n            port = self.port\n        return self.calling_format.build_url_base(self, protocol, self.server_name(port),\n                                                  bucket, key) + query_part\n\n    def get_all_buckets(self, headers=None):\n        response = self.make_request('GET', headers=headers)\n        body = response.read()\n        if response.status > 300:\n            raise self.provider.storage_response_error(\n                response.status, response.reason, body)\n        rs = ResultSet([('Bucket', self.bucket_class)])\n        h = handler.XmlHandler(rs, self)\n        xml.sax.parseString(body, h)\n        return rs\n\n    def get_canonical_user_id(self, headers=None):\n        \"\"\"\n        Convenience method that returns the \"CanonicalUserID\" of the\n        user who's credentials are associated with the connection.\n        The only way to get this value is to do a GET request on the\n        service which returns all buckets associated with the account.\n        As part of that response, the canonical userid is returned.\n        This method simply does all of that and then returns just the\n        user id.\n\n        :rtype: string\n        :return: A string containing the canonical user id.\n        \"\"\"\n        rs = self.get_all_buckets(headers=headers)\n        return rs.ID\n\n    def get_bucket(self, bucket_name, validate=True, headers=None):\n        bucket = self.bucket_class(self, bucket_name)\n        if validate:\n            bucket.get_all_keys(headers, maxkeys=0)\n        return bucket\n\n    def lookup(self, bucket_name, validate=True, headers=None):\n        try:\n            bucket = self.get_bucket(bucket_name, validate, headers=headers)\n        except:\n            bucket = None\n        return bucket\n\n    def create_bucket(self, bucket_name, headers=None,\n                      location=Location.DEFAULT, policy=None):\n        \"\"\"\n        Creates a new located bucket. By default it's in the USA. You can pass\n        Location.EU to create an European bucket.\n\n        :type bucket_name: string\n        :param bucket_name: The name of the new bucket\n        \n        :type headers: dict\n        :param headers: Additional headers to pass along with the request to AWS.\n\n        :type location: :class:`boto.s3.connection.Location`\n        :param location: The location of the new bucket\n        \n        :type policy: :class:`boto.s3.acl.CannedACLStrings`\n        :param policy: A canned ACL policy that will be applied to the new key in S3.\n             \n        \"\"\"\n        check_lowercase_bucketname(bucket_name)\n\n        if policy:\n            if headers:\n                headers[self.provider.acl_header] = policy\n            else:\n                headers = {self.provider.acl_header : policy}\n        if location == Location.DEFAULT:\n            data = ''\n        else:\n            data = '<CreateBucketConstraint><LocationConstraint>' + \\\n                    location + '</LocationConstraint></CreateBucketConstraint>'\n        response = self.make_request('PUT', bucket_name, headers=headers,\n                data=data)\n        body = response.read()\n        if response.status == 409:\n            raise self.provider.storage_create_error(\n                response.status, response.reason, body)\n        if response.status == 200:\n            return self.bucket_class(self, bucket_name)\n        else:\n            raise self.provider.storage_response_error(\n                response.status, response.reason, body)\n\n    def delete_bucket(self, bucket, headers=None):\n        response = self.make_request('DELETE', bucket, headers=headers)\n        body = response.read()\n        if response.status != 204:\n            raise self.provider.storage_response_error(\n                response.status, response.reason, body)\n\n    def make_request(self, method, bucket='', key='', headers=None, data='',\n            query_args=None, sender=None, override_num_retries=None):\n        if isinstance(bucket, self.bucket_class):\n            bucket = bucket.name\n        if isinstance(key, Key):\n            key = key.name\n        path = self.calling_format.build_path_base(bucket, key)\n        boto.log.debug('path=%s' % path)\n        auth_path = self.calling_format.build_auth_path(bucket, key)\n        boto.log.debug('auth_path=%s' % auth_path)\n        host = self.calling_format.build_host(self.server_name(), bucket)\n        if query_args:\n            path += '?' + query_args\n            boto.log.debug('path=%s' % path)\n            auth_path += '?' + query_args\n            boto.log.debug('auth_path=%s' % auth_path)\n        return AWSAuthConnection.make_request(self, method, path, headers,\n                data, host, auth_path, sender,\n                override_num_retries=override_num_retries)\n\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/s3/deletemarker.py",
    "content": "# Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nfrom boto.s3.user import User\n\nclass DeleteMarker:\n    def __init__(self, bucket=None, name=None):\n        self.bucket = bucket\n        self.name = name\n        self.is_latest = False\n        self.last_modified = None\n        self.owner = None\n\n    def startElement(self, name, attrs, connection):\n        if name == 'Owner':\n            self.owner = User(self)\n            return self.owner\n        else:\n            return None\n\n    def endElement(self, name, value, connection):\n        if name == 'Key':\n            self.name = value.encode('utf-8')\n        elif name == 'IsLatest':\n            if value == 'true':\n                self.is_lastest = True\n            else:\n                self.is_latest = False\n        elif name == 'LastModified':\n            self.last_modified = value\n        elif name == 'Owner':\n            pass\n        elif name == 'VersionId':\n            self.version_id = value\n        else:\n            setattr(self, name, value)\n\n\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/s3/key.py",
    "content": "# Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/\n# Copyright (c) 2011, Nexenta Systems Inc.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nimport mimetypes\nimport os\nimport re\nimport rfc822\nimport StringIO\nimport base64\nimport boto.utils\nfrom boto.exception import BotoClientError\nfrom boto.provider import Provider\nfrom boto.s3.user import User\nfrom boto import UserAgent\ntry:\n    from hashlib import md5\nexcept ImportError:\n    from md5 import md5\n\n\nclass Key(object):\n\n    DefaultContentType = 'application/octet-stream'\n\n    BufferSize = 8192\n\n    def __init__(self, bucket=None, name=None):\n        self.bucket = bucket\n        self.name = name\n        self.metadata = {}\n        self.cache_control = None\n        self.content_type = self.DefaultContentType\n        self.content_encoding = None\n        self.filename = None\n        self.etag = None\n        self.last_modified = None\n        self.owner = None\n        self.storage_class = 'STANDARD'\n        self.md5 = None\n        self.base64md5 = None\n        self.path = None\n        self.resp = None\n        self.mode = None\n        self.size = None\n        self.version_id = None\n        self.source_version_id = None\n        self.delete_marker = False\n        self.encrypted = None\n\n    def __repr__(self):\n        if self.bucket:\n            return '<Key: %s,%s>' % (self.bucket.name, self.name)\n        else:\n            return '<Key: None,%s>' % self.name\n\n    def __getattr__(self, name):\n        if name == 'key':\n            return self.name\n        else:\n            raise AttributeError\n\n    def __setattr__(self, name, value):\n        if name == 'key':\n            self.__dict__['name'] = value\n        else:\n            self.__dict__[name] = value\n\n    def __iter__(self):\n        return self\n\n    @property\n    def provider(self):\n        provider = None\n        if self.bucket:\n            if self.bucket.connection:\n                provider = self.bucket.connection.provider\n        return provider\n\n    def get_md5_from_hexdigest(self, md5_hexdigest):\n        \"\"\"\n        A utility function to create the 2-tuple (md5hexdigest, base64md5)\n        from just having a precalculated md5_hexdigest.\n        \"\"\"\n        import binascii\n        digest = binascii.unhexlify(md5_hexdigest)\n        base64md5 = base64.encodestring(digest)\n        if base64md5[-1] == '\\n':\n            base64md5 = base64md5[0:-1]\n        return (md5_hexdigest, base64md5)\n\n    def handle_encryption_headers(self, resp):\n        provider = self.bucket.connection.provider\n        if provider.server_side_encryption_header:\n            self.encrypted = resp.getheader(provider.server_side_encryption_header, None)\n        else:\n            self.encrypted = None\n\n    def handle_version_headers(self, resp, force=False):\n        provider = self.bucket.connection.provider\n        # If the Key object already has a version_id attribute value, it\n        # means that it represents an explicit version and the user is\n        # doing a get_contents_*(version_id=<foo>) to retrieve another\n        # version of the Key.  In that case, we don't really want to\n        # overwrite the version_id in this Key object.  Comprende?\n        if self.version_id is None or force:\n            self.version_id = resp.getheader(provider.version_id, None)\n        self.source_version_id = resp.getheader(provider.copy_source_version_id,\n                                                None)\n        if resp.getheader(provider.delete_marker, 'false') == 'true':\n            self.delete_marker = True\n        else:\n            self.delete_marker = False\n\n    def open_read(self, headers=None, query_args=None,\n                  override_num_retries=None, response_headers=None):\n        \"\"\"\n        Open this key for reading\n\n        :type headers: dict\n        :param headers: Headers to pass in the web request\n\n        :type query_args: string\n        :param query_args: Arguments to pass in the query string (ie, 'torrent')\n\n        :type override_num_retries: int\n        :param override_num_retries: If not None will override configured\n                                     num_retries parameter for underlying GET.\n\n        :type response_headers: dict\n        :param response_headers: A dictionary containing HTTP headers/values\n                                 that will override any headers associated with\n                                 the stored object in the response.\n                                 See http://goo.gl/EWOPb for details.\n        \"\"\"\n        if self.resp == None:\n            self.mode = 'r'\n\n            provider = self.bucket.connection.provider\n            self.resp = self.bucket.connection.make_request(\n                'GET', self.bucket.name, self.name, headers,\n                query_args=query_args,\n                override_num_retries=override_num_retries)\n            if self.resp.status < 199 or self.resp.status > 299:\n                body = self.resp.read()\n                raise provider.storage_response_error(self.resp.status,\n                                                      self.resp.reason, body)\n            response_headers = self.resp.msg\n            self.metadata = boto.utils.get_aws_metadata(response_headers,\n                                                        provider)\n            for name,value in response_headers.items():\n                # To get correct size for Range GETs, use Content-Range\n                # header if one was returned. If not, use Content-Length\n                # header.\n                if (name.lower() == 'content-length' and\n                    'Content-Range' not in response_headers):\n                    self.size = int(value)\n                elif name.lower() == 'content-range':\n                    end_range = re.sub('.*/(.*)', '\\\\1', value)\n                    self.size = int(end_range)\n                elif name.lower() == 'etag':\n                    self.etag = value\n                elif name.lower() == 'content-type':\n                    self.content_type = value\n                elif name.lower() == 'content-encoding':\n                    self.content_encoding = value\n                elif name.lower() == 'last-modified':\n                    self.last_modified = value\n                elif name.lower() == 'cache-control':\n                    self.cache_control = value\n            self.handle_version_headers(self.resp)\n            self.handle_encryption_headers(self.resp)\n\n    def open_write(self, headers=None, override_num_retries=None):\n        \"\"\"\n        Open this key for writing.\n        Not yet implemented\n\n        :type headers: dict\n        :param headers: Headers to pass in the write request\n\n        :type override_num_retries: int\n        :param override_num_retries: If not None will override configured\n                                     num_retries parameter for underlying PUT.\n        \"\"\"\n        raise BotoClientError('Not Implemented')\n\n    def open(self, mode='r', headers=None, query_args=None,\n             override_num_retries=None):\n        if mode == 'r':\n            self.mode = 'r'\n            self.open_read(headers=headers, query_args=query_args,\n                           override_num_retries=override_num_retries)\n        elif mode == 'w':\n            self.mode = 'w'\n            self.open_write(headers=headers,\n                            override_num_retries=override_num_retries)\n        else:\n            raise BotoClientError('Invalid mode: %s' % mode)\n\n    closed = False\n    def close(self):\n        if self.resp:\n            self.resp.read()\n        self.resp = None\n        self.mode = None\n        self.closed = True\n\n    def next(self):\n        \"\"\"\n        By providing a next method, the key object supports use as an iterator.\n        For example, you can now say:\n\n        for bytes in key:\n            write bytes to a file or whatever\n\n        All of the HTTP connection stuff is handled for you.\n        \"\"\"\n        self.open_read()\n        data = self.resp.read(self.BufferSize)\n        if not data:\n            self.close()\n            raise StopIteration\n        return data\n\n    def read(self, size=0):\n        self.open_read()\n        if size == 0:\n            data = self.resp.read()\n        else:\n            data = self.resp.read(size)\n        if not data:\n            self.close()\n        return data\n\n    def change_storage_class(self, new_storage_class, dst_bucket=None):\n        \"\"\"\n        Change the storage class of an existing key.\n        Depending on whether a different destination bucket is supplied\n        or not, this will either move the item within the bucket, preserving\n        all metadata and ACL info bucket changing the storage class or it\n        will copy the item to the provided destination bucket, also\n        preserving metadata and ACL info.\n\n        :type new_storage_class: string\n        :param new_storage_class: The new storage class for the Key.\n                                  Possible values are:\n                                  * STANDARD\n                                  * REDUCED_REDUNDANCY\n\n        :type dst_bucket: string\n        :param dst_bucket: The name of a destination bucket.  If not\n                           provided the current bucket of the key\n                           will be used.\n\n        \"\"\"\n        if new_storage_class == 'STANDARD':\n            return self.copy(self.bucket.name, self.name,\n                             reduced_redundancy=False, preserve_acl=True)\n        elif new_storage_class == 'REDUCED_REDUNDANCY':\n            return self.copy(self.bucket.name, self.name,\n                             reduced_redundancy=True, preserve_acl=True)\n        else:\n            raise BotoClientError('Invalid storage class: %s' %\n                                  new_storage_class)\n\n    def copy(self, dst_bucket, dst_key, metadata=None,\n             reduced_redundancy=False, preserve_acl=False,\n             encrypt_key=False):\n        \"\"\"\n        Copy this Key to another bucket.\n\n        :type dst_bucket: string\n        :param dst_bucket: The name of the destination bucket\n\n        :type dst_key: string\n        :param dst_key: The name of the destination key\n\n        :type metadata: dict\n        :param metadata: Metadata to be associated with new key.\n                         If metadata is supplied, it will replace the\n                         metadata of the source key being copied.\n                         If no metadata is supplied, the source key's\n                         metadata will be copied to the new key.\n\n        :type reduced_redundancy: bool\n        :param reduced_redundancy: If True, this will force the storage\n                                   class of the new Key to be\n                                   REDUCED_REDUNDANCY regardless of the\n                                   storage class of the key being copied.\n                                   The Reduced Redundancy Storage (RRS)\n                                   feature of S3, provides lower\n                                   redundancy at lower storage cost.\n\n        :type preserve_acl: bool\n        :param preserve_acl: If True, the ACL from the source key\n                             will be copied to the destination\n                             key.  If False, the destination key\n                             will have the default ACL.\n                             Note that preserving the ACL in the\n                             new key object will require two\n                             additional API calls to S3, one to\n                             retrieve the current ACL and one to\n                             set that ACL on the new object.  If\n                             you don't care about the ACL, a value\n                             of False will be significantly more\n                             efficient.\n\n        :type encrypt_key: bool\n        :param encrypt_key: If True, the new copy of the object will\n                            be encrypted on the server-side by S3 and\n                            will be stored in an encrypted form while\n                            at rest in S3.\n                            \n        :rtype: :class:`boto.s3.key.Key` or subclass\n        :returns: An instance of the newly created key object\n        \"\"\"\n        dst_bucket = self.bucket.connection.lookup(dst_bucket)\n        if reduced_redundancy:\n            storage_class = 'REDUCED_REDUNDANCY'\n        else:\n            storage_class = self.storage_class\n        return dst_bucket.copy_key(dst_key, self.bucket.name,\n                                   self.name, metadata,\n                                   storage_class=storage_class,\n                                   preserve_acl=preserve_acl,\n                                   encrypt_key=encrypt_key)\n\n    def startElement(self, name, attrs, connection):\n        if name == 'Owner':\n            self.owner = User(self)\n            return self.owner\n        else:\n            return None\n\n    def endElement(self, name, value, connection):\n        if name == 'Key':\n            self.name = value.encode('utf-8')\n        elif name == 'ETag':\n            self.etag = value\n        elif name == 'LastModified':\n            self.last_modified = value\n        elif name == 'Size':\n            self.size = int(value)\n        elif name == 'StorageClass':\n            self.storage_class = value\n        elif name == 'Owner':\n            pass\n        elif name == 'VersionId':\n            self.version_id = value\n        else:\n            setattr(self, name, value)\n\n    def exists(self):\n        \"\"\"\n        Returns True if the key exists\n\n        :rtype: bool\n        :return: Whether the key exists on S3\n        \"\"\"\n        return bool(self.bucket.lookup(self.name))\n\n    def delete(self):\n        \"\"\"\n        Delete this key from S3\n        \"\"\"\n        return self.bucket.delete_key(self.name, version_id=self.version_id)\n\n    def get_metadata(self, name):\n        return self.metadata.get(name)\n\n    def set_metadata(self, name, value):\n        self.metadata[name] = value\n\n    def update_metadata(self, d):\n        self.metadata.update(d)\n\n    # convenience methods for setting/getting ACL\n    def set_acl(self, acl_str, headers=None):\n        if self.bucket != None:\n            self.bucket.set_acl(acl_str, self.name, headers=headers)\n\n    def get_acl(self, headers=None):\n        if self.bucket != None:\n            return self.bucket.get_acl(self.name, headers=headers)\n\n    def get_xml_acl(self, headers=None):\n        if self.bucket != None:\n            return self.bucket.get_xml_acl(self.name, headers=headers)\n\n    def set_xml_acl(self, acl_str, headers=None):\n        if self.bucket != None:\n            return self.bucket.set_xml_acl(acl_str, self.name, headers=headers)\n\n    def set_canned_acl(self, acl_str, headers=None):\n        return self.bucket.set_canned_acl(acl_str, self.name, headers)\n\n    def make_public(self, headers=None):\n        return self.bucket.set_canned_acl('public-read', self.name, headers)\n\n    def generate_url(self, expires_in, method='GET', headers=None,\n                     query_auth=True, force_http=False, response_headers=None):\n        \"\"\"\n        Generate a URL to access this key.\n\n        :type expires_in: int\n        :param expires_in: How long the url is valid for, in seconds\n\n        :type method: string\n        :param method: The method to use for retrieving the file\n                       (default is GET)\n\n        :type headers: dict\n        :param headers: Any headers to pass along in the request\n\n        :type query_auth: bool\n        :param query_auth:\n\n        :rtype: string\n        :return: The URL to access the key\n        \"\"\"\n        return self.bucket.connection.generate_url(expires_in, method,\n                                                   self.bucket.name, self.name,\n                                                   headers, query_auth,\n                                                   force_http,\n                                                   response_headers)\n\n    def send_file(self, fp, headers=None, cb=None, num_cb=10,\n                  query_args=None, chunked_transfer=False):\n        \"\"\"\n        Upload a file to a key into a bucket on S3.\n\n        :type fp: file\n        :param fp: The file pointer to upload\n\n        :type headers: dict\n        :param headers: The headers to pass along with the PUT request\n\n        :type cb: function\n        :param cb: a callback function that will be called to report\n                   progress on the upload.  The callback should accept\n                   two integer parameters, the first representing the\n                   number of bytes that have been successfully\n                   transmitted to S3 and the second representing the\n                   size of the to be transmitted object.\n\n        :type num_cb: int\n        :param num_cb: (optional) If a callback is specified with the cb\n                       parameter this parameter determines the granularity\n                       of the callback by defining the maximum number of\n                       times the callback will be called during the file\n                       transfer. Providing a negative integer will cause\n                       your callback to be called with each buffer read.\n\n        \"\"\"\n        provider = self.bucket.connection.provider\n\n        def sender(http_conn, method, path, data, headers):\n            http_conn.putrequest(method, path)\n            for key in headers:\n                http_conn.putheader(key, headers[key])\n            http_conn.endheaders()\n            if chunked_transfer:\n                # MD5 for the stream has to be calculated on the fly, as\n                # we don't know the size of the stream before hand.\n                m = md5()\n            else:\n                fp.seek(0)\n\n            save_debug = self.bucket.connection.debug\n            self.bucket.connection.debug = 0\n            # If the debuglevel < 3 we don't want to show connection\n            # payload, so turn off HTTP connection-level debug output (to\n            # be restored below).\n            # Use the getattr approach to allow this to work in AppEngine.\n            if getattr(http_conn, 'debuglevel', 0) < 3:\n                http_conn.set_debuglevel(0)\n            if cb:\n                if chunked_transfer:\n                    # For chunked Transfer, we call the cb for every 1MB\n                    # of data transferred.\n                    cb_count = (1024 * 1024)/self.BufferSize\n                    self.size = 0\n                elif num_cb > 2:\n                    cb_count = self.size / self.BufferSize / (num_cb-2)\n                elif num_cb < 0:\n                    cb_count = -1\n                else:\n                    cb_count = 0\n                i = total_bytes = 0\n                cb(total_bytes, self.size)\n            l = fp.read(self.BufferSize)\n            while len(l) > 0:\n                if chunked_transfer:\n                    http_conn.send('%x;\\r\\n' % len(l))\n                    http_conn.send(l)\n                    http_conn.send('\\r\\n')\n                else:\n                    http_conn.send(l)\n                if cb:\n                    total_bytes += len(l)\n                    i += 1\n                    if i == cb_count or cb_count == -1:\n                        cb(total_bytes, self.size)\n                        i = 0\n                if chunked_transfer:\n                    m.update(l)\n                l = fp.read(self.BufferSize)\n            if chunked_transfer:\n                http_conn.send('0\\r\\n')\n                http_conn.send('\\r\\n')\n                if cb:\n                    self.size = total_bytes\n                # Get the md5 which is calculated on the fly.\n                self.md5 = m.hexdigest()\n            else:\n                fp.seek(0)\n            if cb:\n                cb(total_bytes, self.size)\n            response = http_conn.getresponse()\n            body = response.read()\n            http_conn.set_debuglevel(save_debug)\n            self.bucket.connection.debug = save_debug\n            if ((response.status == 500 or response.status == 503 or\n                    response.getheader('location')) and not chunked_transfer):\n                # we'll try again.\n                return response\n            elif response.status >= 200 and response.status <= 299:\n                self.etag = response.getheader('etag')\n                if self.etag != '\"%s\"'  % self.md5:\n                    raise provider.storage_data_error(\n                        'ETag from S3 did not match computed MD5')\n                return response\n            else:\n                raise provider.storage_response_error(\n                    response.status, response.reason, body)\n\n        if not headers:\n            headers = {}\n        else:\n            headers = headers.copy()\n        headers['User-Agent'] = UserAgent\n        if self.base64md5:\n            headers['Content-MD5'] = self.base64md5\n        if self.storage_class != 'STANDARD':\n            headers[provider.storage_class_header] = self.storage_class\n        if headers.has_key('Content-Encoding'):\n            self.content_encoding = headers['Content-Encoding']\n        if headers.has_key('Content-Type'):\n            self.content_type = headers['Content-Type']\n        elif self.path:\n            self.content_type = mimetypes.guess_type(self.path)[0]\n            if self.content_type == None:\n                self.content_type = self.DefaultContentType\n            headers['Content-Type'] = self.content_type\n        else:\n            headers['Content-Type'] = self.content_type\n        if not chunked_transfer:\n            headers['Content-Length'] = str(self.size)\n        headers['Expect'] = '100-Continue'\n        headers = boto.utils.merge_meta(headers, self.metadata, provider)\n        resp = self.bucket.connection.make_request('PUT', self.bucket.name,\n                                                   self.name, headers,\n                                                   sender=sender,\n                                                   query_args=query_args)\n        self.handle_version_headers(resp, force=True)\n\n    def compute_md5(self, fp):\n        \"\"\"\n        :type fp: file\n        :param fp: File pointer to the file to MD5 hash.  The file pointer\n                   will be reset to the beginning of the file before the\n                   method returns.\n\n        :rtype: tuple\n        :return: A tuple containing the hex digest version of the MD5 hash\n                 as the first element and the base64 encoded version of the\n                 plain digest as the second element.\n        \"\"\"\n        m = md5()\n        fp.seek(0)\n        s = fp.read(self.BufferSize)\n        while s:\n            m.update(s)\n            s = fp.read(self.BufferSize)\n        hex_md5 = m.hexdigest()\n        base64md5 = base64.encodestring(m.digest())\n        if base64md5[-1] == '\\n':\n            base64md5 = base64md5[0:-1]\n        self.size = fp.tell()\n        fp.seek(0)\n        return (hex_md5, base64md5)\n\n    def set_contents_from_stream(self, fp, headers=None, replace=True,\n                                 cb=None, num_cb=10, policy=None,\n                                 reduced_redundancy=False, query_args=None):\n        \"\"\"\n        Store an object using the name of the Key object as the key in\n        cloud and the contents of the data stream pointed to by 'fp' as\n        the contents.\n        The stream object is not seekable and total size is not known.\n        This has the implication that we can't specify the Content-Size and\n        Content-MD5 in the header. So for huge uploads, the delay in calculating\n        MD5 is avoided but with a penalty of inability to verify the integrity\n        of the uploaded data.\n\n        :type fp: file\n        :param fp: the file whose contents are to be uploaded\n\n        :type headers: dict\n        :param headers: additional HTTP headers to be sent with the PUT request.\n\n        :type replace: bool\n        :param replace: If this parameter is False, the method will first check\n            to see if an object exists in the bucket with the same key. If it\n            does, it won't overwrite it. The default value is True which will\n            overwrite the object.\n\n        :type cb: function\n        :param cb: a callback function that will be called to report\n            progress on the upload. The callback should accept two integer\n            parameters, the first representing the number of bytes that have\n            been successfully transmitted to GS and the second representing the\n            total number of bytes that need to be transmitted.\n\n        :type num_cb: int\n        :param num_cb: (optional) If a callback is specified with the cb\n            parameter, this parameter determines the granularity of the callback\n            by defining the maximum number of times the callback will be called\n            during the file transfer.\n\n        :type policy: :class:`boto.gs.acl.CannedACLStrings`\n        :param policy: A canned ACL policy that will be applied to the new key\n            in GS.\n\n        :type reduced_redundancy: bool\n        :param reduced_redundancy: If True, this will set the storage\n                                   class of the new Key to be\n                                   REDUCED_REDUNDANCY. The Reduced Redundancy\n                                   Storage (RRS) feature of S3, provides lower\n                                   redundancy at lower storage cost.\n        \"\"\"\n\n        provider = self.bucket.connection.provider\n        if not provider.supports_chunked_transfer():\n            raise BotoClientError('%s does not support chunked transfer'\n                % provider.get_provider_name())\n\n        # Name of the Object should be specified explicitly for Streams.\n        if not self.name or self.name == '':\n            raise BotoClientError('Cannot determine the destination '\n                                'object name for the given stream')\n\n        if headers is None:\n            headers = {}\n        if policy:\n            headers[provider.acl_header] = policy\n\n        # Set the Transfer Encoding for Streams.\n        headers['Transfer-Encoding'] = 'chunked'\n\n        if reduced_redundancy:\n            self.storage_class = 'REDUCED_REDUNDANCY'\n            if provider.storage_class_header:\n                headers[provider.storage_class_header] = self.storage_class\n\n        if self.bucket != None:\n            if not replace:\n                k = self.bucket.lookup(self.name)\n                if k:\n                    return\n            self.send_file(fp, headers, cb, num_cb, query_args,\n                                            chunked_transfer=True)\n\n    def set_contents_from_file(self, fp, headers=None, replace=True,\n                               cb=None, num_cb=10, policy=None, md5=None,\n                               reduced_redundancy=False, query_args=None,\n                               encrypt_key=False):\n        \"\"\"\n        Store an object in S3 using the name of the Key object as the\n        key in S3 and the contents of the file pointed to by 'fp' as the\n        contents.\n\n        :type fp: file\n        :param fp: the file whose contents to upload\n\n        :type headers: dict\n        :param headers: Additional HTTP headers that will be sent with\n                        the PUT request.\n\n        :type replace: bool\n        :param replace: If this parameter is False, the method\n                        will first check to see if an object exists in the\n                        bucket with the same key.  If it does, it won't\n                        overwrite it.  The default value is True which will\n                        overwrite the object.\n\n        :type cb: function\n        :param cb: a callback function that will be called to report\n                   progress on the upload.  The callback should accept\n                   two integer parameters, the first representing the\n                   number of bytes that have been successfully\n                   transmitted to S3 and the second representing the\n                   size of the to be transmitted object.\n\n        :type cb: int\n        :param num_cb: (optional) If a callback is specified with the cb\n                       parameter this parameter determines the granularity\n                       of the callback by defining the maximum number of\n                       times the callback will be called during the\n                       file transfer.\n\n        :type policy: :class:`boto.s3.acl.CannedACLStrings`\n        :param policy: A canned ACL policy that will be applied to the\n                       new key in S3.\n\n        :type md5: A tuple containing the hexdigest version of the MD5\n                   checksum of the file as the first element and the\n                   Base64-encoded version of the plain checksum as the\n                   second element.  This is the same format returned by\n                   the compute_md5 method.\n        :param md5: If you need to compute the MD5 for any reason prior\n                    to upload, it's silly to have to do it twice so this\n                    param, if present, will be used as the MD5 values of\n                    the file.  Otherwise, the checksum will be computed.\n\n        :type reduced_redundancy: bool\n        :param reduced_redundancy: If True, this will set the storage\n                                   class of the new Key to be\n                                   REDUCED_REDUNDANCY. The Reduced Redundancy\n                                   Storage (RRS) feature of S3, provides lower\n                                   redundancy at lower storage cost.\n\n        :type encrypt_key: bool\n        :param encrypt_key: If True, the new copy of the object will\n                            be encrypted on the server-side by S3 and\n                            will be stored in an encrypted form while\n                            at rest in S3.\n        \"\"\"\n        provider = self.bucket.connection.provider\n        if headers is None:\n            headers = {}\n        if policy:\n            headers[provider.acl_header] = policy\n        if encrypt_key:\n            headers[provider.server_side_encryption_header] = 'AES256'\n\n        if reduced_redundancy:\n            self.storage_class = 'REDUCED_REDUNDANCY'\n            if provider.storage_class_header:\n                headers[provider.storage_class_header] = self.storage_class\n                # TODO - What if provider doesn't support reduced reduncancy?\n                # What if different providers provide different classes?\n        if hasattr(fp, 'name'):\n            self.path = fp.name\n        if self.bucket != None:\n            if not md5:\n                md5 = self.compute_md5(fp)\n            else:\n                # even if md5 is provided, still need to set size of content\n                fp.seek(0, 2)\n                self.size = fp.tell()\n                fp.seek(0)\n            self.md5 = md5[0]\n            self.base64md5 = md5[1]\n            if self.name == None:\n                self.name = self.md5\n            if not replace:\n                k = self.bucket.lookup(self.name)\n                if k:\n                    return\n            self.send_file(fp, headers, cb, num_cb, query_args)\n\n    def set_contents_from_filename(self, filename, headers=None, replace=True,\n                                   cb=None, num_cb=10, policy=None, md5=None,\n                                   reduced_redundancy=False,\n                                   encrypt_key=False):\n        \"\"\"\n        Store an object in S3 using the name of the Key object as the\n        key in S3 and the contents of the file named by 'filename'.\n        See set_contents_from_file method for details about the\n        parameters.\n\n        :type filename: string\n        :param filename: The name of the file that you want to put onto S3\n\n        :type headers: dict\n        :param headers: Additional headers to pass along with the\n                        request to AWS.\n\n        :type replace: bool\n        :param replace: If True, replaces the contents of the file\n                        if it already exists.\n\n        :type cb: function\n        :param cb: a callback function that will be called to report\n                   progress on the upload.  The callback should accept\n                   two integer parameters, the first representing the\n                   number of bytes that have been successfully\n                   transmitted to S3 and the second representing the\n                   size of the to be transmitted object.\n\n        :type cb: int\n        :param num_cb: (optional) If a callback is specified with\n                       the cb parameter this parameter determines the\n                       granularity of the callback by defining\n                       the maximum number of times the callback will\n                       be called during the file transfer.\n\n        :type policy: :class:`boto.s3.acl.CannedACLStrings`\n        :param policy: A canned ACL policy that will be applied to the\n                       new key in S3.\n\n        :type md5: A tuple containing the hexdigest version of the MD5\n                   checksum of the file as the first element and the\n                   Base64-encoded version of the plain checksum as the\n                   second element.  This is the same format returned by\n                   the compute_md5 method.\n        :param md5: If you need to compute the MD5 for any reason prior\n                    to upload, it's silly to have to do it twice so this\n                    param, if present, will be used as the MD5 values\n                    of the file.  Otherwise, the checksum will be computed.\n\n        :type reduced_redundancy: bool\n        :param reduced_redundancy: If True, this will set the storage\n                                   class of the new Key to be\n                                   REDUCED_REDUNDANCY. The Reduced Redundancy\n                                   Storage (RRS) feature of S3, provides lower\n                                   redundancy at lower storage cost.\n        :type encrypt_key: bool\n        :param encrypt_key: If True, the new copy of the object will\n                            be encrypted on the server-side by S3 and\n                            will be stored in an encrypted form while\n                            at rest in S3.\n        \"\"\"\n        fp = open(filename, 'rb')\n        self.set_contents_from_file(fp, headers, replace, cb, num_cb,\n                                    policy, md5, reduced_redundancy,\n                                    encrypt_key=encrypt_key)\n        fp.close()\n\n    def set_contents_from_string(self, s, headers=None, replace=True,\n                                 cb=None, num_cb=10, policy=None, md5=None,\n                                 reduced_redundancy=False,\n                                 encrypt_key=False):\n        \"\"\"\n        Store an object in S3 using the name of the Key object as the\n        key in S3 and the string 's' as the contents.\n        See set_contents_from_file method for details about the\n        parameters.\n\n        :type headers: dict\n        :param headers: Additional headers to pass along with the\n                        request to AWS.\n\n        :type replace: bool\n        :param replace: If True, replaces the contents of the file if\n                        it already exists.\n\n        :type cb: function\n        :param cb: a callback function that will be called to report\n                   progress on the upload.  The callback should accept\n                   two integer parameters, the first representing the\n                   number of bytes that have been successfully\n                   transmitted to S3 and the second representing the\n                   size of the to be transmitted object.\n\n        :type cb: int\n        :param num_cb: (optional) If a callback is specified with\n                       the cb parameter this parameter determines the\n                       granularity of the callback by defining\n                       the maximum number of times the callback will\n                       be called during the file transfer.\n\n        :type policy: :class:`boto.s3.acl.CannedACLStrings`\n        :param policy: A canned ACL policy that will be applied to the\n                       new key in S3.\n\n        :type md5: A tuple containing the hexdigest version of the MD5\n                   checksum of the file as the first element and the\n                   Base64-encoded version of the plain checksum as the\n                   second element.  This is the same format returned by\n                   the compute_md5 method.\n        :param md5: If you need to compute the MD5 for any reason prior\n                    to upload, it's silly to have to do it twice so this\n                    param, if present, will be used as the MD5 values\n                    of the file.  Otherwise, the checksum will be computed.\n\n        :type reduced_redundancy: bool\n        :param reduced_redundancy: If True, this will set the storage\n                                   class of the new Key to be\n                                   REDUCED_REDUNDANCY. The Reduced Redundancy\n                                   Storage (RRS) feature of S3, provides lower\n                                   redundancy at lower storage cost.\n        :type encrypt_key: bool\n        :param encrypt_key: If True, the new copy of the object will\n                            be encrypted on the server-side by S3 and\n                            will be stored in an encrypted form while\n                            at rest in S3.\n        \"\"\"\n        if isinstance(s, unicode):\n            s = s.encode(\"utf-8\")\n        fp = StringIO.StringIO(s)\n        r = self.set_contents_from_file(fp, headers, replace, cb, num_cb,\n                                        policy, md5, reduced_redundancy,\n                                        encrypt_key=encrypt_key)\n        fp.close()\n        return r\n\n    def get_file(self, fp, headers=None, cb=None, num_cb=10,\n                 torrent=False, version_id=None, override_num_retries=None,\n                 response_headers=None):\n        \"\"\"\n        Retrieves a file from an S3 Key\n\n        :type fp: file\n        :param fp: File pointer to put the data into\n\n        :type headers: string\n        :param: headers to send when retrieving the files\n\n        :type cb: function\n        :param cb: a callback function that will be called to report\n                   progress on the upload.  The callback should accept\n                   two integer parameters, the first representing the\n                   number of bytes that have been successfully\n                   transmitted to S3 and the second representing the\n                   size of the to be transmitted object.\n\n        :type cb: int\n        :param num_cb: (optional) If a callback is specified with\n                       the cb parameter this parameter determines the\n                       granularity of the callback by defining\n                       the maximum number of times the callback will\n                       be called during the file transfer.\n\n        :type torrent: bool\n        :param torrent: Flag for whether to get a torrent for the file\n\n        :type override_num_retries: int\n        :param override_num_retries: If not None will override configured\n                                     num_retries parameter for underlying GET.\n\n        :type response_headers: dict\n        :param response_headers: A dictionary containing HTTP headers/values\n                                 that will override any headers associated with\n                                 the stored object in the response.\n                                 See http://goo.gl/EWOPb for details.\n        \"\"\"\n        if cb:\n            if num_cb > 2:\n                cb_count = self.size / self.BufferSize / (num_cb-2)\n            elif num_cb < 0:\n                cb_count = -1\n            else:\n                cb_count = 0\n            i = total_bytes = 0\n            cb(total_bytes, self.size)\n        save_debug = self.bucket.connection.debug\n        if self.bucket.connection.debug == 1:\n            self.bucket.connection.debug = 0\n\n        query_args = []\n        if torrent:\n            query_args.append('torrent')\n        # If a version_id is passed in, use that.  If not, check to see\n        # if the Key object has an explicit version_id and, if so, use that.\n        # Otherwise, don't pass a version_id query param.\n        if version_id is None:\n            version_id = self.version_id\n        if version_id:\n            query_args.append('versionId=%s' % version_id)\n        if response_headers:\n            for key in response_headers:\n                query_args.append('%s=%s' % (key, response_headers[key]))\n        query_args = '&'.join(query_args)\n        self.open('r', headers, query_args=query_args,\n                  override_num_retries=override_num_retries)\n        for bytes in self:\n            fp.write(bytes)\n            if cb:\n                total_bytes += len(bytes)\n                i += 1\n                if i == cb_count or cb_count == -1:\n                    cb(total_bytes, self.size)\n                    i = 0\n        if cb:\n            cb(total_bytes, self.size)\n        self.close()\n        self.bucket.connection.debug = save_debug\n\n    def get_torrent_file(self, fp, headers=None, cb=None, num_cb=10):\n        \"\"\"\n        Get a torrent file (see to get_file)\n\n        :type fp: file\n        :param fp: The file pointer of where to put the torrent\n\n        :type headers: dict\n        :param headers: Headers to be passed\n\n        :type cb: function\n        :param cb: a callback function that will be called to report\n                   progress on the upload.  The callback should accept\n                   two integer parameters, the first representing the\n                   number of bytes that have been successfully\n                   transmitted to S3 and the second representing the\n                   size of the to be transmitted object.\n\n        :type cb: int\n        :param num_cb: (optional) If a callback is specified with\n                       the cb parameter this parameter determines the\n                       granularity of the callback by defining\n                       the maximum number of times the callback will\n                       be called during the file transfer.\n\n        \"\"\"\n        return self.get_file(fp, headers, cb, num_cb, torrent=True)\n\n    def get_contents_to_file(self, fp, headers=None,\n                             cb=None, num_cb=10,\n                             torrent=False,\n                             version_id=None,\n                             res_download_handler=None,\n                             response_headers=None):\n        \"\"\"\n        Retrieve an object from S3 using the name of the Key object as the\n        key in S3.  Write the contents of the object to the file pointed\n        to by 'fp'.\n\n        :type fp: File -like object\n        :param fp:\n\n        :type headers: dict\n        :param headers: additional HTTP headers that will be sent with\n                        the GET request.\n\n        :type cb: function\n        :param cb: a callback function that will be called to report\n                   progress on the upload.  The callback should accept\n                   two integer parameters, the first representing the\n                   number of bytes that have been successfully\n                   transmitted to S3 and the second representing the\n                   size of the to be transmitted object.\n\n        :type cb: int\n        :param num_cb: (optional) If a callback is specified with\n                       the cb parameter this parameter determines the\n                       granularity of the callback by defining\n                       the maximum number of times the callback will\n                       be called during the file transfer.\n\n        :type torrent: bool\n        :param torrent: If True, returns the contents of a torrent\n                        file as a string.\n\n        :type res_upload_handler: ResumableDownloadHandler\n        :param res_download_handler: If provided, this handler will\n                                     perform the download.\n\n        :type response_headers: dict\n        :param response_headers: A dictionary containing HTTP headers/values\n                                 that will override any headers associated with\n                                 the stored object in the response.\n                                 See http://goo.gl/EWOPb for details.\n        \"\"\"\n        if self.bucket != None:\n            if res_download_handler:\n                res_download_handler.get_file(self, fp, headers, cb, num_cb,\n                                              torrent=torrent,\n                                              version_id=version_id)\n            else:\n                self.get_file(fp, headers, cb, num_cb, torrent=torrent,\n                              version_id=version_id,\n                              response_headers=response_headers)\n\n    def get_contents_to_filename(self, filename, headers=None,\n                                 cb=None, num_cb=10,\n                                 torrent=False,\n                                 version_id=None,\n                                 res_download_handler=None,\n                                 response_headers=None):\n        \"\"\"\n        Retrieve an object from S3 using the name of the Key object as the\n        key in S3.  Store contents of the object to a file named by 'filename'.\n        See get_contents_to_file method for details about the\n        parameters.\n\n        :type filename: string\n        :param filename: The filename of where to put the file contents\n\n        :type headers: dict\n        :param headers: Any additional headers to send in the request\n\n        :type cb: function\n        :param cb: a callback function that will be called to report\n                   progress on the upload.  The callback should accept\n                   two integer parameters, the first representing the\n                   number of bytes that have been successfully\n                   transmitted to S3 and the second representing the\n                   size of the to be transmitted object.\n\n        :type cb: int\n        :param num_cb: (optional) If a callback is specified with\n                       the cb parameter this parameter determines the\n                       granularity of the callback by defining\n                       the maximum number of times the callback will\n                       be called during the file transfer.\n\n        :type torrent: bool\n        :param torrent: If True, returns the contents of a torrent file\n                        as a string.\n\n        :type res_upload_handler: ResumableDownloadHandler\n        :param res_download_handler: If provided, this handler will\n                                     perform the download.\n\n        :type response_headers: dict\n        :param response_headers: A dictionary containing HTTP headers/values\n                                 that will override any headers associated with\n                                 the stored object in the response.\n                                 See http://goo.gl/EWOPb for details.\n        \"\"\"\n        fp = open(filename, 'wb')\n        self.get_contents_to_file(fp, headers, cb, num_cb, torrent=torrent,\n                                  version_id=version_id,\n                                  res_download_handler=res_download_handler,\n                                  response_headers=response_headers)\n        fp.close()\n        # if last_modified date was sent from s3, try to set file's timestamp\n        if self.last_modified != None:\n            try:\n                modified_tuple = rfc822.parsedate_tz(self.last_modified)\n                modified_stamp = int(rfc822.mktime_tz(modified_tuple))\n                os.utime(fp.name, (modified_stamp, modified_stamp))\n            except Exception: pass\n\n    def get_contents_as_string(self, headers=None,\n                               cb=None, num_cb=10,\n                               torrent=False,\n                               version_id=None,\n                               response_headers=None):\n        \"\"\"\n        Retrieve an object from S3 using the name of the Key object as the\n        key in S3.  Return the contents of the object as a string.\n        See get_contents_to_file method for details about the\n        parameters.\n\n        :type headers: dict\n        :param headers: Any additional headers to send in the request\n\n        :type cb: function\n        :param cb: a callback function that will be called to report\n                   progress on the upload.  The callback should accept\n                   two integer parameters, the first representing the\n                   number of bytes that have been successfully\n                   transmitted to S3 and the second representing the\n                   size of the to be transmitted object.\n\n        :type cb: int\n        :param num_cb: (optional) If a callback is specified with\n                       the cb parameter this parameter determines the\n                       granularity of the callback by defining\n                       the maximum number of times the callback will\n                       be called during the file transfer.\n\n        :type torrent: bool\n        :param torrent: If True, returns the contents of a torrent file\n                        as a string.\n\n        :type response_headers: dict\n        :param response_headers: A dictionary containing HTTP headers/values\n                                 that will override any headers associated with\n                                 the stored object in the response.\n                                 See http://goo.gl/EWOPb for details.\n\n        :rtype: string\n        :returns: The contents of the file as a string\n        \"\"\"\n        fp = StringIO.StringIO()\n        self.get_contents_to_file(fp, headers, cb, num_cb, torrent=torrent,\n                                  version_id=version_id,\n                                  response_headers=response_headers)\n        return fp.getvalue()\n\n    def add_email_grant(self, permission, email_address, headers=None):\n        \"\"\"\n        Convenience method that provides a quick way to add an email grant\n        to a key. This method retrieves the current ACL, creates a new\n        grant based on the parameters passed in, adds that grant to the ACL\n        and then PUT's the new ACL back to S3.\n\n        :type permission: string\n        :param permission: The permission being granted. Should be one of:\n                           (READ, WRITE, READ_ACP, WRITE_ACP, FULL_CONTROL).\n\n        :type email_address: string\n        :param email_address: The email address associated with the AWS\n                              account your are granting the permission to.\n\n        :type recursive: boolean\n        :param recursive: A boolean value to controls whether the command\n                          will apply the grant to all keys within the bucket\n                          or not.  The default value is False.  By passing a\n                          True value, the call will iterate through all keys\n                          in the bucket and apply the same grant to each key.\n                          CAUTION: If you have a lot of keys, this could take\n                          a long time!\n        \"\"\"\n        policy = self.get_acl(headers=headers)\n        policy.acl.add_email_grant(permission, email_address)\n        self.set_acl(policy, headers=headers)\n\n    def add_user_grant(self, permission, user_id, headers=None,\n                       display_name=None):\n        \"\"\"\n        Convenience method that provides a quick way to add a canonical\n        user grant to a key.  This method retrieves the current ACL,\n        creates a new grant based on the parameters passed in, adds that\n        grant to the ACL and then PUT's the new ACL back to S3.\n\n        :type permission: string\n        :param permission: The permission being granted. Should be one of:\n                           (READ, WRITE, READ_ACP, WRITE_ACP, FULL_CONTROL).\n\n        :type user_id: string\n        :param user_id:     The canonical user id associated with the AWS\n                            account your are granting the permission to.\n\n        :type display_name: string\n        :param display_name: An option string containing the user's\n                             Display Name.  Only required on Walrus.\n        \"\"\"\n        policy = self.get_acl()\n        policy.acl.add_user_grant(permission, user_id,\n                                  display_name=display_name)\n        self.set_acl(policy, headers=headers)\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/s3/multipart.py",
    "content": "# Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/\n# Copyright (c) 2010, Eucalyptus Systems, Inc.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nimport user\nimport key\nfrom boto import handler\nimport xml.sax\n\nclass CompleteMultiPartUpload(object):\n    \"\"\"\n    Represents a completed MultiPart Upload.  Contains the\n    following useful attributes:\n\n     * location - The URI of the completed upload\n     * bucket_name - The name of the bucket in which the upload\n                     is contained\n     * key_name - The name of the new, completed key\n     * etag - The MD5 hash of the completed, combined upload\n    \"\"\"\n\n    def __init__(self, bucket=None):\n        self.bucket = None\n        self.location = None\n        self.bucket_name = None\n        self.key_name = None\n        self.etag = None\n\n    def __repr__(self):\n        return '<CompleteMultiPartUpload: %s.%s>' % (self.bucket_name,\n                                                     self.key_name)\n        \n    def startElement(self, name, attrs, connection):\n        return None\n\n    def endElement(self, name, value, connection):\n        if name == 'Location':\n            self.location = value\n        elif name == 'Bucket':\n            self.bucket_name = value\n        elif name == 'Key':\n            self.key_name = value\n        elif name == 'ETag':\n            self.etag = value\n        else:\n            setattr(self, name, value)\n        \nclass Part(object):\n    \"\"\"\n    Represents a single part in a MultiPart upload.\n    Attributes include:\n\n     * part_number - The integer part number\n     * last_modified - The last modified date of this part\n     * etag - The MD5 hash of this part\n     * size - The size, in bytes, of this part\n    \"\"\"\n\n    def __init__(self, bucket=None):\n        self.bucket = bucket\n        self.part_number = None\n        self.last_modified = None\n        self.etag = None\n        self.size = None\n\n    def __repr__(self):\n        if isinstance(self.part_number, int):\n            return '<Part %d>' % self.part_number\n        else:\n            return '<Part %s>' % None\n        \n    def startElement(self, name, attrs, connection):\n        return None\n\n    def endElement(self, name, value, connection):\n        if name == 'PartNumber':\n            self.part_number = int(value)\n        elif name == 'LastModified':\n            self.last_modified = value\n        elif name == 'ETag':\n            self.etag = value\n        elif name == 'Size':\n            self.size = int(value)\n        else:\n            setattr(self, name, value)\n        \ndef part_lister(mpupload, part_number_marker=None):\n    \"\"\"\n    A generator function for listing parts of a multipart upload.\n    \"\"\"\n    more_results = True\n    part = None\n    while more_results:\n        parts = mpupload.get_all_parts(None, part_number_marker)\n        for part in parts:\n            yield part\n        part_number_marker = mpupload.next_part_number_marker\n        more_results= mpupload.is_truncated\n        \nclass MultiPartUpload(object):\n    \"\"\"\n    Represents a MultiPart Upload operation.\n    \"\"\"\n    \n    def __init__(self, bucket=None):\n        self.bucket = bucket\n        self.bucket_name = None\n        self.key_name = None\n        self.id = id\n        self.initiator = None\n        self.owner = None\n        self.storage_class = None\n        self.initiated = None\n        self.part_number_marker = None\n        self.next_part_number_marker = None\n        self.max_parts = None\n        self.is_truncated = False\n        self._parts = None\n\n    def __repr__(self):\n        return '<MultiPartUpload %s>' % self.key_name\n\n    def __iter__(self):\n        return part_lister(self)\n\n    def to_xml(self):\n        self.get_all_parts()\n        s = '<CompleteMultipartUpload>\\n'\n        for part in self:\n            s += '  <Part>\\n'\n            s += '    <PartNumber>%d</PartNumber>\\n' % part.part_number\n            s += '    <ETag>%s</ETag>\\n' % part.etag\n            s += '  </Part>\\n'\n        s += '</CompleteMultipartUpload>'\n        return s\n\n    def startElement(self, name, attrs, connection):\n        if name == 'Initiator':\n            self.initiator = user.User(self)\n            return self.initiator\n        elif name == 'Owner':\n            self.owner = user.User(self)\n            return self.owner\n        elif name == 'Part':\n            part = Part(self.bucket)\n            self._parts.append(part)\n            return part\n        return None\n\n    def endElement(self, name, value, connection):\n        if name == 'Bucket':\n            self.bucket_name = value\n        elif name == 'Key':\n            self.key_name = value\n        elif name == 'UploadId':\n            self.id = value\n        elif name == 'StorageClass':\n            self.storage_class = value\n        elif name == 'PartNumberMarker':\n            self.part_number_marker = value\n        elif name == 'NextPartNumberMarker':\n            self.next_part_number_marker = value\n        elif name == 'MaxParts':\n            self.max_parts = int(value)\n        elif name == 'IsTruncated':\n            if value == 'true':\n                self.is_truncated = True\n            else:\n                self.is_truncated = False\n        else:\n            setattr(self, name, value)\n\n    def get_all_parts(self, max_parts=None, part_number_marker=None):\n        \"\"\"\n        Return the uploaded parts of this MultiPart Upload.  This is\n        a lower-level method that requires you to manually page through\n        results.  To simplify this process, you can just use the\n        object itself as an iterator and it will automatically handle\n        all of the paging with S3.\n        \"\"\"\n        self._parts = []\n        query_args = 'uploadId=%s' % self.id\n        if max_parts:\n            query_args += '&max_parts=%d' % max_parts\n        if part_number_marker:\n            query_args += '&part-number-marker=%s' % part_number_marker\n        response = self.bucket.connection.make_request('GET', self.bucket.name,\n                                                       self.key_name,\n                                                       query_args=query_args)\n        body = response.read()\n        if response.status == 200:\n            h = handler.XmlHandler(self, self)\n            xml.sax.parseString(body, h)\n            return self._parts\n\n    def upload_part_from_file(self, fp, part_num, headers=None, replace=True,\n                               cb=None, num_cb=10, policy=None, md5=None):\n        \"\"\"\n        Upload another part of this MultiPart Upload.\n        \n        :type fp: file\n        :param fp: The file object you want to upload.\n        \n        :type part_num: int\n        :param part_num: The number of this part.\n\n        The other parameters are exactly as defined for the\n        :class:`boto.s3.key.Key` set_contents_from_file method.\n        \"\"\"\n        if part_num < 1:\n            raise ValueError('Part numbers must be greater than zero')\n        query_args = 'uploadId=%s&partNumber=%d' % (self.id, part_num)\n        key = self.bucket.new_key(self.key_name)\n        key.set_contents_from_file(fp, headers, replace, cb, num_cb, policy,\n                                   md5, reduced_redundancy=False,\n                                   query_args=query_args)\n\n    def complete_upload(self):\n        \"\"\"\n        Complete the MultiPart Upload operation.  This method should\n        be called when all parts of the file have been successfully\n        uploaded to S3.\n\n        :rtype: :class:`boto.s3.multipart.CompletedMultiPartUpload`\n        :returns: An object representing the completed upload.\n        \"\"\"\n        xml = self.to_xml()\n        return self.bucket.complete_multipart_upload(self.key_name,\n                                                     self.id, xml)\n\n    def cancel_upload(self):\n        \"\"\"\n        Cancels a MultiPart Upload operation.  The storage consumed by\n        any previously uploaded parts will be freed. However, if any\n        part uploads are currently in progress, those part uploads\n        might or might not succeed. As a result, it might be necessary\n        to abort a given multipart upload multiple times in order to\n        completely free all storage consumed by all parts.\n        \"\"\"\n        self.bucket.cancel_multipart_upload(self.key_name, self.id)\n\n\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/s3/prefix.py",
    "content": "# Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nclass Prefix(object):\n    def __init__(self, bucket=None, name=None):\n        self.bucket = bucket\n        self.name = name\n\n    def startElement(self, name, attrs, connection):\n        return None\n\n    def endElement(self, name, value, connection):\n        if name == 'Prefix':\n            self.name = value\n        else:\n            setattr(self, name, value)\n\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/s3/resumable_download_handler.py",
    "content": "# Copyright 2010 Google Inc.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nimport errno\nimport httplib\nimport os\nimport re\nimport socket\nimport time\nimport boto\nfrom boto import config, storage_uri_for_key\nfrom boto.connection import AWSAuthConnection\nfrom boto.exception import ResumableDownloadException\nfrom boto.exception import ResumableTransferDisposition\n\n\"\"\"\nResumable download handler.\n\nResumable downloads will retry failed downloads, resuming at the byte count\ncompleted by the last download attempt. If too many retries happen with no\nprogress (per configurable num_retries param), the download will be aborted.\n\nThe caller can optionally specify a tracker_file_name param in the\nResumableDownloadHandler constructor. If you do this, that file will\nsave the state needed to allow retrying later, in a separate process\n(e.g., in a later run of gsutil).\n\nNote that resumable downloads work across providers (they depend only\non support Range GETs), but this code is in the boto.s3 package\nbecause it is the wrong abstraction level to go in the top-level boto\npackage.\n\nTODO: At some point we should refactor the code to have a storage_service\npackage where all these provider-independent files go.\n\"\"\"\n\n\nclass ByteTranslatingCallbackHandler(object):\n    \"\"\"\n    Proxy class that translates progress callbacks made by\n    boto.s3.Key.get_file(), taking into account that we're resuming\n    a download.\n    \"\"\"\n    def __init__(self, proxied_cb, download_start_point):\n        self.proxied_cb = proxied_cb\n        self.download_start_point = download_start_point\n\n    def call(self, total_bytes_uploaded, total_size):\n        self.proxied_cb(self.download_start_point + total_bytes_uploaded,\n                        total_size)\n\n\ndef get_cur_file_size(fp, position_to_eof=False):\n    \"\"\"\n    Returns size of file, optionally leaving fp positioned at EOF.\n    \"\"\"\n    if not position_to_eof:\n        cur_pos = fp.tell()\n    fp.seek(0, os.SEEK_END)\n    cur_file_size = fp.tell()\n    if not position_to_eof:\n        fp.seek(cur_pos, os.SEEK_SET)\n    return cur_file_size\n\n\nclass ResumableDownloadHandler(object):\n    \"\"\"\n    Handler for resumable downloads.\n    \"\"\"\n\n    ETAG_REGEX = '([a-z0-9]{32})\\n'\n\n    RETRYABLE_EXCEPTIONS = (httplib.HTTPException, IOError, socket.error,\n                            socket.gaierror)\n\n    def __init__(self, tracker_file_name=None, num_retries=None):\n        \"\"\"\n        Constructor. Instantiate once for each downloaded file.\n\n        :type tracker_file_name: string\n        :param tracker_file_name: optional file name to save tracking info\n            about this download. If supplied and the current process fails\n            the download, it can be retried in a new process. If called\n            with an existing file containing an unexpired timestamp,\n            we'll resume the transfer for this file; else we'll start a\n            new resumable download.\n\n        :type num_retries: int\n        :param num_retries: the number of times we'll re-try a resumable\n            download making no progress. (Count resets every time we get\n            progress, so download can span many more than this number of\n            retries.)\n        \"\"\"\n        self.tracker_file_name = tracker_file_name\n        self.num_retries = num_retries\n        self.etag_value_for_current_download = None\n        if tracker_file_name:\n            self._load_tracker_file_etag()\n        # Save download_start_point in instance state so caller can\n        # find how much was transferred by this ResumableDownloadHandler\n        # (across retries).\n        self.download_start_point = None\n\n    def _load_tracker_file_etag(self):\n        f = None\n        try:\n            f = open(self.tracker_file_name, 'r')\n            etag_line = f.readline()\n            m = re.search(self.ETAG_REGEX, etag_line)\n            if m:\n                self.etag_value_for_current_download = m.group(1)\n            else:\n                print('Couldn\\'t read etag in tracker file (%s). Restarting '\n                      'download from scratch.' % self.tracker_file_name)\n        except IOError, e:\n            # Ignore non-existent file (happens first time a download\n            # is attempted on an object), but warn user for other errors.\n            if e.errno != errno.ENOENT:\n                # Will restart because\n                # self.etag_value_for_current_download == None.\n                print('Couldn\\'t read URI tracker file (%s): %s. Restarting '\n                      'download from scratch.' %\n                      (self.tracker_file_name, e.strerror))\n        finally:\n            if f:\n                f.close()\n\n    def _save_tracker_info(self, key):\n        self.etag_value_for_current_download = key.etag.strip('\"\\'')\n        if not self.tracker_file_name:\n            return\n        f = None\n        try:\n            f = open(self.tracker_file_name, 'w')\n            f.write('%s\\n' % self.etag_value_for_current_download)\n        except IOError, e:\n            raise ResumableDownloadException(\n                'Couldn\\'t write tracker file (%s): %s.\\nThis can happen'\n                'if you\\'re using an incorrectly configured download tool\\n'\n                '(e.g., gsutil configured to save tracker files to an '\n                'unwritable directory)' %\n                (self.tracker_file_name, e.strerror),\n                ResumableTransferDisposition.ABORT)\n        finally:\n            if f:\n                f.close()\n\n    def _remove_tracker_file(self):\n        if (self.tracker_file_name and\n            os.path.exists(self.tracker_file_name)):\n                os.unlink(self.tracker_file_name)\n\n    def _attempt_resumable_download(self, key, fp, headers, cb, num_cb,\n                                    torrent, version_id):\n        \"\"\"\n        Attempts a resumable download.\n\n        Raises ResumableDownloadException if any problems occur.\n        \"\"\"\n        cur_file_size = get_cur_file_size(fp, position_to_eof=True)\n\n        if (cur_file_size and \n            self.etag_value_for_current_download and\n            self.etag_value_for_current_download == key.etag.strip('\"\\'')):\n            # Try to resume existing transfer.\n            if cur_file_size > key.size:\n              raise ResumableDownloadException(\n                  '%s is larger (%d) than %s (%d).\\nDeleting tracker file, so '\n                  'if you re-try this download it will start from scratch' %\n                  (fp.name, cur_file_size, str(storage_uri_for_key(key)),\n                   key.size), ResumableTransferDisposition.ABORT)\n            elif cur_file_size == key.size:\n                if key.bucket.connection.debug >= 1:\n                    print 'Download complete.'\n                return\n            if key.bucket.connection.debug >= 1:\n                print 'Resuming download.'\n            headers = headers.copy()\n            headers['Range'] = 'bytes=%d-%d' % (cur_file_size, key.size - 1)\n            cb = ByteTranslatingCallbackHandler(cb, cur_file_size).call\n            self.download_start_point = cur_file_size\n        else:\n            if key.bucket.connection.debug >= 1:\n                print 'Starting new resumable download.'\n            self._save_tracker_info(key)\n            self.download_start_point = 0\n            # Truncate the file, in case a new resumable download is being\n            # started atop an existing file.\n            fp.truncate(0)\n\n        # Disable AWSAuthConnection-level retry behavior, since that would\n        # cause downloads to restart from scratch.\n        key.get_file(fp, headers, cb, num_cb, torrent, version_id,\n                     override_num_retries=0)\n        fp.flush()\n\n    def _check_final_md5(self, key, file_name):\n        \"\"\"\n        Checks that etag from server agrees with md5 computed after the\n        download completes. This is important, since the download could\n        have spanned a number of hours and multiple processes (e.g.,\n        gsutil runs), and the user could change some of the file and not\n        realize they have inconsistent data.\n        \"\"\"\n        fp = open(file_name, 'r')\n        if key.bucket.connection.debug >= 1:\n            print 'Checking md5 against etag.'\n        hex_md5 = key.compute_md5(fp)[0]\n        if hex_md5 != key.etag.strip('\"\\''):\n            file_name = fp.name\n            fp.close()\n            os.unlink(file_name)\n            raise ResumableDownloadException(\n                'File changed during download: md5 signature doesn\\'t match '\n                'etag (incorrect downloaded file deleted)',\n                ResumableTransferDisposition.ABORT)\n\n    def get_file(self, key, fp, headers, cb=None, num_cb=10, torrent=False,\n                 version_id=None):\n        \"\"\"\n        Retrieves a file from a Key\n        :type key: :class:`boto.s3.key.Key` or subclass\n        :param key: The Key object from which upload is to be downloaded\n        \n        :type fp: file\n        :param fp: File pointer into which data should be downloaded\n        \n        :type headers: string\n        :param: headers to send when retrieving the files\n        \n        :type cb: function\n        :param cb: (optional) a callback function that will be called to report\n             progress on the download.  The callback should accept two integer\n             parameters, the first representing the number of bytes that have\n             been successfully transmitted from the storage service and\n             the second representing the total number of bytes that need\n             to be transmitted.\n        \n        :type num_cb: int\n        :param num_cb: (optional) If a callback is specified with the cb\n             parameter this parameter determines the granularity of the callback\n             by defining the maximum number of times the callback will be\n             called during the file transfer.\n             \n        :type torrent: bool\n        :param torrent: Flag for whether to get a torrent for the file\n\n        :type version_id: string\n        :param version_id: The version ID (optional)\n\n        Raises ResumableDownloadException if a problem occurs during\n            the transfer.\n        \"\"\"\n\n        debug = key.bucket.connection.debug\n        if not headers:\n            headers = {}\n\n        # Use num-retries from constructor if one was provided; else check\n        # for a value specified in the boto config file; else default to 5.\n        if self.num_retries is None:\n            self.num_retries = config.getint('Boto', 'num_retries', 5)\n        progress_less_iterations = 0\n\n        while True:  # Retry as long as we're making progress.\n            had_file_bytes_before_attempt = get_cur_file_size(fp)\n            try:\n                self._attempt_resumable_download(key, fp, headers, cb, num_cb,\n                                                 torrent, version_id)\n                # Download succceded, so remove the tracker file (if have one).\n                self._remove_tracker_file()\n                self._check_final_md5(key, fp.name)\n                if debug >= 1:\n                    print 'Resumable download complete.'\n                return\n            except self.RETRYABLE_EXCEPTIONS, e:\n                if debug >= 1:\n                    print('Caught exception (%s)' % e.__repr__())\n                if isinstance(e, IOError) and e.errno == errno.EPIPE:\n                    # Broken pipe error causes httplib to immediately\n                    # close the socket (http://bugs.python.org/issue5542),\n                    # so we need to close and reopen the key before resuming\n                    # the download.\n                    key.get_file(fp, headers, cb, num_cb, torrent, version_id,\n                                 override_num_retries=0)\n            except ResumableDownloadException, e:\n                if (e.disposition ==\n                    ResumableTransferDisposition.ABORT_CUR_PROCESS):\n                    if debug >= 1:\n                        print('Caught non-retryable ResumableDownloadException '\n                              '(%s)' % e.message)\n                    raise\n                elif (e.disposition ==\n                    ResumableTransferDisposition.ABORT):\n                    if debug >= 1:\n                        print('Caught non-retryable ResumableDownloadException '\n                              '(%s); aborting and removing tracker file' %\n                              e.message)\n                    self._remove_tracker_file()\n                    raise\n                else:\n                    if debug >= 1:\n                        print('Caught ResumableDownloadException (%s) - will '\n                              'retry' % e.message)\n\n            # At this point we had a re-tryable failure; see if made progress.\n            if get_cur_file_size(fp) > had_file_bytes_before_attempt:\n                progress_less_iterations = 0\n            else:\n                progress_less_iterations += 1\n\n            if progress_less_iterations > self.num_retries:\n                # Don't retry any longer in the current process.\n                raise ResumableDownloadException(\n                    'Too many resumable download attempts failed without '\n                    'progress. You might try this download again later',\n                    ResumableTransferDisposition.ABORT_CUR_PROCESS)\n\n            # Close the key, in case a previous download died partway\n            # through and left data in the underlying key HTTP buffer.\n            # Do this within a try/except block in case the connection is\n            # closed (since key.close() attempts to do a final read, in which\n            # case this read attempt would get an IncompleteRead exception,\n            # which we can safely ignore.\n            try:\n                key.close()\n            except httplib.IncompleteRead:\n                pass\n\n            sleep_time_secs = 2**progress_less_iterations\n            if debug >= 1:\n                print('Got retryable failure (%d progress-less in a row).\\n'\n                      'Sleeping %d seconds before re-trying' %\n                      (progress_less_iterations, sleep_time_secs))\n            time.sleep(sleep_time_secs)\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/s3/user.py",
    "content": "# Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nclass User:\n    def __init__(self, parent=None, id='', display_name=''):\n        if parent:\n            parent.owner = self\n        self.type = None\n        self.id = id\n        self.display_name = display_name\n\n    def startElement(self, name, attrs, connection):\n        return None\n\n    def endElement(self, name, value, connection):\n        if name == 'DisplayName':\n            self.display_name = value\n        elif name == 'ID':\n            self.id = value\n        else:\n            setattr(self, name, value)\n\n    def to_xml(self, element_name='Owner'):\n        if self.type:\n            s = '<%s xsi:type=\"%s\">' % (element_name, self.type)\n        else:\n            s = '<%s>' % element_name\n        s += '<ID>%s</ID>' % self.id\n        s += '<DisplayName>%s</DisplayName>' % self.display_name\n        s += '</%s>' % element_name\n        return s        \n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/sdb/__init__.py",
    "content": "# Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n#\n\nfrom regioninfo import SDBRegionInfo\n\ndef regions():\n    \"\"\"\n    Get all available regions for the SDB service.\n\n    :rtype: list\n    :return: A list of :class:`boto.sdb.regioninfo.RegionInfo` instances\n    \"\"\"\n    return [SDBRegionInfo(name='us-east-1',\n                          endpoint='sdb.amazonaws.com'),\n            SDBRegionInfo(name='eu-west-1',\n                          endpoint='sdb.eu-west-1.amazonaws.com'),\n            SDBRegionInfo(name='us-west-1',\n                          endpoint='sdb.us-west-1.amazonaws.com'),\n            SDBRegionInfo(name='ap-northeast-1',\n                          endpoint='sdb.ap-northeast-1.amazonaws.com'),\n            SDBRegionInfo(name='ap-southeast-1',\n                          endpoint='sdb.ap-southeast-1.amazonaws.com')\n            ]\n\ndef connect_to_region(region_name, **kw_params):\n    \"\"\"\n    Given a valid region name, return a \n    :class:`boto.sdb.connection.SDBConnection`.\n\n    :type: str\n    :param region_name: The name of the region to connect to.\n    \n    :rtype: :class:`boto.sdb.connection.SDBConnection` or ``None``\n    :return: A connection to the given region, or None if an invalid region\n             name is given\n    \"\"\"\n    for region in regions():\n        if region.name == region_name:\n            return region.connect(**kw_params)\n    return None\n\ndef get_region(region_name, **kw_params):\n    \"\"\"\n    Find and return a :class:`boto.sdb.regioninfo.RegionInfo` object\n    given a region name.\n\n    :type: str\n    :param: The name of the region.\n\n    :rtype: :class:`boto.sdb.regioninfo.RegionInfo`\n    :return: The RegionInfo object for the given region or None if\n             an invalid region name is provided.\n    \"\"\"\n    for region in regions(**kw_params):\n        if region.name == region_name:\n            return region\n    return None\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/sdb/connection.py",
    "content": "# Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nimport xml.sax\nimport threading\nimport boto\nfrom boto import handler\nfrom boto.connection import AWSQueryConnection\nfrom boto.sdb.domain import Domain, DomainMetaData\nfrom boto.sdb.item import Item\nfrom boto.sdb.regioninfo import SDBRegionInfo\nfrom boto.exception import SDBResponseError\n\nclass ItemThread(threading.Thread):\n    \"\"\"\n    A threaded :class:`Item <boto.sdb.item.Item>` retriever utility class. \n    Retrieved :class:`Item <boto.sdb.item.Item>` objects are stored in the\n    ``items`` instance variable after :py:meth:`run() <run>` is called.\n    \n    .. tip:: The item retrieval will not start until\n        the :func:`run() <boto.sdb.connection.ItemThread.run>` method is called.\n    \"\"\"\n    def __init__(self, name, domain_name, item_names):\n        \"\"\"\n        :param str name: A thread name. Used for identification.\n        :param str domain_name: The name of a SimpleDB \n            :class:`Domain <boto.sdb.domain.Domain>`\n        :type item_names: string or list of strings\n        :param item_names: The name(s) of the items to retrieve from the specified\n            :class:`Domain <boto.sdb.domain.Domain>`.\n        :ivar list items: A list of items retrieved. Starts as empty list.\n        \"\"\"\n        threading.Thread.__init__(self, name=name)\n        #print 'starting %s with %d items' % (name, len(item_names))\n        self.domain_name = domain_name\n        self.conn = SDBConnection()\n        self.item_names = item_names\n        self.items = []\n\n    def run(self):\n        \"\"\"\n        Start the threaded retrieval of items. Populates the \n        ``items`` list with :class:`Item <boto.sdb.item.Item>` objects.\n        \"\"\"\n        for item_name in self.item_names:\n            item = self.conn.get_attributes(self.domain_name, item_name)\n            self.items.append(item)\n\n#boto.set_stream_logger('sdb')\n\nclass SDBConnection(AWSQueryConnection):\n    \"\"\"\n    This class serves as a gateway to your SimpleDB region (defaults to\n    us-east-1). Methods within allow access to SimpleDB \n    :class:`Domain <boto.sdb.domain.Domain>` objects and their associated\n    :class:`Item <boto.sdb.item.Item>` objects.\n    \n    .. tip::\n        While you may instantiate this class directly, it may be easier to\n        go through :py:func:`boto.connect_sdb`.\n    \"\"\"\n    DefaultRegionName = 'us-east-1'\n    DefaultRegionEndpoint = 'sdb.amazonaws.com'\n    APIVersion = '2009-04-15'\n    ResponseError = SDBResponseError\n\n    def __init__(self, aws_access_key_id=None, aws_secret_access_key=None,\n                 is_secure=True, port=None, proxy=None, proxy_port=None,\n                 proxy_user=None, proxy_pass=None, debug=0,\n                 https_connection_factory=None, region=None, path='/',\n                 converter=None, security_token=None):\n        \"\"\"\n        For any keywords that aren't documented, refer to the parent class,\n        :py:class:`boto.connection.AWSAuthConnection`. You can avoid having\n        to worry about these keyword arguments by instantiating these objects\n        via :py:func:`boto.connect_sdb`.\n    \n        :type region: :class:`boto.sdb.regioninfo.SDBRegionInfo`\n        :keyword region: Explicitly specify a region. Defaults to ``us-east-1``\n            if not specified. You may also specify the region in your ``boto.cfg``:\n\n            .. code-block:: cfg\n\n                [SDB]\n                region = eu-west-1\n\n        \"\"\"\n        if not region:\n            region_name = boto.config.get('SDB', 'region', self.DefaultRegionName)\n            for reg in boto.sdb.regions():\n                if reg.name == region_name:\n                    region = reg\n                    break\n\n        self.region = region\n        AWSQueryConnection.__init__(self, aws_access_key_id,\n                                    aws_secret_access_key,\n                                    is_secure, port, proxy,\n                                    proxy_port, proxy_user, proxy_pass,\n                                    self.region.endpoint, debug,\n                                    https_connection_factory, path,\n                                    security_token=security_token)\n        self.box_usage = 0.0\n        self.converter = converter\n        self.item_cls = Item\n\n    def _required_auth_capability(self):\n        return ['sdb']\n\n    def set_item_cls(self, cls):\n        \"\"\"\n        While the default item class is :py:class:`boto.sdb.item.Item`, this\n        default may be overridden. Use this method to change a connection's\n        item class.\n        \n        :param object cls: The new class to set as this connection's item\n            class. See the default item class for inspiration as to what your\n            replacement should/could look like.\n        \"\"\"\n        self.item_cls = cls\n\n    def _build_name_value_list(self, params, attributes, replace=False,\n                              label='Attribute'):\n        keys = attributes.keys()\n        keys.sort()\n        i = 1\n        for key in keys:\n            value = attributes[key]\n            if isinstance(value, list):\n                for v in value:\n                    params['%s.%d.Name' % (label, i)] = key\n                    if self.converter:\n                        v = self.converter.encode(v)\n                    params['%s.%d.Value' % (label, i)] = v\n                    if replace:\n                        params['%s.%d.Replace' % (label, i)] = 'true'\n                    i += 1\n            else:\n                params['%s.%d.Name' % (label, i)] = key\n                if self.converter:\n                    value = self.converter.encode(value)\n                params['%s.%d.Value' % (label, i)] = value\n                if replace:\n                    params['%s.%d.Replace' % (label, i)] = 'true'\n            i += 1\n\n    def _build_expected_value(self, params, expected_value):\n        params['Expected.1.Name'] = expected_value[0]\n        if expected_value[1] is True:\n            params['Expected.1.Exists'] = 'true'\n        elif expected_value[1] is False:\n            params['Expected.1.Exists'] = 'false'\n        else:\n            params['Expected.1.Value'] = expected_value[1]\n\n    def _build_batch_list(self, params, items, replace=False):\n        item_names = items.keys()\n        i = 0\n        for item_name in item_names:\n            params['Item.%d.ItemName' % i] = item_name\n            j = 0\n            item = items[item_name]\n            if item is not None:\n                attr_names = item.keys()\n                for attr_name in attr_names:\n                    value = item[attr_name]\n                    if isinstance(value, list):\n                        for v in value:\n                            if self.converter:\n                                v = self.converter.encode(v)\n                            params['Item.%d.Attribute.%d.Name' % (i, j)] = attr_name\n                            params['Item.%d.Attribute.%d.Value' % (i, j)] = v\n                            if replace:\n                                params['Item.%d.Attribute.%d.Replace' % (i, j)] = 'true'\n                            j += 1\n                    else:\n                        params['Item.%d.Attribute.%d.Name' % (i, j)] = attr_name\n                        if self.converter:\n                            value = self.converter.encode(value)\n                        params['Item.%d.Attribute.%d.Value' % (i, j)] = value\n                        if replace:\n                            params['Item.%d.Attribute.%d.Replace' % (i, j)] = 'true'\n                        j += 1\n            i += 1\n\n    def _build_name_list(self, params, attribute_names):\n        i = 1\n        attribute_names.sort()\n        for name in attribute_names:\n            params['Attribute.%d.Name' % i] = name\n            i += 1\n\n    def get_usage(self):\n        \"\"\"\n        Returns the BoxUsage (in USD) accumulated on this specific SDBConnection \n        instance.\n\n        .. tip:: This can be out of date, and should only be treated as a\n            rough estimate. Also note that this estimate only applies to the\n            requests made on this specific connection instance. It is by\n            no means an account-wide estimate.\n\n        :rtype: float\n        :return: The accumulated BoxUsage of all requests made on the connection.\n        \"\"\"\n        return self.box_usage\n\n    def print_usage(self):\n        \"\"\"\n        Print the BoxUsage and approximate costs of all requests made on\n        this specific SDBConnection instance.\n        \n        .. tip:: This can be out of date, and should only be treated as a\n            rough estimate. Also note that this estimate only applies to the\n            requests made on this specific connection instance. It is by\n            no means an account-wide estimate.\n        \"\"\"\n        print 'Total Usage: %f compute seconds' % self.box_usage\n        cost = self.box_usage * 0.14\n        print 'Approximate Cost: $%f' % cost\n\n    def get_domain(self, domain_name, validate=True):\n        \"\"\"\n        Retrieves a :py:class:`boto.sdb.domain.Domain` object whose name\n        matches ``domain_name``.\n        \n        :param str domain_name: The name of the domain to retrieve\n        :keyword bool validate: When ``True``, check to see if the domain\n            actually exists. If ``False``, blindly return a\n            :py:class:`Domain <boto.sdb.domain.Domain>` object with the \n            specified name set.\n\n        :raises: \n            :py:class:`boto.exception.SDBResponseError` if ``validate`` is\n            ``True`` and no match could be found.\n\n        :rtype: :py:class:`boto.sdb.domain.Domain`\n        :return: The requested domain\n        \"\"\"\n        domain = Domain(self, domain_name)\n        if validate:\n            self.select(domain, \"\"\"select * from `%s` limit 1\"\"\" % domain_name)\n        return domain\n\n    def lookup(self, domain_name, validate=True):\n        \"\"\"\n        Lookup an existing SimpleDB domain. This differs from \n        :py:meth:`get_domain` in that ``None`` is returned if ``validate`` is\n        ``True`` and no match was found (instead of raising an exception).\n\n        :param str domain_name: The name of the domain to retrieve\n        \n        :param bool validate: If ``True``, a ``None`` value will be returned\n            if the specified domain can't be found. If ``False``, a\n            :py:class:`Domain <boto.sdb.domain.Domain>` object will be dumbly\n            returned, regardless of whether it actually exists.\n\n        :rtype: :class:`boto.sdb.domain.Domain` object or ``None``\n        :return: The Domain object or ``None`` if the domain does not exist.\n        \"\"\"\n        try:\n            domain = self.get_domain(domain_name, validate)\n        except:\n            domain = None\n        return domain\n\n    def get_all_domains(self, max_domains=None, next_token=None):\n        \"\"\"\n        Returns a :py:class:`boto.resultset.ResultSet` containing\n        all :py:class:`boto.sdb.domain.Domain` objects associated with\n        this connection's Access Key ID.\n        \n        :keyword int max_domains: Limit the returned \n            :py:class:`ResultSet <boto.resultset.ResultSet>` to the specified\n            number of members.\n        :keyword str next_token: A token string that was returned in an\n            earlier call to this method as the ``next_token`` attribute\n            on the returned :py:class:`ResultSet <boto.resultset.ResultSet>`\n            object. This attribute is set if there are more than Domains than\n            the value specified in the ``max_domains`` keyword. Pass the\n            ``next_token`` value from you earlier query in this keyword to\n            get the next 'page' of domains.\n        \"\"\"\n        params = {}\n        if max_domains:\n            params['MaxNumberOfDomains'] = max_domains\n        if next_token:\n            params['NextToken'] = next_token\n        return self.get_list('ListDomains', params, [('DomainName', Domain)])\n\n    def create_domain(self, domain_name):\n        \"\"\"\n        Create a SimpleDB domain.\n\n        :type domain_name: string\n        :param domain_name: The name of the new domain\n\n        :rtype: :class:`boto.sdb.domain.Domain` object\n        :return: The newly created domain\n        \"\"\"\n        params = {'DomainName':domain_name}\n        d = self.get_object('CreateDomain', params, Domain)\n        d.name = domain_name\n        return d\n\n    def get_domain_and_name(self, domain_or_name):\n        \"\"\"\n        Given a ``str`` or :class:`boto.sdb.domain.Domain`, return a\n        ``tuple`` with the following members (in order):\n        \n            * In instance of :class:`boto.sdb.domain.Domain` for the requested\n              domain\n            * The domain's name as a ``str``\n            \n        :type domain_or_name: ``str`` or :class:`boto.sdb.domain.Domain`\n        :param domain_or_name: The domain or domain name to get the domain\n            and name for.\n            \n        :raises: :class:`boto.exception.SDBResponseError` when an invalid\n            domain name is specified.\n            \n        :rtype: tuple\n        :return: A ``tuple`` with contents outlined as per above.\n        \"\"\"\n        if (isinstance(domain_or_name, Domain)):\n            return (domain_or_name, domain_or_name.name)\n        else:\n            return (self.get_domain(domain_or_name), domain_or_name)\n\n    def delete_domain(self, domain_or_name):\n        \"\"\"\n        Delete a SimpleDB domain.\n\n        .. caution:: This will delete the domain and all items within the domain.\n\n        :type domain_or_name: string or :class:`boto.sdb.domain.Domain` object.\n        :param domain_or_name: Either the name of a domain or a Domain object\n\n        :rtype: bool\n        :return: True if successful\n        \n        \"\"\"\n        domain, domain_name = self.get_domain_and_name(domain_or_name)\n        params = {'DomainName':domain_name}\n        return self.get_status('DeleteDomain', params)\n\n    def domain_metadata(self, domain_or_name):\n        \"\"\"\n        Get the Metadata for a SimpleDB domain.\n\n        :type domain_or_name: string or :class:`boto.sdb.domain.Domain` object.\n        :param domain_or_name: Either the name of a domain or a Domain object\n\n        :rtype: :class:`boto.sdb.domain.DomainMetaData` object\n        :return: The newly created domain metadata object\n        \"\"\"\n        domain, domain_name = self.get_domain_and_name(domain_or_name)\n        params = {'DomainName':domain_name}\n        d = self.get_object('DomainMetadata', params, DomainMetaData)\n        d.domain = domain\n        return d\n\n    def put_attributes(self, domain_or_name, item_name, attributes,\n                       replace=True, expected_value=None):\n        \"\"\"\n        Store attributes for a given item in a domain.\n        \n        :type domain_or_name: string or :class:`boto.sdb.domain.Domain` object.\n        :param domain_or_name: Either the name of a domain or a Domain object\n        \n        :type item_name: string\n        :param item_name: The name of the item whose attributes are being\n                          stored.\n        \n        :type attribute_names: dict or dict-like object\n        :param attribute_names: The name/value pairs to store as attributes\n        \n        :type expected_value: list\n        :param expected_value: If supplied, this is a list or tuple consisting\n            of a single attribute name and expected value. The list can be \n            of the form:\n            \n                * ['name', 'value']\n             \n            In which case the call will first verify that the attribute \"name\" \n            of this item has a value of \"value\".  If it does, the delete\n            will proceed, otherwise a ConditionalCheckFailed error will be \n            returned. The list can also be of the form:\n            \n                * ['name', True|False]\n            \n            which will simply check for the existence (True) or \n            non-existence (False) of the attribute.\n        \n        :type replace: bool\n        :param replace: Whether the attribute values passed in will replace\n                        existing values or will be added as addition values.\n                        Defaults to True.\n        \n        :rtype: bool\n        :return: True if successful\n        \"\"\"\n        domain, domain_name = self.get_domain_and_name(domain_or_name)\n        params = {'DomainName' : domain_name,\n                  'ItemName' : item_name}\n        self._build_name_value_list(params, attributes, replace)\n        if expected_value:\n            self._build_expected_value(params, expected_value)\n        return self.get_status('PutAttributes', params)\n\n    def batch_put_attributes(self, domain_or_name, items, replace=True):\n        \"\"\"\n        Store attributes for multiple items in a domain.\n        \n        :type domain_or_name: string or :class:`boto.sdb.domain.Domain` object.\n        :param domain_or_name: Either the name of a domain or a Domain object\n\n        :type items: dict or dict-like object\n        :param items: A dictionary-like object.  The keys of the dictionary are\n                      the item names and the values are themselves dictionaries\n                      of attribute names/values, exactly the same as the\n                      attribute_names parameter of the scalar put_attributes\n                      call.\n        \n        :type replace: bool\n        :param replace: Whether the attribute values passed in will replace\n                        existing values or will be added as addition values.\n                        Defaults to True.\n        \n        :rtype: bool\n        :return: True if successful\n        \"\"\"\n        domain, domain_name = self.get_domain_and_name(domain_or_name)\n        params = {'DomainName' : domain_name}\n        self._build_batch_list(params, items, replace)\n        return self.get_status('BatchPutAttributes', params, verb='POST')\n\n    def get_attributes(self, domain_or_name, item_name, attribute_names=None,\n                       consistent_read=False, item=None):\n        \"\"\"\n        Retrieve attributes for a given item in a domain.\n\n        :type domain_or_name: string or :class:`boto.sdb.domain.Domain` object.\n        :param domain_or_name: Either the name of a domain or a Domain object\n\n        :type item_name: string\n        :param item_name: The name of the item whose attributes are \n            being retrieved.\n\n        :type attribute_names: string or list of strings\n        :param attribute_names: An attribute name or list of attribute names.\n            This parameter is optional.  If not supplied, all attributes will \n            be retrieved for the item.\n\n        :type consistent_read: bool\n        :param consistent_read: When set to true, ensures that the most recent\n            data is returned.\n                                \n        :type item: :class:`boto.sdb.item.Item`\n        :keyword item: Instead of instantiating a new Item object, you may\n            specify one to update.\n\n        :rtype: :class:`boto.sdb.item.Item`\n        :return: An Item with the requested attribute name/values set on it\n        \"\"\"\n        domain, domain_name = self.get_domain_and_name(domain_or_name)\n        params = {'DomainName' : domain_name,\n                  'ItemName' : item_name}\n        if consistent_read:\n            params['ConsistentRead'] = 'true'\n        if attribute_names:\n            if not isinstance(attribute_names, list):\n                attribute_names = [attribute_names]\n            self.build_list_params(params, attribute_names, 'AttributeName')\n        response = self.make_request('GetAttributes', params)\n        body = response.read()\n        if response.status == 200:\n            if item == None:\n                item = self.item_cls(domain, item_name)\n            h = handler.XmlHandler(item, self)\n            xml.sax.parseString(body, h)\n            return item\n        else:\n            raise SDBResponseError(response.status, response.reason, body)\n\n    def delete_attributes(self, domain_or_name, item_name, attr_names=None,\n                          expected_value=None):\n        \"\"\"\n        Delete attributes from a given item in a domain.\n\n        :type domain_or_name: string or :class:`boto.sdb.domain.Domain` object.\n        :param domain_or_name: Either the name of a domain or a Domain object\n\n        :type item_name: string\n        :param item_name: The name of the item whose attributes are being\n                          deleted.\n\n        :type attributes: dict, list or :class:`boto.sdb.item.Item`\n        :param attributes: Either a list containing attribute names which\n                           will cause all values associated with that attribute\n                           name to be deleted or a dict or Item containing the\n                           attribute names and keys and list of values to\n                           delete as the value.  If no value is supplied,\n                           all attribute name/values for the item will be\n                           deleted.\n                           \n        :type expected_value: list\n        :param expected_value: If supplied, this is a list or tuple consisting\n            of a single attribute name and expected value. The list can be \n            of the form:\n\n                * ['name', 'value']\n\n            In which case the call will first verify that the attribute \"name\" \n            of this item has a value of \"value\".  If it does, the delete\n            will proceed, otherwise a ConditionalCheckFailed error will be \n            returned. The list can also be of the form:\n\n                * ['name', True|False]\n\n            which will simply check for the existence (True) or \n            non-existence (False) of the attribute.\n\n        :rtype: bool\n        :return: True if successful\n        \"\"\"\n        domain, domain_name = self.get_domain_and_name(domain_or_name)\n        params = {'DomainName':domain_name,\n                  'ItemName' : item_name}\n        if attr_names:\n            if isinstance(attr_names, list):\n                self._build_name_list(params, attr_names)\n            elif isinstance(attr_names, dict) or isinstance(attr_names, self.item_cls):\n                self._build_name_value_list(params, attr_names)\n        if expected_value:\n            self._build_expected_value(params, expected_value)\n        return self.get_status('DeleteAttributes', params)\n\n    def batch_delete_attributes(self, domain_or_name, items):\n        \"\"\"\n        Delete multiple items in a domain.\n        \n        :type domain_or_name: string or :class:`boto.sdb.domain.Domain` object.\n        :param domain_or_name: Either the name of a domain or a Domain object\n\n        :type items: dict or dict-like object\n        :param items: A dictionary-like object.  The keys of the dictionary are\n            the item names and the values are either:\n            \n                * dictionaries of attribute names/values, exactly the\n                  same as the attribute_names parameter of the scalar\n                  put_attributes call.  The attribute name/value pairs\n                  will only be deleted if they match the name/value\n                  pairs passed in.\n                * None which means that all attributes associated\n                  with the item should be deleted.  \n\n        :return: True if successful\n        \"\"\"\n        domain, domain_name = self.get_domain_and_name(domain_or_name)\n        params = {'DomainName' : domain_name}\n        self._build_batch_list(params, items, False)\n        return self.get_status('BatchDeleteAttributes', params, verb='POST')\n\n    def select(self, domain_or_name, query='', next_token=None,\n               consistent_read=False):\n        \"\"\"\n        Returns a set of Attributes for item names within domain_name that\n        match the query.  The query must be expressed in using the SELECT\n        style syntax rather than the original SimpleDB query language.\n        Even though the select request does not require a domain object,\n        a domain object must be passed into this method so the Item objects\n        returned can point to the appropriate domain.\n        \n        :type domain_or_name: string or :class:`boto.sdb.domain.Domain` object\n        :param domain_or_name: Either the name of a domain or a Domain object\n\n        :type query: string\n        :param query: The SimpleDB query to be performed.\n\n        :type consistent_read: bool\n        :param consistent_read: When set to true, ensures that the most recent\n                                data is returned.\n\n        :rtype: ResultSet\n        :return: An iterator containing the results.\n        \"\"\"\n        domain, domain_name = self.get_domain_and_name(domain_or_name)\n        params = {'SelectExpression' : query}\n        if consistent_read:\n            params['ConsistentRead'] = 'true'\n        if next_token:\n            params['NextToken'] = next_token\n        try:\n            return self.get_list('Select', params, [('Item', self.item_cls)],\n                             parent=domain)\n        except SDBResponseError, e:\n            e.body = \"Query: %s\\n%s\" % (query, e.body)\n            raise e\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/sdb/db/__init__.py",
    "content": "# Copyright (c) 2006,2007,2008 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/sdb/db/blob.py",
    "content": "# Copyright (c) 2006,2007,2008 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\n\nclass Blob(object):\n    \"\"\"Blob object\"\"\"\n    def __init__(self, value=None, file=None, id=None):\n        self._file = file\n        self.id = id\n        self.value = value\n\n    @property\n    def file(self):\n        from StringIO import StringIO\n        if self._file:\n            f = self._file\n        else:\n            f = StringIO(self.value)\n        return f\n\n    def __str__(self):\n        return unicode(self).encode('utf-8')\n\n    def __unicode__(self):\n        if hasattr(self.file, \"get_contents_as_string\"):\n            value = self.file.get_contents_as_string()\n        else:\n            value = self.file.getvalue()\n        if isinstance(value, unicode):\n            return value\n        else:\n            return value.decode('utf-8')\n\n\n    def read(self):\n        if hasattr(self.file, \"get_contents_as_string\"):\n            return self.file.get_contents_as_string()\n        else:\n            return self.file.read()\n\n    def readline(self):\n        return self.file.readline()\n\n    def next(self):\n        return self.file.next()\n\n    def __iter__(self):\n        return iter(self.file)\n\n    @property\n    def size(self):\n        if self._file:\n            return self._file.size\n        elif self.value:\n            return len(self.value)\n        else:\n            return 0\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/sdb/db/key.py",
    "content": "# Copyright (c) 2006,2007,2008 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nclass Key(object):\n\n    @classmethod\n    def from_path(cls, *args, **kwds):\n        raise NotImplementedError, \"Paths are not currently supported\"\n\n    def __init__(self, encoded=None, obj=None):\n        self.name = None\n        if obj:\n            self.id = obj.id\n            self.kind = obj.kind()\n        else:\n            self.id = None\n            self.kind = None\n\n    def app(self):\n        raise NotImplementedError, \"Applications are not currently supported\"\n\n    def kind(self):\n        return self.kind\n\n    def id(self):\n        return self.id\n\n    def name(self):\n        raise NotImplementedError, \"Key Names are not currently supported\"\n\n    def id_or_name(self):\n        return self.id\n\n    def has_id_or_name(self):\n        return self.id != None\n\n    def parent(self):\n        raise NotImplementedError, \"Key parents are not currently supported\"\n        \n    def __str__(self):\n        return self.id_or_name()\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/sdb/db/manager/__init__.py",
    "content": "# Copyright (c) 2006,2007,2008 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\nimport boto\n\ndef get_manager(cls):\n    \"\"\"\n    Returns the appropriate Manager class for a given Model class.  It does this by\n    looking in the boto config for a section like this::\n    \n        [DB]\n        db_type = SimpleDB\n        db_user = <aws access key id>\n        db_passwd = <aws secret access key>\n        db_name = my_domain\n        [DB_TestBasic]\n        db_type = SimpleDB\n        db_user = <another aws access key id>\n        db_passwd = <another aws secret access key>\n        db_name = basic_domain\n        db_port = 1111\n    \n    The values in the DB section are \"generic values\" that will be used if nothing more\n    specific is found.  You can also create a section for a specific Model class that\n    gives the db info for that class.  In the example above, TestBasic is a Model subclass.\n    \"\"\"\n    db_user = boto.config.get('DB', 'db_user', None)\n    db_passwd = boto.config.get('DB', 'db_passwd', None)\n    db_type = boto.config.get('DB', 'db_type', 'SimpleDB')\n    db_name = boto.config.get('DB', 'db_name', None)\n    db_table = boto.config.get('DB', 'db_table', None)\n    db_host = boto.config.get('DB', 'db_host', \"sdb.amazonaws.com\")\n    db_port = boto.config.getint('DB', 'db_port', 443)\n    enable_ssl = boto.config.getbool('DB', 'enable_ssl', True)\n    sql_dir = boto.config.get('DB', 'sql_dir', None)\n    debug = boto.config.getint('DB', 'debug', 0)\n    # first see if there is a fully qualified section name in the Boto config file\n    module_name = cls.__module__.replace('.', '_')\n    db_section = 'DB_' + module_name + '_' + cls.__name__\n    if not boto.config.has_section(db_section):\n        db_section = 'DB_' + cls.__name__\n    if boto.config.has_section(db_section):\n        db_user = boto.config.get(db_section, 'db_user', db_user)\n        db_passwd = boto.config.get(db_section, 'db_passwd', db_passwd)\n        db_type = boto.config.get(db_section, 'db_type', db_type)\n        db_name = boto.config.get(db_section, 'db_name', db_name)\n        db_table = boto.config.get(db_section, 'db_table', db_table)\n        db_host = boto.config.get(db_section, 'db_host', db_host)\n        db_port = boto.config.getint(db_section, 'db_port', db_port)\n        enable_ssl = boto.config.getint(db_section, 'enable_ssl', enable_ssl)\n        debug = boto.config.getint(db_section, 'debug', debug)\n    elif hasattr(cls, \"_db_name\") and cls._db_name is not None:\n        # More specific then the generic DB config is any _db_name class property\n        db_name = cls._db_name\n    elif hasattr(cls.__bases__[0], \"_manager\"):\n        return cls.__bases__[0]._manager\n    if db_type == 'SimpleDB':\n        from sdbmanager import SDBManager\n        return SDBManager(cls, db_name, db_user, db_passwd,\n                          db_host, db_port, db_table, sql_dir, enable_ssl)\n    elif db_type == 'PostgreSQL':\n        from pgmanager import PGManager\n        if db_table:\n            return PGManager(cls, db_name, db_user, db_passwd,\n                             db_host, db_port, db_table, sql_dir, enable_ssl)\n        else:\n            return None\n    elif db_type == 'XML':\n        from xmlmanager import XMLManager\n        return XMLManager(cls, db_name, db_user, db_passwd,\n                          db_host, db_port, db_table, sql_dir, enable_ssl)\n    else:\n        raise ValueError, 'Unknown db_type: %s' % db_type\n\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/sdb/db/manager/pgmanager.py",
    "content": "# Copyright (c) 2006,2007,2008 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\nfrom boto.sdb.db.key import Key\nfrom boto.sdb.db.model import Model\nimport psycopg2\nimport psycopg2.extensions\nimport uuid\nimport os\nimport string\nfrom boto.exception import SDBPersistenceError\n\npsycopg2.extensions.register_type(psycopg2.extensions.UNICODE)\n\nclass PGConverter:\n    \n    def __init__(self, manager):\n        self.manager = manager\n        self.type_map = {Key : (self.encode_reference, self.decode_reference),\n                         Model : (self.encode_reference, self.decode_reference)}\n\n    def encode(self, type, value):\n        if type in self.type_map:\n            encode = self.type_map[type][0]\n            return encode(value)\n        return value\n\n    def decode(self, type, value):\n        if type in self.type_map:\n            decode = self.type_map[type][1]\n            return decode(value)\n        return value\n\n    def encode_prop(self, prop, value):\n        if isinstance(value, list):\n            if hasattr(prop, 'item_type'):\n                s = \"{\"\n                new_value = []\n                for v in value:\n                    item_type = getattr(prop, 'item_type')\n                    if Model in item_type.mro():\n                        item_type = Model\n                    new_value.append('%s' % self.encode(item_type, v))\n                s += ','.join(new_value)\n                s += \"}\"\n                return s\n            else:\n                return value\n        return self.encode(prop.data_type, value)\n\n    def decode_prop(self, prop, value):\n        if prop.data_type == list:\n            if value != None:\n                if not isinstance(value, list):\n                    value = [value]\n                if hasattr(prop, 'item_type'):\n                    item_type = getattr(prop, \"item_type\")\n                    if Model in item_type.mro():\n                        if item_type != self.manager.cls:\n                            return item_type._manager.decode_value(prop, value)\n                        else:\n                            item_type = Model\n                    return [self.decode(item_type, v) for v in value]\n            return value\n        elif hasattr(prop, 'reference_class'):\n            ref_class = getattr(prop, 'reference_class')\n            if ref_class != self.manager.cls:\n                return ref_class._manager.decode_value(prop, value)\n            else:\n                return self.decode(prop.data_type, value)\n        elif hasattr(prop, 'calculated_type'):\n            calc_type = getattr(prop, 'calculated_type')\n            return self.decode(calc_type, value)\n        else:\n            return self.decode(prop.data_type, value)\n\n    def encode_reference(self, value):\n        if isinstance(value, str) or isinstance(value, unicode):\n            return value\n        if value == None:\n            return ''\n        else:\n            return value.id\n\n    def decode_reference(self, value):\n        if not value:\n            return None\n        try:\n            return self.manager.get_object_from_id(value)\n        except:\n            raise ValueError, 'Unable to convert %s to Object' % value\n\nclass PGManager(object):\n\n    def __init__(self, cls, db_name, db_user, db_passwd,\n                 db_host, db_port, db_table, sql_dir, enable_ssl):\n        self.cls = cls\n        self.db_name = db_name\n        self.db_user = db_user\n        self.db_passwd = db_passwd\n        self.db_host = db_host\n        self.db_port = db_port\n        self.db_table = db_table\n        self.sql_dir = sql_dir\n        self.in_transaction = False\n        self.converter = PGConverter(self)\n        self._connect()\n\n    def _build_connect_string(self):\n        cs = 'dbname=%s user=%s password=%s host=%s port=%d'\n        return cs % (self.db_name, self.db_user, self.db_passwd,\n                     self.db_host, self.db_port)\n\n    def _connect(self):\n        self.connection = psycopg2.connect(self._build_connect_string())\n        self.connection.set_client_encoding('UTF8')\n        self.cursor = self.connection.cursor()\n\n    def _object_lister(self, cursor):\n        try:\n            for row in cursor:\n                yield self._object_from_row(row, cursor.description)\n        except StopIteration:\n            cursor.close()\n            raise StopIteration\n                \n    def _dict_from_row(self, row, description):\n        d = {}\n        for i in range(0, len(row)):\n            d[description[i][0]] = row[i]\n        return d\n\n    def _object_from_row(self, row, description=None):\n        if not description:\n            description = self.cursor.description\n        d = self._dict_from_row(row, description)\n        obj = self.cls(d['id'])\n        obj._manager = self\n        obj._auto_update = False\n        for prop in obj.properties(hidden=False):\n            if prop.data_type != Key:\n                v = self.decode_value(prop, d[prop.name])\n                v = prop.make_value_from_datastore(v)\n                if hasattr(prop, 'calculated_type'):\n                    prop._set_direct(obj, v)\n                elif not prop.empty(v):\n                    setattr(obj, prop.name, v)\n                else:\n                    setattr(obj, prop.name, prop.default_value())\n        return obj\n\n    def _build_insert_qs(self, obj, calculated):\n        fields = []\n        values = []\n        templs = []\n        id_calculated = [p for p in calculated if p.name == 'id']\n        for prop in obj.properties(hidden=False):\n            if prop not in calculated:\n                value = prop.get_value_for_datastore(obj)\n                if value != prop.default_value() or prop.required:\n                    value = self.encode_value(prop, value)\n                    values.append(value)\n                    fields.append('\"%s\"' % prop.name)\n                    templs.append('%s')\n        qs = 'INSERT INTO \"%s\" (' % self.db_table\n        if len(id_calculated) == 0:\n            qs += '\"id\",'\n        qs += ','.join(fields)\n        qs += \") VALUES (\"\n        if len(id_calculated) == 0:\n            qs += \"'%s',\" % obj.id\n        qs += ','.join(templs)\n        qs += ')'\n        if calculated:\n            qs += ' RETURNING '\n            calc_values = ['\"%s\"' % p.name for p in calculated]\n            qs += ','.join(calc_values)\n        qs += ';'\n        return qs, values\n\n    def _build_update_qs(self, obj, calculated):\n        fields = []\n        values = []\n        for prop in obj.properties(hidden=False):\n            if prop not in calculated:\n                value = prop.get_value_for_datastore(obj)\n                if value != prop.default_value() or prop.required:\n                    value = self.encode_value(prop, value)\n                    values.append(value)\n                    field = '\"%s\"=' % prop.name\n                    field += '%s'\n                    fields.append(field)\n        qs = 'UPDATE \"%s\" SET ' % self.db_table\n        qs += ','.join(fields)\n        qs += \"\"\" WHERE \"id\" = '%s'\"\"\" % obj.id\n        if calculated:\n            qs += ' RETURNING '\n            calc_values = ['\"%s\"' % p.name for p in calculated]\n            qs += ','.join(calc_values)\n        qs += ';'\n        return qs, values\n\n    def _get_sql(self, mapping=None):\n        print '_get_sql'\n        sql = None\n        if self.sql_dir:\n            path = os.path.join(self.sql_dir, self.cls.__name__ + '.sql')\n            print path\n            if os.path.isfile(path):\n                fp = open(path)\n                sql = fp.read()\n                fp.close()\n                t = string.Template(sql)\n                sql = t.safe_substitute(mapping)\n        return sql\n\n    def start_transaction(self):\n        print 'start_transaction'\n        self.in_transaction = True\n\n    def end_transaction(self):\n        print 'end_transaction'\n        self.in_transaction = False\n        self.commit()\n\n    def commit(self):\n        if not self.in_transaction:\n            print '!!commit on %s' % self.db_table\n            try:\n                self.connection.commit()\n                \n            except psycopg2.ProgrammingError, err:\n                self.connection.rollback()\n                raise err\n\n    def rollback(self):\n        print '!!rollback on %s' % self.db_table\n        self.connection.rollback()\n\n    def delete_table(self):\n        self.cursor.execute('DROP TABLE \"%s\";' % self.db_table)\n        self.commit()\n\n    def create_table(self, mapping=None):\n        self.cursor.execute(self._get_sql(mapping))\n        self.commit()\n\n    def encode_value(self, prop, value):\n        return self.converter.encode_prop(prop, value)\n\n    def decode_value(self, prop, value):\n        return self.converter.decode_prop(prop, value)\n\n    def execute_sql(self, query):\n        self.cursor.execute(query, None)\n        self.commit()\n\n    def query_sql(self, query, vars=None):\n        self.cursor.execute(query, vars)\n        return self.cursor.fetchall()\n\n    def lookup(self, cls, name, value):\n        values = []\n        qs = 'SELECT * FROM \"%s\" WHERE ' % self.db_table\n        found = False\n        for property in cls.properties(hidden=False):\n            if property.name == name:\n                found = True\n                value = self.encode_value(property, value)\n                values.append(value)\n                qs += \"%s=\" % name\n                qs += \"%s\"\n        if not found:\n            raise SDBPersistenceError('%s is not a valid field' % name)\n        qs += ';'\n        print qs\n        self.cursor.execute(qs, values)\n        if self.cursor.rowcount == 1:\n            row = self.cursor.fetchone()\n            return self._object_from_row(row, self.cursor.description)\n        elif self.cursor.rowcount == 0:\n            raise KeyError, 'Object not found'\n        else:\n            raise LookupError, 'Multiple Objects Found'\n\n    def query(self, cls, filters, limit=None, order_by=None):\n        parts = []\n        qs = 'SELECT * FROM \"%s\"' % self.db_table\n        if filters:\n            qs += ' WHERE '\n            properties = cls.properties(hidden=False)\n            for filter, value in filters:\n                name, op = filter.strip().split()\n                found = False\n                for property in properties:\n                    if property.name == name:\n                        found = True\n                        value = self.encode_value(property, value)\n                        parts.append(\"\"\"\"%s\"%s'%s'\"\"\" % (name, op, value))\n                if not found:\n                    raise SDBPersistenceError('%s is not a valid field' % name)\n            qs += ','.join(parts)\n        qs += ';'\n        print qs\n        cursor = self.connection.cursor()\n        cursor.execute(qs)\n        return self._object_lister(cursor)\n\n    def get_property(self, prop, obj, name):\n        qs = \"\"\"SELECT \"%s\" FROM \"%s\" WHERE id='%s';\"\"\" % (name, self.db_table, obj.id)\n        print qs\n        self.cursor.execute(qs, None)\n        if self.cursor.rowcount == 1:\n            rs = self.cursor.fetchone()\n            for prop in obj.properties(hidden=False):\n                if prop.name == name:\n                    v = self.decode_value(prop, rs[0])\n                    return v\n        raise AttributeError, '%s not found' % name\n\n    def set_property(self, prop, obj, name, value):\n        pass\n        value = self.encode_value(prop, value)\n        qs = 'UPDATE \"%s\" SET ' % self.db_table\n        qs += \"%s='%s'\" % (name, self.encode_value(prop, value))\n        qs += \" WHERE id='%s'\" % obj.id\n        qs += ';'\n        print qs\n        self.cursor.execute(qs)\n        self.commit()\n\n    def get_object(self, cls, id):\n        qs = \"\"\"SELECT * FROM \"%s\" WHERE id='%s';\"\"\" % (self.db_table, id)\n        self.cursor.execute(qs, None)\n        if self.cursor.rowcount == 1:\n            row = self.cursor.fetchone()\n            return self._object_from_row(row, self.cursor.description)\n        else:\n            raise SDBPersistenceError('%s object with id=%s does not exist' % (cls.__name__, id))\n        \n    def get_object_from_id(self, id):\n        return self.get_object(self.cls, id)\n\n    def _find_calculated_props(self, obj):\n        return [p for p in obj.properties() if hasattr(p, 'calculated_type')]\n\n    def save_object(self, obj, expected_value=None):\n        obj._auto_update = False\n        calculated = self._find_calculated_props(obj)\n        if not obj.id:\n            obj.id = str(uuid.uuid4())\n            qs, values = self._build_insert_qs(obj, calculated)\n        else:\n            qs, values = self._build_update_qs(obj, calculated)\n        print qs\n        self.cursor.execute(qs, values)\n        if calculated:\n            calc_values = self.cursor.fetchone()\n            print calculated\n            print calc_values\n            for i in range(0, len(calculated)):\n                prop = calculated[i]\n                prop._set_direct(obj, calc_values[i])\n        self.commit()\n\n    def delete_object(self, obj):\n        qs = \"\"\"DELETE FROM \"%s\" WHERE id='%s';\"\"\" % (self.db_table, obj.id)\n        print qs\n        self.cursor.execute(qs)\n        self.commit()\n\n            \n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/sdb/db/manager/sdbmanager.py",
    "content": "# Copyright (c) 2006,2007,2008 Mitch Garnaat http://garnaat.org/\n# Copyright (c) 2010 Chris Moyer http://coredumped.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\nimport boto\nimport re\nfrom boto.utils import find_class\nimport uuid\nfrom boto.sdb.db.key import Key\nfrom boto.sdb.db.model import Model\nfrom boto.sdb.db.blob import Blob\nfrom boto.sdb.db.property import ListProperty, MapProperty\nfrom datetime import datetime, date, time\nfrom boto.exception import SDBPersistenceError, S3ResponseError\n\nISO8601 = '%Y-%m-%dT%H:%M:%SZ'\n\nclass TimeDecodeError(Exception):\n    pass\n\nclass SDBConverter(object):\n    \"\"\"\n    Responsible for converting base Python types to format compatible with underlying\n    database.  For SimpleDB, that means everything needs to be converted to a string\n    when stored in SimpleDB and from a string when retrieved.\n\n    To convert a value, pass it to the encode or decode method.  The encode method\n    will take a Python native value and convert to DB format.  The decode method will\n    take a DB format value and convert it to Python native format.  To find the appropriate\n    method to call, the generic encode/decode methods will look for the type-specific\n    method by searching for a method called \"encode_<type name>\" or \"decode_<type name>\".\n    \"\"\"\n    def __init__(self, manager):\n        self.manager = manager\n        self.type_map = { bool : (self.encode_bool, self.decode_bool),\n                          int : (self.encode_int, self.decode_int),\n                          long : (self.encode_long, self.decode_long),\n                          float : (self.encode_float, self.decode_float),\n                          Model : (self.encode_reference, self.decode_reference),\n                          Key : (self.encode_reference, self.decode_reference),\n                          datetime : (self.encode_datetime, self.decode_datetime),\n                          date : (self.encode_date, self.decode_date),\n                          time : (self.encode_time, self.decode_time),\n                          Blob: (self.encode_blob, self.decode_blob),\n                          str: (self.encode_string, self.decode_string),\n                      }\n\n    def encode(self, item_type, value):\n        try:\n            if Model in item_type.mro():\n                item_type = Model\n        except:\n            pass\n        if item_type in self.type_map:\n            encode = self.type_map[item_type][0]\n            return encode(value)\n        return value\n\n    def decode(self, item_type, value):\n        if item_type in self.type_map:\n            decode = self.type_map[item_type][1]\n            return decode(value)\n        return value\n\n    def encode_list(self, prop, value):\n        if value in (None, []):\n            return []\n        if not isinstance(value, list):\n            # This is a little trick to avoid encoding when it's just a single value,\n            # since that most likely means it's from a query\n            item_type = getattr(prop, \"item_type\")\n            return self.encode(item_type, value)\n        # Just enumerate(value) won't work here because\n        # we need to add in some zero padding\n        # We support lists up to 1,000 attributes, since\n        # SDB technically only supports 1024 attributes anyway\n        values = {}\n        for k,v in enumerate(value):\n            values[\"%03d\" % k] = v\n        return self.encode_map(prop, values)\n\n    def encode_map(self, prop, value):\n        import urllib\n        if value == None:\n            return None\n        if not isinstance(value, dict):\n            raise ValueError, 'Expected a dict value, got %s' % type(value)\n        new_value = []\n        for key in value:\n            item_type = getattr(prop, \"item_type\")\n            if Model in item_type.mro():\n                item_type = Model\n            encoded_value = self.encode(item_type, value[key])\n            if encoded_value != None:\n                new_value.append('%s:%s' % (urllib.quote(key), encoded_value))\n        return new_value\n\n    def encode_prop(self, prop, value):\n        if isinstance(prop, ListProperty):\n            return self.encode_list(prop, value)\n        elif isinstance(prop, MapProperty):\n            return self.encode_map(prop, value)\n        else:\n            return self.encode(prop.data_type, value)\n\n    def decode_list(self, prop, value):\n        if not isinstance(value, list):\n            value = [value]\n        if hasattr(prop, 'item_type'):\n            item_type = getattr(prop, \"item_type\")\n            dec_val = {}\n            for val in value:\n                if val != None:\n                    k,v = self.decode_map_element(item_type, val)\n                    try:\n                        k = int(k)\n                    except:\n                        k = v\n                    dec_val[k] = v\n            value = dec_val.values()\n        return value\n\n    def decode_map(self, prop, value):\n        if not isinstance(value, list):\n            value = [value]\n        ret_value = {}\n        item_type = getattr(prop, \"item_type\")\n        for val in value:\n            k,v = self.decode_map_element(item_type, val)\n            ret_value[k] = v\n        return ret_value\n\n    def decode_map_element(self, item_type, value):\n        \"\"\"Decode a single element for a map\"\"\"\n        import urllib\n        key = value\n        if \":\" in value:\n            key, value = value.split(':',1)\n            key = urllib.unquote(key)\n        if Model in item_type.mro():\n            value = item_type(id=value)\n        else:\n            value = self.decode(item_type, value)\n        return (key, value)\n\n    def decode_prop(self, prop, value):\n        if isinstance(prop, ListProperty):\n            return self.decode_list(prop, value)\n        elif isinstance(prop, MapProperty):\n            return self.decode_map(prop, value)\n        else:\n            return self.decode(prop.data_type, value)\n\n    def encode_int(self, value):\n        value = int(value)\n        value += 2147483648\n        return '%010d' % value\n\n    def decode_int(self, value):\n        try:\n            value = int(value)\n        except:\n            boto.log.error(\"Error, %s is not an integer\" % value)\n            value = 0\n        value = int(value)\n        value -= 2147483648\n        return int(value)\n\n    def encode_long(self, value):\n        value = long(value)\n        value += 9223372036854775808\n        return '%020d' % value\n\n    def decode_long(self, value):\n        value = long(value)\n        value -= 9223372036854775808\n        return value\n\n    def encode_bool(self, value):\n        if value == True or str(value).lower() in (\"true\", \"yes\"):\n            return 'true'\n        else:\n            return 'false'\n\n    def decode_bool(self, value):\n        if value.lower() == 'true':\n            return True\n        else:\n            return False\n\n    def encode_float(self, value):\n        \"\"\"\n        See http://tools.ietf.org/html/draft-wood-ldapext-float-00.\n        \"\"\"\n        s = '%e' % value\n        l = s.split('e')\n        mantissa = l[0].ljust(18, '0')\n        exponent = l[1]\n        if value == 0.0:\n            case = '3'\n            exponent = '000'\n        elif mantissa[0] != '-' and exponent[0] == '+':\n            case = '5'\n            exponent = exponent[1:].rjust(3, '0')\n        elif mantissa[0] != '-' and exponent[0] == '-':\n            case = '4'\n            exponent = 999 + int(exponent)\n            exponent = '%03d' % exponent\n        elif mantissa[0] == '-' and exponent[0] == '-':\n            case = '2'\n            mantissa = '%f' % (10 + float(mantissa))\n            mantissa = mantissa.ljust(18, '0')\n            exponent = exponent[1:].rjust(3, '0')\n        else:\n            case = '1'\n            mantissa = '%f' % (10 + float(mantissa))\n            mantissa = mantissa.ljust(18, '0')\n            exponent = 999 - int(exponent)\n            exponent = '%03d' % exponent\n        return '%s %s %s' % (case, exponent, mantissa)\n\n    def decode_float(self, value):\n        case = value[0]\n        exponent = value[2:5]\n        mantissa = value[6:]\n        if case == '3':\n            return 0.0\n        elif case == '5':\n            pass\n        elif case == '4':\n            exponent = '%03d' % (int(exponent) - 999)\n        elif case == '2':\n            mantissa = '%f' % (float(mantissa) - 10)\n            exponent = '-' + exponent\n        else:\n            mantissa = '%f' % (float(mantissa) - 10)\n            exponent = '%03d' % abs((int(exponent) - 999))\n        return float(mantissa + 'e' + exponent)\n\n    def encode_datetime(self, value):\n        if isinstance(value, str) or isinstance(value, unicode):\n            return value\n        return value.strftime(ISO8601)\n\n    def decode_datetime(self, value):\n        try:\n            return datetime.strptime(value, ISO8601)\n        except:\n            return None\n\n    def encode_date(self, value):\n        if isinstance(value, str) or isinstance(value, unicode):\n            return value\n        return value.isoformat()\n\n    def decode_date(self, value):\n        try:\n            value = value.split(\"-\")\n            return date(int(value[0]), int(value[1]), int(value[2]))\n        except:\n            return None\n\n    encode_time = encode_date\n\n    def decode_time(self, value):\n        \"\"\" converts strings in the form of HH:MM:SS.mmmmmm\n            (created by datetime.time.isoformat()) to\n            datetime.time objects.\n\n            Timzone-aware strings (\"HH:MM:SS.mmmmmm+HH:MM\") won't\n            be handled right now and will raise TimeDecodeError.\n        \"\"\"\n        if '-' in value or '+' in value:\n            # TODO: Handle tzinfo\n            raise TimeDecodeError(\"Can't handle timezone aware objects: %r\" % value)\n        tmp = value.split('.')\n        arg = map(int, tmp[0].split(':'))\n        if len(tmp) == 2:\n            arg.append(int(tmp[1]))\n        return time(*arg)\n\n    def encode_reference(self, value):\n        if value in (None, 'None', '', ' '):\n            return None\n        if isinstance(value, str) or isinstance(value, unicode):\n            return value\n        else:\n            return value.id\n\n    def decode_reference(self, value):\n        if not value or value == \"None\":\n            return None\n        return value\n\n    def encode_blob(self, value):\n        if not value:\n            return None\n        if isinstance(value, str):\n            return value\n\n        if not value.id:\n            bucket = self.manager.get_blob_bucket()\n            key = bucket.new_key(str(uuid.uuid4()))\n            value.id = \"s3://%s/%s\" % (key.bucket.name, key.name)\n        else:\n            match = re.match(\"^s3:\\/\\/([^\\/]*)\\/(.*)$\", value.id)\n            if match:\n                s3 = self.manager.get_s3_connection()\n                bucket = s3.get_bucket(match.group(1), validate=False)\n                key = bucket.get_key(match.group(2))\n            else:\n                raise SDBPersistenceError(\"Invalid Blob ID: %s\" % value.id)\n\n        if value.value != None:\n            key.set_contents_from_string(value.value)\n        return value.id\n\n\n    def decode_blob(self, value):\n        if not value:\n            return None\n        match = re.match(\"^s3:\\/\\/([^\\/]*)\\/(.*)$\", value)\n        if match:\n            s3 = self.manager.get_s3_connection()\n            bucket = s3.get_bucket(match.group(1), validate=False)\n            try:\n                key = bucket.get_key(match.group(2))\n            except S3ResponseError, e:\n                if e.reason != \"Forbidden\":\n                    raise\n                return None\n        else:\n            return None\n        if key:\n            return Blob(file=key, id=\"s3://%s/%s\" % (key.bucket.name, key.name))\n        else:\n            return None\n\n    def encode_string(self, value):\n        \"\"\"Convert ASCII, Latin-1 or UTF-8 to pure Unicode\"\"\"\n        if not isinstance(value, str): return value\n        try:\n            return unicode(value, 'utf-8')\n        except: # really, this should throw an exception.\n                # in the interest of not breaking current\n                # systems, however:\n            arr = []\n            for ch in value:\n                arr.append(unichr(ord(ch)))\n            return u\"\".join(arr)\n\n    def decode_string(self, value):\n        \"\"\"Decoding a string is really nothing, just\n        return the value as-is\"\"\"\n        return value\n\nclass SDBManager(object):\n    \n    def __init__(self, cls, db_name, db_user, db_passwd,\n                 db_host, db_port, db_table, ddl_dir, enable_ssl, consistent=None):\n        self.cls = cls\n        self.db_name = db_name\n        self.db_user = db_user\n        self.db_passwd = db_passwd\n        self.db_host = db_host\n        self.db_port = db_port\n        self.db_table = db_table\n        self.ddl_dir = ddl_dir\n        self.enable_ssl = enable_ssl\n        self.s3 = None\n        self.bucket = None\n        self.converter = SDBConverter(self)\n        self._sdb = None\n        self._domain = None\n        if consistent == None and hasattr(cls, \"__consistent__\"):\n            consistent = cls.__consistent__\n        self.consistent = consistent\n\n    @property\n    def sdb(self):\n        if self._sdb is None:\n            self._connect()\n        return self._sdb\n\n    @property\n    def domain(self):\n        if self._domain is None:\n            self._connect()\n        return self._domain\n\n    def _connect(self):\n        args = dict(aws_access_key_id=self.db_user,\n                    aws_secret_access_key=self.db_passwd,\n                    is_secure=self.enable_ssl)\n        try:\n            region = [x for x in boto.sdb.regions() if x.endpoint == self.db_host][0]\n            args['region'] = region\n        except IndexError:\n            pass\n        self._sdb = boto.connect_sdb(**args)\n        # This assumes that the domain has already been created\n        # It's much more efficient to do it this way rather than\n        # having this make a roundtrip each time to validate.\n        # The downside is that if the domain doesn't exist, it breaks\n        self._domain = self._sdb.lookup(self.db_name, validate=False)\n        if not self._domain:\n            self._domain = self._sdb.create_domain(self.db_name)\n\n    def _object_lister(self, cls, query_lister):\n        for item in query_lister:\n            obj = self.get_object(cls, item.name, item)\n            if obj:\n                yield obj\n            \n    def encode_value(self, prop, value):\n        if value == None:\n            return None\n        if not prop:\n            return str(value)\n        return self.converter.encode_prop(prop, value)\n\n    def decode_value(self, prop, value):\n        return self.converter.decode_prop(prop, value)\n\n    def get_s3_connection(self):\n        if not self.s3:\n            self.s3 = boto.connect_s3(self.db_user, self.db_passwd)\n        return self.s3\n\n    def get_blob_bucket(self, bucket_name=None):\n        s3 = self.get_s3_connection()\n        bucket_name = \"%s-%s\" % (s3.aws_access_key_id, self.domain.name)\n        bucket_name = bucket_name.lower()\n        try:\n            self.bucket = s3.get_bucket(bucket_name)\n        except:\n            self.bucket = s3.create_bucket(bucket_name)\n        return self.bucket\n            \n    def load_object(self, obj):\n        if not obj._loaded:\n            a = self.domain.get_attributes(obj.id,consistent_read=self.consistent)\n            if a.has_key('__type__'):\n                for prop in obj.properties(hidden=False):\n                    if a.has_key(prop.name):\n                        value = self.decode_value(prop, a[prop.name])\n                        value = prop.make_value_from_datastore(value)\n                        try:\n                            setattr(obj, prop.name, value)\n                        except Exception, e:\n                            boto.log.exception(e)\n            obj._loaded = True\n        \n    def get_object(self, cls, id, a=None):\n        obj = None\n        if not a:\n            a = self.domain.get_attributes(id,consistent_read=self.consistent)\n        if a.has_key('__type__'):\n            if not cls or a['__type__'] != cls.__name__:\n                cls = find_class(a['__module__'], a['__type__'])\n            if cls:\n                params = {}\n                for prop in cls.properties(hidden=False):\n                    if a.has_key(prop.name):\n                        value = self.decode_value(prop, a[prop.name])\n                        value = prop.make_value_from_datastore(value)\n                        params[prop.name] = value\n                obj = cls(id, **params)\n                obj._loaded = True\n            else:\n                s = '(%s) class %s.%s not found' % (id, a['__module__'], a['__type__'])\n                boto.log.info('sdbmanager: %s' % s)\n        return obj\n        \n    def get_object_from_id(self, id):\n        return self.get_object(None, id)\n\n    def query(self, query):\n        query_str = \"select * from `%s` %s\" % (self.domain.name, self._build_filter_part(query.model_class, query.filters, query.sort_by, query.select))\n        if query.limit:\n            query_str += \" limit %s\" % query.limit\n        rs = self.domain.select(query_str, max_items=query.limit, next_token = query.next_token)\n        query.rs = rs\n        return self._object_lister(query.model_class, rs)\n\n    def count(self, cls, filters, quick=True, sort_by=None, select=None):\n        \"\"\"\n        Get the number of results that would\n        be returned in this query\n        \"\"\"\n        query = \"select count(*) from `%s` %s\" % (self.domain.name, self._build_filter_part(cls, filters, sort_by, select))\n        count = 0\n        for row in self.domain.select(query):\n            count += int(row['Count'])\n            if quick:\n                return count\n        return count\n\n\n    def _build_filter(self, property, name, op, val):\n        if name == \"__id__\":\n            name = 'itemName()'\n        if name != \"itemName()\":\n            name = '`%s`' % name\n        if val == None:\n            if op in ('is','='):\n                return \"%(name)s is null\" % {\"name\": name}\n            elif op in ('is not', '!='):\n                return \"%s is not null\" % name\n            else:\n                val = \"\"\n        if property.__class__ == ListProperty:\n            if op in (\"is\", \"=\"):\n                op = \"like\"\n            elif op in (\"!=\", \"not\"):\n                op = \"not like\"\n            if not(op in [\"like\", \"not like\"] and val.startswith(\"%\")):\n                val = \"%%:%s\" % val\n        return \"%s %s '%s'\" % (name, op, val.replace(\"'\", \"''\"))\n\n    def _build_filter_part(self, cls, filters, order_by=None, select=None):\n        \"\"\"\n        Build the filter part\n        \"\"\"\n        import types\n        query_parts = []\n\n        order_by_filtered = False\n\n        if order_by:\n            if order_by[0] == \"-\":\n                order_by_method = \"DESC\";\n                order_by = order_by[1:]\n            else:\n                order_by_method = \"ASC\";\n\n        if select:\n            if order_by and order_by in select:\n                order_by_filtered = True\n            query_parts.append(\"(%s)\" % select)\n\n        if isinstance(filters, str) or isinstance(filters, unicode):\n            query = \"WHERE %s AND `__type__` = '%s'\" % (filters, cls.__name__)\n            if order_by in [\"__id__\", \"itemName()\"]:\n                query += \" ORDER BY itemName() %s\" % order_by_method\n            elif order_by != None:\n                query += \" ORDER BY `%s` %s\" % (order_by, order_by_method)\n            return query\n\n        for filter in filters:\n            filter_parts = []\n            filter_props = filter[0]\n            if type(filter_props) != list:\n                filter_props = [filter_props]\n            for filter_prop in filter_props:\n                (name, op) = filter_prop.strip().split(\" \", 1)\n                value = filter[1]\n                property = cls.find_property(name)\n                if name == order_by:\n                    order_by_filtered = True\n                if types.TypeType(value) == types.ListType:\n                    filter_parts_sub = []\n                    for val in value:\n                        val = self.encode_value(property, val)\n                        if isinstance(val, list):\n                            for v in val:\n                                filter_parts_sub.append(self._build_filter(property, name, op, v))\n                        else:\n                            filter_parts_sub.append(self._build_filter(property, name, op, val))\n                    filter_parts.append(\"(%s)\" % (\" OR \".join(filter_parts_sub)))\n                else:\n                    val = self.encode_value(property, value)\n                    if isinstance(val, list):\n                        for v in val:\n                            filter_parts.append(self._build_filter(property, name, op, v))\n                    else:\n                        filter_parts.append(self._build_filter(property, name, op, val))\n            query_parts.append(\"(%s)\" % (\" or \".join(filter_parts)))\n\n\n        type_query = \"(`__type__` = '%s'\" % cls.__name__\n        for subclass in self._get_all_decendents(cls).keys():\n            type_query += \" or `__type__` = '%s'\" % subclass\n        type_query +=\")\"\n        query_parts.append(type_query)\n\n        order_by_query = \"\"\n\n        if order_by:\n            if not order_by_filtered:\n                query_parts.append(\"`%s` LIKE '%%'\" % order_by)\n            if order_by in [\"__id__\", \"itemName()\"]:\n                order_by_query = \" ORDER BY itemName() %s\" % order_by_method\n            else:\n                order_by_query = \" ORDER BY `%s` %s\" % (order_by, order_by_method)\n\n        if len(query_parts) > 0:\n            return \"WHERE %s %s\" % (\" AND \".join(query_parts), order_by_query)\n        else:\n            return \"\"\n\n\n    def _get_all_decendents(self, cls):\n        \"\"\"Get all decendents for a given class\"\"\"\n        decendents = {}\n        for sc in cls.__sub_classes__:\n            decendents[sc.__name__] = sc\n            decendents.update(self._get_all_decendents(sc))\n        return decendents\n\n    def query_gql(self, query_string, *args, **kwds):\n        raise NotImplementedError, \"GQL queries not supported in SimpleDB\"\n\n    def save_object(self, obj, expected_value=None):\n        if not obj.id:\n            obj.id = str(uuid.uuid4())\n\n        attrs = {'__type__' : obj.__class__.__name__,\n                 '__module__' : obj.__class__.__module__,\n                 '__lineage__' : obj.get_lineage()}\n        del_attrs = []\n        for property in obj.properties(hidden=False):\n            value = property.get_value_for_datastore(obj)\n            if value is not None:\n                value = self.encode_value(property, value)\n            if value == []:\n                value = None\n            if value == None:\n                del_attrs.append(property.name)\n                continue\n            attrs[property.name] = value\n            if property.unique:\n                try:\n                    args = {property.name: value}\n                    obj2 = obj.find(**args).next()\n                    if obj2.id != obj.id:\n                        raise SDBPersistenceError(\"Error: %s must be unique!\" % property.name)\n                except(StopIteration):\n                    pass\n        # Convert the Expected value to SDB format\n        if expected_value:\n            prop = obj.find_property(expected_value[0])\n            v = expected_value[1]\n            if v is not None and not type(v) == bool:\n                v = self.encode_value(prop, v)\n            expected_value[1] = v\n        self.domain.put_attributes(obj.id, attrs, replace=True, expected_value=expected_value)\n        if len(del_attrs) > 0:\n            self.domain.delete_attributes(obj.id, del_attrs)\n        return obj\n\n    def delete_object(self, obj):\n        self.domain.delete_attributes(obj.id)\n\n    def set_property(self, prop, obj, name, value):\n        setattr(obj, name, value)\n        value = prop.get_value_for_datastore(obj)\n        value = self.encode_value(prop, value)\n        if prop.unique:\n            try:\n                args = {prop.name: value}\n                obj2 = obj.find(**args).next()\n                if obj2.id != obj.id:\n                    raise SDBPersistenceError(\"Error: %s must be unique!\" % prop.name)\n            except(StopIteration):\n                pass\n        self.domain.put_attributes(obj.id, {name : value}, replace=True)\n\n    def get_property(self, prop, obj, name):\n        a = self.domain.get_attributes(obj.id,consistent_read=self.consistent)\n\n        # try to get the attribute value from SDB\n        if name in a:\n            value = self.decode_value(prop, a[name])\n            value = prop.make_value_from_datastore(value)\n            setattr(obj, prop.name, value)\n            return value\n        raise AttributeError, '%s not found' % name\n\n    def set_key_value(self, obj, name, value):\n        self.domain.put_attributes(obj.id, {name : value}, replace=True)\n\n    def delete_key_value(self, obj, name):\n        self.domain.delete_attributes(obj.id, name)\n\n    def get_key_value(self, obj, name):\n        a = self.domain.get_attributes(obj.id, name,consistent_read=self.consistent)\n        if a.has_key(name):\n            return a[name]\n        else:\n            return None\n    \n    def get_raw_item(self, obj):\n        return self.domain.get_item(obj.id)\n        \n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/sdb/db/manager/xmlmanager.py",
    "content": "# Copyright (c) 2006-2008 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\nimport boto\nfrom boto.utils import find_class, Password\nfrom boto.sdb.db.key import Key\nfrom boto.sdb.db.model import Model\nfrom datetime import datetime\nfrom xml.dom.minidom import getDOMImplementation, parse, parseString, Node\n\nISO8601 = '%Y-%m-%dT%H:%M:%SZ'\n\nclass XMLConverter:\n    \"\"\"\n    Responsible for converting base Python types to format compatible with underlying\n    database.  For SimpleDB, that means everything needs to be converted to a string\n    when stored in SimpleDB and from a string when retrieved.\n\n    To convert a value, pass it to the encode or decode method.  The encode method\n    will take a Python native value and convert to DB format.  The decode method will\n    take a DB format value and convert it to Python native format.  To find the appropriate\n    method to call, the generic encode/decode methods will look for the type-specific\n    method by searching for a method called \"encode_<type name>\" or \"decode_<type name>\".\n    \"\"\"\n    def __init__(self, manager):\n        self.manager = manager\n        self.type_map = { bool : (self.encode_bool, self.decode_bool),\n                          int : (self.encode_int, self.decode_int),\n                          long : (self.encode_long, self.decode_long),\n                          Model : (self.encode_reference, self.decode_reference),\n                          Key : (self.encode_reference, self.decode_reference),\n                          Password : (self.encode_password, self.decode_password),\n                          datetime : (self.encode_datetime, self.decode_datetime)}\n\n    def get_text_value(self, parent_node):\n        value = ''\n        for node in parent_node.childNodes:\n            if node.nodeType == node.TEXT_NODE:\n                value += node.data\n        return value\n\n    def encode(self, item_type, value):\n        if item_type in self.type_map:\n            encode = self.type_map[item_type][0]\n            return encode(value)\n        return value\n\n    def decode(self, item_type, value):\n        if item_type in self.type_map:\n            decode = self.type_map[item_type][1]\n            return decode(value)\n        else:\n            value = self.get_text_value(value)\n        return value\n\n    def encode_prop(self, prop, value):\n        if isinstance(value, list):\n            if hasattr(prop, 'item_type'):\n                new_value = []\n                for v in value:\n                    item_type = getattr(prop, \"item_type\")\n                    if Model in item_type.mro():\n                        item_type = Model\n                    new_value.append(self.encode(item_type, v))\n                return new_value\n            else:\n                return value\n        else:\n            return self.encode(prop.data_type, value)\n\n    def decode_prop(self, prop, value):\n        if prop.data_type == list:\n            if hasattr(prop, 'item_type'):\n                item_type = getattr(prop, \"item_type\")\n                if Model in item_type.mro():\n                    item_type = Model\n                values = []\n                for item_node in value.getElementsByTagName('item'):\n                    value = self.decode(item_type, item_node)\n                    values.append(value)\n                return values\n            else:\n                return self.get_text_value(value)\n        else:\n            return self.decode(prop.data_type, value)\n\n    def encode_int(self, value):\n        value = int(value)\n        return '%d' % value\n\n    def decode_int(self, value):\n        value = self.get_text_value(value)\n        if value:\n            value = int(value)\n        else:\n            value = None\n        return value\n\n    def encode_long(self, value):\n        value = long(value)\n        return '%d' % value\n\n    def decode_long(self, value):\n        value = self.get_text_value(value)\n        return long(value)\n\n    def encode_bool(self, value):\n        if value == True:\n            return 'true'\n        else:\n            return 'false'\n\n    def decode_bool(self, value):\n        value = self.get_text_value(value)\n        if value.lower() == 'true':\n            return True\n        else:\n            return False\n\n    def encode_datetime(self, value):\n        return value.strftime(ISO8601)\n\n    def decode_datetime(self, value):\n        value = self.get_text_value(value)\n        try:\n            return datetime.strptime(value, ISO8601)\n        except:\n            return None\n\n    def encode_reference(self, value):\n        if isinstance(value, str) or isinstance(value, unicode):\n            return value\n        if value == None:\n            return ''\n        else:\n            val_node = self.manager.doc.createElement(\"object\")\n            val_node.setAttribute('id', value.id)\n            val_node.setAttribute('class', '%s.%s' % (value.__class__.__module__, value.__class__.__name__))\n            return val_node\n\n    def decode_reference(self, value):\n        if not value:\n            return None\n        try:\n            value = value.childNodes[0]\n            class_name = value.getAttribute(\"class\")\n            id = value.getAttribute(\"id\")\n            cls = find_class(class_name)\n            return cls.get_by_ids(id)\n        except:\n            return None\n\n    def encode_password(self, value):\n        if value and len(value) > 0:\n            return str(value)\n        else:\n            return None\n\n    def decode_password(self, value):\n        value = self.get_text_value(value)\n        return Password(value)\n\n\nclass XMLManager(object):\n    \n    def __init__(self, cls, db_name, db_user, db_passwd,\n                 db_host, db_port, db_table, ddl_dir, enable_ssl):\n        self.cls = cls\n        if not db_name:\n            db_name = cls.__name__.lower()\n        self.db_name = db_name\n        self.db_user = db_user\n        self.db_passwd = db_passwd\n        self.db_host = db_host\n        self.db_port = db_port\n        self.db_table = db_table\n        self.ddl_dir = ddl_dir\n        self.s3 = None\n        self.converter = XMLConverter(self)\n        self.impl = getDOMImplementation()\n        self.doc = self.impl.createDocument(None, 'objects', None)\n\n        self.connection = None\n        self.enable_ssl = enable_ssl\n        self.auth_header = None\n        if self.db_user:\n            import base64\n            base64string = base64.encodestring('%s:%s' % (self.db_user, self.db_passwd))[:-1]\n            authheader =  \"Basic %s\" % base64string\n            self.auth_header = authheader\n\n    def _connect(self):\n        if self.db_host:\n            if self.enable_ssl:\n                from httplib import HTTPSConnection as Connection\n            else:\n                from httplib import HTTPConnection as Connection\n\n            self.connection = Connection(self.db_host, self.db_port)\n\n    def _make_request(self, method, url, post_data=None, body=None):\n        \"\"\"\n        Make a request on this connection\n        \"\"\"\n        if not self.connection:\n            self._connect()\n        try:\n            self.connection.close()\n        except:\n            pass\n        self.connection.connect()\n        headers = {}\n        if self.auth_header:\n            headers[\"Authorization\"] = self.auth_header\n        self.connection.request(method, url, body, headers)\n        resp = self.connection.getresponse()\n        return resp\n\n    def new_doc(self):\n        return self.impl.createDocument(None, 'objects', None)\n\n    def _object_lister(self, cls, doc):\n        for obj_node in doc.getElementsByTagName('object'):\n            if not cls:\n                class_name = obj_node.getAttribute('class')\n                cls = find_class(class_name)\n            id = obj_node.getAttribute('id')\n            obj = cls(id)\n            for prop_node in obj_node.getElementsByTagName('property'):\n                prop_name = prop_node.getAttribute('name')\n                prop = obj.find_property(prop_name)\n                if prop:\n                    if hasattr(prop, 'item_type'):\n                        value = self.get_list(prop_node, prop.item_type)\n                    else:\n                        value = self.decode_value(prop, prop_node)\n                        value = prop.make_value_from_datastore(value)\n                    setattr(obj, prop.name, value)\n            yield obj\n\n    def reset(self):\n        self._connect()\n\n    def get_doc(self):\n        return self.doc\n            \n    def encode_value(self, prop, value):\n        return self.converter.encode_prop(prop, value)\n\n    def decode_value(self, prop, value):\n        return self.converter.decode_prop(prop, value)\n\n    def get_s3_connection(self):\n        if not self.s3:\n            self.s3 = boto.connect_s3(self.aws_access_key_id, self.aws_secret_access_key)\n        return self.s3\n\n    def get_list(self, prop_node, item_type):\n        values = []\n        try:\n            items_node = prop_node.getElementsByTagName('items')[0]\n        except:\n            return []\n        for item_node in items_node.getElementsByTagName('item'):\n            value = self.converter.decode(item_type, item_node)\n            values.append(value)\n        return values\n\n    def get_object_from_doc(self, cls, id, doc):\n        obj_node = doc.getElementsByTagName('object')[0]\n        if not cls:\n            class_name = obj_node.getAttribute('class')\n            cls = find_class(class_name)\n        if not id:\n            id = obj_node.getAttribute('id')\n        obj = cls(id)\n        for prop_node in obj_node.getElementsByTagName('property'):\n            prop_name = prop_node.getAttribute('name')\n            prop = obj.find_property(prop_name)\n            value = self.decode_value(prop, prop_node)\n            value = prop.make_value_from_datastore(value)\n            if value != None:\n                try:\n                    setattr(obj, prop.name, value)\n                except:\n                    pass\n        return obj\n\n    def get_props_from_doc(self, cls, id, doc):\n        \"\"\"\n        Pull out the properties from this document\n        Returns the class, the properties in a hash, and the id if provided as a tuple\n        :return: (cls, props, id)\n        \"\"\"\n        obj_node = doc.getElementsByTagName('object')[0]\n        if not cls:\n            class_name = obj_node.getAttribute('class')\n            cls = find_class(class_name)\n        if not id:\n            id = obj_node.getAttribute('id')\n        props = {}\n        for prop_node in obj_node.getElementsByTagName('property'):\n            prop_name = prop_node.getAttribute('name')\n            prop = cls.find_property(prop_name)\n            value = self.decode_value(prop, prop_node)\n            value = prop.make_value_from_datastore(value)\n            if value != None:\n                props[prop.name] = value\n        return (cls, props, id)\n        \n        \n    def get_object(self, cls, id):\n        if not self.connection:\n            self._connect()\n\n        if not self.connection:\n            raise NotImplementedError(\"Can't query without a database connection\")\n        url = \"/%s/%s\" % (self.db_name, id)\n        resp = self._make_request('GET', url)\n        if resp.status == 200:\n            doc = parse(resp)\n        else:\n            raise Exception(\"Error: %s\" % resp.status)\n        return self.get_object_from_doc(cls, id, doc)\n\n    def query(self, cls, filters, limit=None, order_by=None):\n        if not self.connection:\n            self._connect()\n\n        if not self.connection:\n            raise NotImplementedError(\"Can't query without a database connection\")\n\n        from urllib import urlencode\n\n        query = str(self._build_query(cls, filters, limit, order_by))\n        if query:\n            url = \"/%s?%s\" % (self.db_name, urlencode({\"query\": query}))\n        else: \n            url = \"/%s\" % self.db_name\n        resp = self._make_request('GET', url)\n        if resp.status == 200:\n            doc = parse(resp)\n        else:\n            raise Exception(\"Error: %s\" % resp.status)\n        return self._object_lister(cls, doc)\n\n    def _build_query(self, cls, filters, limit, order_by):\n        import types\n        if len(filters) > 4:\n            raise Exception('Too many filters, max is 4')\n        parts = []\n        properties = cls.properties(hidden=False)\n        for filter, value in filters:\n            name, op = filter.strip().split()\n            found = False\n            for property in properties:\n                if property.name == name:\n                    found = True\n                    if types.TypeType(value) == types.ListType:\n                        filter_parts = []\n                        for val in value:\n                            val = self.encode_value(property, val)\n                            filter_parts.append(\"'%s' %s '%s'\" % (name, op, val))\n                        parts.append(\"[%s]\" % \" OR \".join(filter_parts))\n                    else:\n                        value = self.encode_value(property, value)\n                        parts.append(\"['%s' %s '%s']\" % (name, op, value))\n            if not found:\n                raise Exception('%s is not a valid field' % name)\n        if order_by:\n            if order_by.startswith(\"-\"):\n                key = order_by[1:]\n                type = \"desc\"\n            else:\n                key = order_by\n                type = \"asc\"\n            parts.append(\"['%s' starts-with ''] sort '%s' %s\" % (key, key, type))\n        return ' intersection '.join(parts)\n\n    def query_gql(self, query_string, *args, **kwds):\n        raise NotImplementedError, \"GQL queries not supported in XML\"\n\n    def save_list(self, doc, items, prop_node):\n        items_node = doc.createElement('items')\n        prop_node.appendChild(items_node)\n        for item in items:\n            item_node = doc.createElement('item')\n            items_node.appendChild(item_node)\n            if isinstance(item, Node):\n                item_node.appendChild(item)\n            else:\n                text_node = doc.createTextNode(item)\n                item_node.appendChild(text_node)\n\n    def save_object(self, obj, expected_value=None):\n        \"\"\"\n        Marshal the object and do a PUT\n        \"\"\"\n        doc = self.marshal_object(obj)\n        if obj.id:\n            url = \"/%s/%s\" % (self.db_name, obj.id)\n        else:\n            url = \"/%s\" % (self.db_name)\n        resp = self._make_request(\"PUT\", url, body=doc.toxml())\n        new_obj = self.get_object_from_doc(obj.__class__, None, parse(resp))\n        obj.id = new_obj.id\n        for prop in obj.properties():\n            try:\n                propname = prop.name\n            except AttributeError:\n                propname = None\n            if propname:\n                value = getattr(new_obj, prop.name)\n                if value:\n                    setattr(obj, prop.name, value)\n        return obj\n\n\n    def marshal_object(self, obj, doc=None):\n        if not doc:\n            doc = self.new_doc()\n        if not doc:\n            doc = self.doc\n        obj_node = doc.createElement('object')\n\n        if obj.id:\n            obj_node.setAttribute('id', obj.id)\n\n        obj_node.setAttribute('class', '%s.%s' % (obj.__class__.__module__,\n                                                  obj.__class__.__name__))\n        root = doc.documentElement\n        root.appendChild(obj_node)\n        for property in obj.properties(hidden=False):\n            prop_node = doc.createElement('property')\n            prop_node.setAttribute('name', property.name)\n            prop_node.setAttribute('type', property.type_name)\n            value = property.get_value_for_datastore(obj)\n            if value is not None:\n                value = self.encode_value(property, value)\n                if isinstance(value, list):\n                    self.save_list(doc, value, prop_node)\n                elif isinstance(value, Node):\n                    prop_node.appendChild(value)\n                else:\n                    text_node = doc.createTextNode(unicode(value).encode(\"ascii\", \"ignore\"))\n                    prop_node.appendChild(text_node)\n            obj_node.appendChild(prop_node)\n\n        return doc\n\n    def unmarshal_object(self, fp, cls=None, id=None):\n        if isinstance(fp, str) or isinstance(fp, unicode):\n            doc = parseString(fp)\n        else:\n            doc = parse(fp)\n        return self.get_object_from_doc(cls, id, doc)\n    \n    def unmarshal_props(self, fp, cls=None, id=None):\n        \"\"\"\n        Same as unmarshalling an object, except it returns\n        from \"get_props_from_doc\"\n        \"\"\"\n        if isinstance(fp, str) or isinstance(fp, unicode):\n            doc = parseString(fp)\n        else:\n            doc = parse(fp)\n        return self.get_props_from_doc(cls, id, doc)\n\n    def delete_object(self, obj):\n        url = \"/%s/%s\" % (self.db_name, obj.id)\n        return self._make_request(\"DELETE\", url)\n\n    def set_key_value(self, obj, name, value):\n        self.domain.put_attributes(obj.id, {name : value}, replace=True)\n\n    def delete_key_value(self, obj, name):\n        self.domain.delete_attributes(obj.id, name)\n\n    def get_key_value(self, obj, name):\n        a = self.domain.get_attributes(obj.id, name)\n        if a.has_key(name):\n            return a[name]\n        else:\n            return None\n    \n    def get_raw_item(self, obj):\n        return self.domain.get_item(obj.id)\n\n    def set_property(self, prop, obj, name, value):\n        pass\n\n    def get_property(self, prop, obj, name):\n        pass\n\n    def load_object(self, obj):\n        if not obj._loaded:\n            obj = obj.get_by_id(obj.id)\n            obj._loaded = True\n        return obj\n\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/sdb/db/model.py",
    "content": "# Copyright (c) 2006,2007,2008 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nfrom boto.sdb.db.manager import get_manager\nfrom boto.sdb.db.property import Property\nfrom boto.sdb.db.key import Key\nfrom boto.sdb.db.query import Query\nimport boto\n\nclass ModelMeta(type):\n    \"Metaclass for all Models\"\n\n    def __init__(cls, name, bases, dict):\n        super(ModelMeta, cls).__init__(name, bases, dict)\n        # Make sure this is a subclass of Model - mainly copied from django ModelBase (thanks!)\n        cls.__sub_classes__ = []\n        try:\n            if filter(lambda b: issubclass(b, Model), bases):\n                for base in bases:\n                    base.__sub_classes__.append(cls)\n                cls._manager = get_manager(cls)\n                # look for all of the Properties and set their names\n                for key in dict.keys():\n                    if isinstance(dict[key], Property):\n                        property = dict[key]\n                        property.__property_config__(cls, key)\n                prop_names = []\n                props = cls.properties()\n                for prop in props:\n                    if not prop.__class__.__name__.startswith('_'):\n                        prop_names.append(prop.name)\n                setattr(cls, '_prop_names', prop_names)\n        except NameError:\n            # 'Model' isn't defined yet, meaning we're looking at our own\n            # Model class, defined below.\n            pass\n        \nclass Model(object):\n    __metaclass__ = ModelMeta\n    __consistent__ = False # Consistent is set off by default\n    id = None\n\n    @classmethod\n    def get_lineage(cls):\n        l = [c.__name__ for c in cls.mro()]\n        l.reverse()\n        return '.'.join(l)\n\n    @classmethod\n    def kind(cls):\n        return cls.__name__\n    \n    @classmethod\n    def _get_by_id(cls, id, manager=None):\n        if not manager:\n            manager = cls._manager\n        return manager.get_object(cls, id)\n            \n    @classmethod\n    def get_by_id(cls, ids=None, parent=None):\n        if isinstance(ids, list):\n            objs = [cls._get_by_id(id) for id in ids]\n            return objs\n        else:\n            return cls._get_by_id(ids)\n\n    get_by_ids = get_by_id\n\n    @classmethod\n    def get_by_key_name(cls, key_names, parent=None):\n        raise NotImplementedError, \"Key Names are not currently supported\"\n\n    @classmethod\n    def find(cls, limit=None, next_token=None, **params):\n        q = Query(cls, limit=limit, next_token=next_token)\n        for key, value in params.items():\n            q.filter('%s =' % key, value)\n        return q\n\n    @classmethod\n    def all(cls, limit=None, next_token=None):\n        return cls.find(limit=limit, next_token=next_token)\n\n    @classmethod\n    def get_or_insert(key_name, **kw):\n        raise NotImplementedError, \"get_or_insert not currently supported\"\n            \n    @classmethod\n    def properties(cls, hidden=True):\n        properties = []\n        while cls:\n            for key in cls.__dict__.keys():\n                prop = cls.__dict__[key]\n                if isinstance(prop, Property):\n                    if hidden or not prop.__class__.__name__.startswith('_'):\n                        properties.append(prop)\n            if len(cls.__bases__) > 0:\n                cls = cls.__bases__[0]\n            else:\n                cls = None\n        return properties\n\n    @classmethod\n    def find_property(cls, prop_name):\n        property = None\n        while cls:\n            for key in cls.__dict__.keys():\n                prop = cls.__dict__[key]\n                if isinstance(prop, Property):\n                    if not prop.__class__.__name__.startswith('_') and prop_name == prop.name:\n                        property = prop\n            if len(cls.__bases__) > 0:\n                cls = cls.__bases__[0]\n            else:\n                cls = None\n        return property\n\n    @classmethod\n    def get_xmlmanager(cls):\n        if not hasattr(cls, '_xmlmanager'):\n            from boto.sdb.db.manager.xmlmanager import XMLManager\n            cls._xmlmanager = XMLManager(cls, None, None, None,\n                                         None, None, None, None, False)\n        return cls._xmlmanager\n\n    @classmethod\n    def from_xml(cls, fp):\n        xmlmanager = cls.get_xmlmanager()\n        return xmlmanager.unmarshal_object(fp)\n\n    def __init__(self, id=None, **kw):\n        self._loaded = False\n        # first try to initialize all properties to their default values\n        for prop in self.properties(hidden=False):\n            try:\n                setattr(self, prop.name, prop.default_value())\n            except ValueError:\n                pass\n        if kw.has_key('manager'):\n            self._manager = kw['manager']\n        self.id = id\n        for key in kw:\n            if key != 'manager':\n                # We don't want any errors populating up when loading an object,\n                # so if it fails we just revert to it's default value\n                try:\n                    setattr(self, key, kw[key])\n                except Exception, e:\n                    boto.log.exception(e)\n\n    def __repr__(self):\n        return '%s<%s>' % (self.__class__.__name__, self.id)\n\n    def __str__(self):\n        return str(self.id)\n    \n    def __eq__(self, other):\n        return other and isinstance(other, Model) and self.id == other.id\n\n    def _get_raw_item(self):\n        return self._manager.get_raw_item(self)\n\n    def load(self):\n        if self.id and not self._loaded:\n            self._manager.load_object(self)\n\n    def reload(self):\n        if self.id:\n            self._loaded = False\n            self._manager.load_object(self)\n\n    def put(self, expected_value=None):\n        \"\"\"\n        Save this object as it is, with an optional expected value\n\n        :param expected_value: Optional tuple of Attribute, and Value that \n            must be the same in order to save this object. If this \n            condition is not met, an SDBResponseError will be raised with a\n            Confict status code.\n        :type expected_value: tuple or list\n        :return: This object\n        :rtype: :class:`boto.sdb.db.model.Model`\n        \"\"\"\n        self._manager.save_object(self, expected_value)\n        return self\n\n    save = put\n\n    def put_attributes(self, attrs):\n        \"\"\"\n        Save just these few attributes, not the whole object\n\n        :param attrs: Attributes to save, key->value dict\n        :type attrs: dict\n        :return: self\n        :rtype: :class:`boto.sdb.db.model.Model`\n        \"\"\"\n        assert(isinstance(attrs, dict)), \"Argument must be a dict of key->values to save\"\n        for prop_name in attrs:\n            value = attrs[prop_name]\n            prop = self.find_property(prop_name)\n            assert(prop), \"Property not found: %s\" % prop_name\n            self._manager.set_property(prop, self, prop_name, value)\n        self.reload()\n        return self\n\n    def delete_attributes(self, attrs):\n        \"\"\"\n        Delete just these attributes, not the whole object.\n\n        :param attrs: Attributes to save, as a list of string names\n        :type attrs: list\n        :return: self\n        :rtype: :class:`boto.sdb.db.model.Model`\n        \"\"\"\n        assert(isinstance(attrs, list)), \"Argument must be a list of names of keys to delete.\"\n        self._manager.domain.delete_attributes(self.id, attrs)\n        self.reload()\n        return self\n\n    save_attributes = put_attributes\n        \n    def delete(self):\n        self._manager.delete_object(self)\n\n    def key(self):\n        return Key(obj=self)\n\n    def set_manager(self, manager):\n        self._manager = manager\n\n    def to_dict(self):\n        props = {}\n        for prop in self.properties(hidden=False):\n            props[prop.name] = getattr(self, prop.name)\n        obj = {'properties' : props,\n               'id' : self.id}\n        return {self.__class__.__name__ : obj}\n\n    def to_xml(self, doc=None):\n        xmlmanager = self.get_xmlmanager()\n        doc = xmlmanager.marshal_object(self, doc)\n        return doc\n\n    @classmethod\n    def find_subclass(cls, name):\n        \"\"\"Find a subclass with a given name\"\"\"\n        if name == cls.__name__:\n            return cls\n        for sc in cls.__sub_classes__:\n            r = sc.find_subclass(name)\n            if r != None:\n                return r\n\nclass Expando(Model):\n\n    def __setattr__(self, name, value):\n        if name in self._prop_names:\n            object.__setattr__(self, name, value)\n        elif name.startswith('_'):\n            object.__setattr__(self, name, value)\n        elif name == 'id':\n            object.__setattr__(self, name, value)\n        else:\n            self._manager.set_key_value(self, name, value)\n            object.__setattr__(self, name, value)\n\n    def __getattr__(self, name):\n        if not name.startswith('_'):\n            value = self._manager.get_key_value(self, name)\n            if value:\n                object.__setattr__(self, name, value)\n                return value\n        raise AttributeError\n\n    \n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/sdb/db/property.py",
    "content": "# Copyright (c) 2006,2007,2008 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nimport datetime\nfrom key import Key\nfrom boto.utils import Password\nfrom boto.sdb.db.query import Query\nimport re\nimport boto\nimport boto.s3.key\nfrom boto.sdb.db.blob import Blob\n\nclass Property(object):\n\n    data_type = str\n    type_name = ''\n    name = ''\n    verbose_name = ''\n\n    def __init__(self, verbose_name=None, name=None, default=None, required=False,\n                 validator=None, choices=None, unique=False):\n        self.verbose_name = verbose_name\n        self.name = name\n        self.default = default\n        self.required = required\n        self.validator = validator\n        self.choices = choices\n        if self.name:\n            self.slot_name = '_' + self.name\n        else:\n            self.slot_name = '_'\n        self.unique = unique\n        \n    def __get__(self, obj, objtype):\n        if obj:\n            obj.load()\n            return getattr(obj, self.slot_name)\n        else:\n            return None\n\n    def __set__(self, obj, value):\n        self.validate(value)\n\n        # Fire off any on_set functions\n        try:\n            if obj._loaded and hasattr(obj, \"on_set_%s\" % self.name):\n                fnc = getattr(obj, \"on_set_%s\" % self.name)\n                value = fnc(value)\n        except Exception:\n            boto.log.exception(\"Exception running on_set_%s\" % self.name)\n\n        setattr(obj, self.slot_name, value)\n\n    def __property_config__(self, model_class, property_name):\n        self.model_class = model_class\n        self.name = property_name\n        self.slot_name = '_' + self.name\n\n    def default_validator(self, value):\n        if isinstance(value, basestring) or value == self.default_value():\n            return\n        if not isinstance(value, self.data_type):\n            raise TypeError, 'Validation Error, expecting %s, got %s' % (self.data_type, type(value))\n                                      \n    def default_value(self):\n        return self.default\n\n    def validate(self, value):\n        if self.required and value==None:\n            raise ValueError, '%s is a required property' % self.name\n        if self.choices and value and not value in self.choices:\n            raise ValueError, '%s not a valid choice for %s.%s' % (value, self.model_class.__name__, self.name)\n        if self.validator:\n            self.validator(value)\n        else:\n            self.default_validator(value)\n        return value\n\n    def empty(self, value):\n        return not value\n\n    def get_value_for_datastore(self, model_instance):\n        return getattr(model_instance, self.name)\n\n    def make_value_from_datastore(self, value):\n        return value\n\n    def get_choices(self):\n        if callable(self.choices):\n            return self.choices()\n        return self.choices\n\ndef validate_string(value):\n    if value == None:\n        return\n    elif isinstance(value, str) or isinstance(value, unicode):\n        if len(value) > 1024:\n            raise ValueError, 'Length of value greater than maxlength'\n    else:\n        raise TypeError, 'Expecting String, got %s' % type(value)\n\nclass StringProperty(Property):\n\n    type_name = 'String'\n    \n    def __init__(self, verbose_name=None, name=None, default='', required=False,\n                 validator=validate_string, choices=None, unique=False):\n        Property.__init__(self, verbose_name, name, default, required, validator, choices, unique)\n\nclass TextProperty(Property):\n    \n    type_name = 'Text'\n    \n    def __init__(self, verbose_name=None, name=None, default='', required=False,\n                 validator=None, choices=None, unique=False, max_length=None):\n        Property.__init__(self, verbose_name, name, default, required, validator, choices, unique)\n        self.max_length = max_length\n\n    def validate(self, value):\n        value = super(TextProperty, self).validate(value)\n        if not isinstance(value, str) and not isinstance(value, unicode):\n            raise TypeError, 'Expecting Text, got %s' % type(value)\n        if self.max_length and len(value) > self.max_length:\n            raise ValueError, 'Length of value greater than maxlength %s' % self.max_length\n\nclass PasswordProperty(StringProperty):\n    \"\"\"\n\n    Hashed property whose original value can not be\n    retrieved, but still can be compared.\n\n    Works by storing a hash of the original value instead\n    of the original value.  Once that's done all that\n    can be retrieved is the hash.\n\n    The comparison\n\n       obj.password == 'foo' \n\n    generates a hash of 'foo' and compares it to the\n    stored hash.\n\n    Underlying data type for hashing, storing, and comparing\n    is boto.utils.Password.  The default hash function is\n    defined there ( currently sha512 in most cases, md5\n    where sha512 is not available )\n\n    It's unlikely you'll ever need to use a different hash\n    function, but if you do, you can control the behavior \n    in one of two ways:\n\n      1) Specifying hashfunc in PasswordProperty constructor\n\n         import hashlib\n\n         class MyModel(model):\n             password = PasswordProperty(hashfunc=hashlib.sha224)\n\n      2) Subclassing Password and PasswordProperty\n        \n         class SHA224Password(Password):\n             hashfunc=hashlib.sha224\n\n         class SHA224PasswordProperty(PasswordProperty):\n             data_type=MyPassword\n             type_name=\"MyPassword\"\n\n         class MyModel(Model):\n             password = SHA224PasswordProperty()\n\n    \"\"\"\n    data_type = Password\n    type_name = 'Password'\n\n    def __init__(self, verbose_name=None, name=None, default='', required=False,\n                 validator=None, choices=None, unique=False, hashfunc=None):\n\n        \"\"\"\n           The hashfunc parameter overrides the default hashfunc in boto.utils.Password.\n\n           The remaining parameters are passed through to StringProperty.__init__\"\"\"\n\n\n        StringProperty.__init__(self, verbose_name, name, default, required, validator, choices, unique)\n        self.hashfunc=hashfunc\n\n    def make_value_from_datastore(self, value):\n        p = self.data_type(value, hashfunc=self.hashfunc)\n        return p\n\n    def get_value_for_datastore(self, model_instance):\n        value = StringProperty.get_value_for_datastore(self, model_instance)\n        if value and len(value):\n            return str(value)\n        else:\n            return None\n\n    def __set__(self, obj, value):\n        if not isinstance(value, self.data_type):\n            p = self.data_type(hashfunc=self.hashfunc)\n            p.set(value)\n            value = p\n        Property.__set__(self, obj, value)\n\n    def __get__(self, obj, objtype):\n        return self.data_type(StringProperty.__get__(self, obj, objtype), hashfunc=self.hashfunc)\n\n    def validate(self, value):\n        value = Property.validate(self, value)\n        if isinstance(value, self.data_type):\n            if len(value) > 1024:\n                raise ValueError, 'Length of value greater than maxlength'\n        else:\n            raise TypeError, 'Expecting %s, got %s' % (type(self.data_type), type(value))\n\nclass BlobProperty(Property):\n    data_type = Blob\n    type_name = \"blob\"\n\n    def __set__(self, obj, value):\n        if value != self.default_value():\n            if not isinstance(value, Blob):\n                oldb = self.__get__(obj, type(obj))\n                id = None\n                if oldb:\n                    id = oldb.id\n                b = Blob(value=value, id=id)\n                value = b\n        Property.__set__(self, obj, value)\n\nclass S3KeyProperty(Property):\n    \n    data_type = boto.s3.key.Key\n    type_name = 'S3Key'\n    validate_regex = \"^s3:\\/\\/([^\\/]*)\\/(.*)$\"\n\n    def __init__(self, verbose_name=None, name=None, default=None,\n                 required=False, validator=None, choices=None, unique=False):\n        Property.__init__(self, verbose_name, name, default, required,\n                          validator, choices, unique)\n\n    def validate(self, value):\n        value = super(S3KeyProperty, self).validate(value)\n        if value == self.default_value() or value == str(self.default_value()):\n            return self.default_value()\n        if isinstance(value, self.data_type):\n            return\n        match = re.match(self.validate_regex, value)\n        if match:\n            return\n        raise TypeError, 'Validation Error, expecting %s, got %s' % (self.data_type, type(value))\n\n    def __get__(self, obj, objtype):\n        value = Property.__get__(self, obj, objtype)\n        if value:\n            if isinstance(value, self.data_type):\n                return value\n            match = re.match(self.validate_regex, value)\n            if match:\n                s3 = obj._manager.get_s3_connection()\n                bucket = s3.get_bucket(match.group(1), validate=False)\n                k = bucket.get_key(match.group(2))\n                if not k:\n                    k = bucket.new_key(match.group(2))\n                    k.set_contents_from_string(\"\")\n                return k\n        else:\n            return value\n        \n    def get_value_for_datastore(self, model_instance):\n        value = Property.get_value_for_datastore(self, model_instance)\n        if value:\n            return \"s3://%s/%s\" % (value.bucket.name, value.name)\n        else:\n            return None\n\nclass IntegerProperty(Property):\n\n    data_type = int\n    type_name = 'Integer'\n\n    def __init__(self, verbose_name=None, name=None, default=0, required=False,\n                 validator=None, choices=None, unique=False, max=2147483647, min=-2147483648):\n        Property.__init__(self, verbose_name, name, default, required, validator, choices, unique)\n        self.max = max\n        self.min = min\n\n    def validate(self, value):\n        value = int(value)\n        value = Property.validate(self, value)\n        if value > self.max:\n            raise ValueError, 'Maximum value is %d' % self.max\n        if value < self.min:\n            raise ValueError, 'Minimum value is %d' % self.min\n        return value\n    \n    def empty(self, value):\n        return value is None\n\n    def __set__(self, obj, value):\n        if value == \"\" or value == None:\n            value = 0\n        return Property.__set__(self, obj, value)\n\n\n\nclass LongProperty(Property):\n\n    data_type = long\n    type_name = 'Long'\n\n    def __init__(self, verbose_name=None, name=None, default=0, required=False,\n                 validator=None, choices=None, unique=False):\n        Property.__init__(self, verbose_name, name, default, required, validator, choices, unique)\n\n    def validate(self, value):\n        value = long(value)\n        value = Property.validate(self, value)\n        min = -9223372036854775808\n        max = 9223372036854775807\n        if value > max:\n            raise ValueError, 'Maximum value is %d' % max\n        if value < min:\n            raise ValueError, 'Minimum value is %d' % min\n        return value\n        \n    def empty(self, value):\n        return value is None\n\nclass BooleanProperty(Property):\n\n    data_type = bool\n    type_name = 'Boolean'\n\n    def __init__(self, verbose_name=None, name=None, default=False, required=False,\n                 validator=None, choices=None, unique=False):\n        Property.__init__(self, verbose_name, name, default, required, validator, choices, unique)\n\n    def empty(self, value):\n        return value is None\n    \nclass FloatProperty(Property):\n\n    data_type = float\n    type_name = 'Float'\n\n    def __init__(self, verbose_name=None, name=None, default=0.0, required=False,\n                 validator=None, choices=None, unique=False):\n        Property.__init__(self, verbose_name, name, default, required, validator, choices, unique)\n\n    def validate(self, value):\n        value = float(value)\n        value = Property.validate(self, value)\n        return value\n    \n    def empty(self, value):\n        return value is None\n\nclass DateTimeProperty(Property):\n\n    data_type = datetime.datetime\n    type_name = 'DateTime'\n\n    def __init__(self, verbose_name=None, auto_now=False, auto_now_add=False, name=None,\n                 default=None, required=False, validator=None, choices=None, unique=False):\n        Property.__init__(self, verbose_name, name, default, required, validator, choices, unique)\n        self.auto_now = auto_now\n        self.auto_now_add = auto_now_add\n\n    def default_value(self):\n        if self.auto_now or self.auto_now_add:\n            return self.now()\n        return Property.default_value(self)\n\n    def validate(self, value):\n        value = super(DateTimeProperty, self).validate(value)\n        if value == None:\n            return\n        if not isinstance(value, self.data_type):\n            raise TypeError, 'Validation Error, expecting %s, got %s' % (self.data_type, type(value))\n\n    def get_value_for_datastore(self, model_instance):\n        if self.auto_now:\n            setattr(model_instance, self.name, self.now())\n        return Property.get_value_for_datastore(self, model_instance)\n\n    def now(self):\n        return datetime.datetime.utcnow()\n\nclass DateProperty(Property):\n\n    data_type = datetime.date\n    type_name = 'Date'\n\n    def __init__(self, verbose_name=None, auto_now=False, auto_now_add=False, name=None,\n                 default=None, required=False, validator=None, choices=None, unique=False):\n        Property.__init__(self, verbose_name, name, default, required, validator, choices, unique)\n        self.auto_now = auto_now\n        self.auto_now_add = auto_now_add\n\n    def default_value(self):\n        if self.auto_now or self.auto_now_add:\n            return self.now()\n        return Property.default_value(self)\n\n    def validate(self, value):\n        value = super(DateProperty, self).validate(value)\n        if value == None:\n            return\n        if not isinstance(value, self.data_type):\n            raise TypeError, 'Validation Error, expecting %s, got %s' % (self.data_type, type(value))\n\n    def get_value_for_datastore(self, model_instance):\n        if self.auto_now:\n            setattr(model_instance, self.name, self.now())\n        val = Property.get_value_for_datastore(self, model_instance)\n        if isinstance(val, datetime.datetime):\n            val = val.date()\n        return val\n\n    def now(self):\n        return datetime.date.today()\n\n\nclass TimeProperty(Property):\n    data_type = datetime.time\n    type_name = 'Time'\n\n    def __init__(self, verbose_name=None, name=None,\n                 default=None, required=False, validator=None, choices=None, unique=False):\n        Property.__init__(self, verbose_name, name, default, required, validator, choices, unique)\n\n    def validate(self, value):\n        value = super(TimeProperty, self).validate(value)\n        if value is None:\n            return\n        if not isinstance(value, self.data_type):\n            raise TypeError, 'Validation Error, expecting %s, got %s' % (self.data_type, type(value))\n\n\nclass ReferenceProperty(Property):\n\n    data_type = Key\n    type_name = 'Reference'\n\n    def __init__(self, reference_class=None, collection_name=None,\n                 verbose_name=None, name=None, default=None, required=False, validator=None, choices=None, unique=False):\n        Property.__init__(self, verbose_name, name, default, required, validator, choices, unique)\n        self.reference_class = reference_class\n        self.collection_name = collection_name\n        \n    def __get__(self, obj, objtype):\n        if obj:\n            value = getattr(obj, self.slot_name)\n            if value == self.default_value():\n                return value\n            # If the value is still the UUID for the referenced object, we need to create\n            # the object now that is the attribute has actually been accessed.  This lazy\n            # instantiation saves unnecessary roundtrips to SimpleDB\n            if isinstance(value, str) or isinstance(value, unicode):\n                value = self.reference_class(value)\n                setattr(obj, self.name, value)\n            return value\n\n    def __set__(self, obj, value):\n        \"\"\"Don't allow this object to be associated to itself\n        This causes bad things to happen\"\"\"\n        if value != None and (obj.id == value or (hasattr(value, \"id\") and obj.id == value.id)):\n            raise ValueError, \"Can not associate an object with itself!\"\n        return super(ReferenceProperty, self).__set__(obj,value)\n\n    def __property_config__(self, model_class, property_name):\n        Property.__property_config__(self, model_class, property_name)\n        if self.collection_name is None:\n            self.collection_name = '%s_%s_set' % (model_class.__name__.lower(), self.name)\n        if hasattr(self.reference_class, self.collection_name):\n            raise ValueError, 'duplicate property: %s' % self.collection_name\n        setattr(self.reference_class, self.collection_name,\n                _ReverseReferenceProperty(model_class, property_name, self.collection_name))\n\n    def check_uuid(self, value):\n        # This does a bit of hand waving to \"type check\" the string\n        t = value.split('-')\n        if len(t) != 5:\n            raise ValueError\n\n    def check_instance(self, value):\n        try:\n            obj_lineage = value.get_lineage()\n            cls_lineage = self.reference_class.get_lineage()\n            if obj_lineage.startswith(cls_lineage):\n                return\n            raise TypeError, '%s not instance of %s' % (obj_lineage, cls_lineage)\n        except:\n            raise ValueError, '%s is not a Model' % value\n            \n    def validate(self, value):\n        if self.validator:\n            self.validator(value)\n        if self.required and value==None:\n            raise ValueError, '%s is a required property' % self.name\n        if value == self.default_value():\n            return\n        if not isinstance(value, str) and not isinstance(value, unicode):\n            self.check_instance(value)\n        \nclass _ReverseReferenceProperty(Property):\n    data_type = Query\n    type_name = 'query'\n\n    def __init__(self, model, prop, name):\n        self.__model = model\n        self.__property = prop\n        self.collection_name = prop\n        self.name = name\n        self.item_type = model\n\n    def __get__(self, model_instance, model_class):\n        \"\"\"Fetches collection of model instances of this collection property.\"\"\"\n        if model_instance is not None:\n            query = Query(self.__model)\n            if type(self.__property) == list:\n                props = []\n                for prop in self.__property:\n                    props.append(\"%s =\" % prop)\n                return query.filter(props, model_instance)\n            else:\n                return query.filter(self.__property + ' =', model_instance)\n        else:\n            return self\n\n    def __set__(self, model_instance, value):\n        \"\"\"Not possible to set a new collection.\"\"\"\n        raise ValueError, 'Virtual property is read-only'\n\n        \nclass CalculatedProperty(Property):\n\n    def __init__(self, verbose_name=None, name=None, default=None,\n                 required=False, validator=None, choices=None,\n                 calculated_type=int, unique=False, use_method=False):\n        Property.__init__(self, verbose_name, name, default, required,\n                          validator, choices, unique)\n        self.calculated_type = calculated_type\n        self.use_method = use_method\n        \n    def __get__(self, obj, objtype):\n        value = self.default_value()\n        if obj:\n            try:\n                value = getattr(obj, self.slot_name)\n                if self.use_method:\n                    value = value()\n            except AttributeError:\n                pass\n        return value\n\n    def __set__(self, obj, value):\n        \"\"\"Not possible to set a new AutoID.\"\"\"\n        pass\n\n    def _set_direct(self, obj, value):\n        if not self.use_method:\n            setattr(obj, self.slot_name, value)\n\n    def get_value_for_datastore(self, model_instance):\n        if self.calculated_type in [str, int, bool]:\n            value = self.__get__(model_instance, model_instance.__class__)\n            return value\n        else:\n            return None\n\nclass ListProperty(Property):\n    \n    data_type = list\n    type_name = 'List'\n\n    def __init__(self, item_type, verbose_name=None, name=None, default=None, **kwds):\n        if default is None:\n            default = []\n        self.item_type = item_type\n        Property.__init__(self, verbose_name, name, default=default, required=True, **kwds)\n\n    def validate(self, value):\n        if self.validator:\n            self.validator(value)\n        if value is not None:\n            if not isinstance(value, list):\n                value = [value]\n\n        if self.item_type in (int, long):\n            item_type = (int, long)\n        elif self.item_type in (str, unicode):\n            item_type = (str, unicode)\n        else:\n            item_type = self.item_type\n\n        for item in value:\n            if not isinstance(item, item_type):\n                if item_type == (int, long):\n                    raise ValueError, 'Items in the %s list must all be integers.' % self.name\n                else:\n                    raise ValueError('Items in the %s list must all be %s instances' %\n                                     (self.name, self.item_type.__name__))\n        return value\n\n    def empty(self, value):\n        return value is None\n\n    def default_value(self):\n        return list(super(ListProperty, self).default_value())\n\n    def __set__(self, obj, value):\n        \"\"\"Override the set method to allow them to set the property to an instance of the item_type instead of requiring a list to be passed in\"\"\"\n        if self.item_type in (int, long):\n            item_type = (int, long)\n        elif self.item_type in (str, unicode):\n            item_type = (str, unicode)\n        else:\n            item_type = self.item_type\n        if isinstance(value, item_type):\n            value = [value]\n        elif value == None: # Override to allow them to set this to \"None\" to remove everything\n            value = []\n        return super(ListProperty, self).__set__(obj,value)\n\n\nclass MapProperty(Property):\n    \n    data_type = dict\n    type_name = 'Map'\n\n    def __init__(self, item_type=str, verbose_name=None, name=None, default=None, **kwds):\n        if default is None:\n            default = {}\n        self.item_type = item_type\n        Property.__init__(self, verbose_name, name, default=default, required=True, **kwds)\n\n    def validate(self, value):\n        value = super(MapProperty, self).validate(value)\n        if value is not None:\n            if not isinstance(value, dict):\n                raise ValueError, 'Value must of type dict'\n\n        if self.item_type in (int, long):\n            item_type = (int, long)\n        elif self.item_type in (str, unicode):\n            item_type = (str, unicode)\n        else:\n            item_type = self.item_type\n\n        for key in value:\n            if not isinstance(value[key], item_type):\n                if item_type == (int, long):\n                    raise ValueError, 'Values in the %s Map must all be integers.' % self.name\n                else:\n                    raise ValueError('Values in the %s Map must all be %s instances' %\n                                     (self.name, self.item_type.__name__))\n        return value\n\n    def empty(self, value):\n        return value is None\n\n    def default_value(self):\n        return {}\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/sdb/db/query.py",
    "content": "# Copyright (c) 2006,2007,2008 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nclass Query(object):\n    __local_iter__ = None\n    def __init__(self, model_class, limit=None, next_token=None, manager=None):\n        self.model_class = model_class\n        self.limit = limit\n        self.offset = 0\n        if manager:\n            self.manager = manager\n        else:\n            self.manager = self.model_class._manager\n        self.filters = []\n        self.select = None\n        self.sort_by = None\n        self.rs = None\n        self.next_token = next_token\n\n    def __iter__(self):\n        return iter(self.manager.query(self))\n\n    def next(self):\n        if self.__local_iter__ == None:\n            self.__local_iter__ = self.__iter__()\n        return self.__local_iter__.next()\n\n    def filter(self, property_operator, value):\n        self.filters.append((property_operator, value))\n        return self\n\n    def fetch(self, limit, offset=0):\n        \"\"\"Not currently fully supported, but we can use this\n        to allow them to set a limit in a chainable method\"\"\"\n        self.limit = limit\n        self.offset = offset\n        return self\n\n    def count(self, quick=True):\n        return self.manager.count(self.model_class, self.filters, quick, self.sort_by, self.select)\n\n    def get_query(self):\n        return self.manager._build_filter_part(self.model_class, self.filters, self.sort_by, self.select)\n\n    def order(self, key):\n        self.sort_by = key\n        return self\n    \n    def to_xml(self, doc=None):\n        if not doc:\n            xmlmanager = self.model_class.get_xmlmanager()\n            doc = xmlmanager.new_doc()\n        for obj in self:\n            obj.to_xml(doc)\n        return doc\n\n    def get_next_token(self):\n        if self.rs:\n            return self.rs.next_token\n        if self._next_token:\n            return self._next_token\n        return None\n\n    def set_next_token(self, token):\n        self._next_token = token\n\n    next_token = property(get_next_token, set_next_token)\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/sdb/db/sequence.py",
    "content": "# Copyright (c) 2010 Chris Moyer http://coredumped.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nfrom boto.exception import SDBResponseError\n\nclass SequenceGenerator(object):\n    \"\"\"Generic Sequence Generator object, this takes a single\n    string as the \"sequence\" and uses that to figure out\n    what the next value in a string is. For example\n    if you give \"ABC\" and pass in \"A\" it will give you \"B\",\n    and if you give it \"C\" it will give you \"AA\".\n\n    If you set \"rollover\" to True in the above example, passing\n    in \"C\" would give you \"A\" again.\n\n    The Sequence string can be a string or any iterable\n    that has the \"index\" function and is indexable.\n    \"\"\"\n    __name__ = \"SequenceGenerator\"\n\n    def __init__(self, sequence_string, rollover=False):\n        \"\"\"Create a new SequenceGenerator using the sequence_string\n        as how to generate the next item.\n\n        :param sequence_string: The string or list that explains\n        how to generate the next item in the sequence\n        :type sequence_string: str,iterable\n\n        :param rollover: Rollover instead of incrementing when\n        we hit the end of the sequence\n        :type rollover: bool\n        \"\"\"\n        self.sequence_string = sequence_string\n        self.sequence_length = len(sequence_string[0])\n        self.rollover = rollover\n        self.last_item = sequence_string[-1]\n        self.__name__ = \"%s('%s')\" % (self.__class__.__name__, sequence_string)\n\n    def __call__(self, val, last=None):\n        \"\"\"Get the next value in the sequence\"\"\"\n        # If they pass us in a string that's not at least\n        # the lenght of our sequence, then return the\n        # first element in our sequence\n        if val == None or len(val) < self.sequence_length:\n            return self.sequence_string[0]\n        last_value = val[-self.sequence_length:]\n        if (not self.rollover) and (last_value == self.last_item):\n            val = \"%s%s\" % (self(val[:-self.sequence_length]), self._inc(last_value))\n        else:\n            val = \"%s%s\" % (val[:-self.sequence_length], self._inc(last_value))\n        return val\n\n    def _inc(self, val):\n        \"\"\"Increment a single value\"\"\"\n        assert(len(val) == self.sequence_length)\n        return self.sequence_string[(self.sequence_string.index(val)+1) % len(self.sequence_string)]\n\n\n\n#\n# Simple Sequence Functions\n#\ndef increment_by_one(cv=None, lv=None):\n    if cv == None:\n        return 0\n    return cv + 1\n\ndef double(cv=None, lv=None):\n    if cv == None:\n        return 1\n    return cv * 2\n\ndef fib(cv=1, lv=0):\n    \"\"\"The fibonacci sequence, this incrementer uses the\n    last value\"\"\"\n    if cv == None:\n        cv = 1\n    if lv == None:\n        lv = 0\n    return cv + lv\n\nincrement_string = SequenceGenerator(\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\")\n\n\n\nclass Sequence(object):\n    \"\"\"A simple Sequence using the new SDB \"Consistent\" features\n    Based largly off of the \"Counter\" example from mitch garnaat:\n    http://bitbucket.org/mitch/stupidbototricks/src/tip/counter.py\"\"\"\n\n\n    def __init__(self, id=None, domain_name=None, fnc=increment_by_one, init_val=None):\n        \"\"\"Create a new Sequence, using an optional function to \n        increment to the next number, by default we just increment by one.\n        Every parameter here is optional, if you don't specify any options\n        then you'll get a new SequenceGenerator with a random ID stored in the\n        default domain that increments by one and uses the default botoweb \n        environment\n\n        :param id: Optional ID (name) for this counter\n        :type id: str\n\n        :param domain_name: Optional domain name to use, by default we get this out of the\n            environment configuration\n        :type domain_name:str\n\n        :param fnc: Optional function to use for the incrementation, by default we just increment by one\n            There are several functions defined in this module.\n            Your function must accept \"None\" to get the initial value\n        :type fnc: function, str\n\n        :param init_val: Initial value, by default this is the first element in your sequence, \n            but you can pass in any value, even a string if you pass in a function that uses\n            strings instead of ints to increment\n        \"\"\"\n        self._db = None\n        self._value = None\n        self.last_value = None\n        self.domain_name = domain_name\n        self.id = id\n        if self.id == None:\n            import uuid\n            self.id = str(uuid.uuid4())\n            if init_val == None:\n                init_val = fnc(init_val)\n            self.val = init_val\n\n        self.item_type = type(fnc(None))\n        self.timestamp = None\n        # Allow us to pass in a full name to a function\n        if type(fnc) == str:\n            from boto.utils import find_class\n            fnc = find_class(fnc)\n        self.fnc = fnc\n\n    def set(self, val):\n        \"\"\"Set the value\"\"\"\n        import time\n        now = time.time()\n        expected_value = []\n        new_val = {}\n        new_val['timestamp'] = now\n        if self._value != None:\n            new_val['last_value'] = self._value\n            expected_value = ['current_value', str(self._value)]\n        new_val['current_value'] = val\n        try:\n            self.db.put_attributes(self.id, new_val, expected_value=expected_value)\n            self.timestamp = new_val['timestamp']\n        except SDBResponseError, e:\n            if e.status == 409:\n                raise ValueError, \"Sequence out of sync\"\n            else:\n                raise\n\n\n    def get(self):\n        \"\"\"Get the value\"\"\"\n        val = self.db.get_attributes(self.id, consistent_read=True)\n        if val and val.has_key('timestamp'):\n            self.timestamp = val['timestamp']\n        if val and val.has_key('current_value'):\n            self._value = self.item_type(val['current_value'])\n        if val.has_key(\"last_value\") and val['last_value'] != None:\n            self.last_value = self.item_type(val['last_value'])\n        return self._value\n\n    val = property(get, set)\n\n    def __repr__(self):\n        return \"%s('%s', '%s', '%s.%s', '%s')\" % (\n            self.__class__.__name__,\n            self.id,\n            self.domain_name,\n            self.fnc.__module__, self.fnc.__name__,\n            self.val)\n\n\n    def _connect(self):\n        \"\"\"Connect to our domain\"\"\"\n        if not self._db:\n            import boto\n            sdb = boto.connect_sdb()\n            if not self.domain_name:\n                self.domain_name = boto.config.get(\"DB\", \"sequence_db\", boto.config.get(\"DB\", \"db_name\", \"default\"))\n            try:\n                self._db = sdb.get_domain(self.domain_name)\n            except SDBResponseError, e:\n                if e.status == 400:\n                    self._db = sdb.create_domain(self.domain_name)\n                else:\n                    raise\n        return self._db\n\n    db = property(_connect)\n\n    def next(self):\n        self.val = self.fnc(self.val, self.last_value)\n        return self.val\n\n    def delete(self):\n        \"\"\"Remove this sequence\"\"\"\n        self.db.delete_attributes(self.id)\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/sdb/db/test_db.py",
    "content": "from boto.sdb.db.model import Model\nfrom boto.sdb.db.property import StringProperty, IntegerProperty, BooleanProperty\nfrom boto.sdb.db.property import DateTimeProperty, FloatProperty, ReferenceProperty\nfrom boto.sdb.db.property import PasswordProperty, ListProperty, MapProperty\nfrom datetime import datetime\nimport time\nfrom boto.exception import SDBPersistenceError\n\n_objects = {}\n\n#\n# This will eventually be moved to the boto.tests module and become a real unit test\n# but for now it will live here.  It shows examples of each of the Property types in\n# use and tests the basic operations.\n#\nclass TestBasic(Model):\n\n    name = StringProperty()\n    size = IntegerProperty()\n    foo = BooleanProperty()\n    date = DateTimeProperty()\n\nclass TestFloat(Model):\n\n    name = StringProperty()\n    value = FloatProperty()\n\nclass TestRequired(Model):\n\n    req = StringProperty(required=True, default='foo')\n\nclass TestReference(Model):\n\n    ref = ReferenceProperty(reference_class=TestBasic, collection_name='refs')\n\nclass TestSubClass(TestBasic):\n\n    answer = IntegerProperty()\n\nclass TestPassword(Model):\n    password = PasswordProperty()\n\nclass TestList(Model):\n\n    name = StringProperty()\n    nums = ListProperty(int)\n\nclass TestMap(Model):\n\n    name = StringProperty()\n    map = MapProperty()\n\nclass TestListReference(Model):\n\n    name = StringProperty()\n    basics = ListProperty(TestBasic)\n\nclass TestAutoNow(Model):\n\n    create_date = DateTimeProperty(auto_now_add=True)\n    modified_date = DateTimeProperty(auto_now=True)\n\nclass TestUnique(Model):\n    name = StringProperty(unique=True)\n\ndef test_basic():\n    global _objects\n    t = TestBasic()\n    t.name = 'simple'\n    t.size = -42\n    t.foo = True\n    t.date = datetime.now()\n    print 'saving object'\n    t.put()\n    _objects['test_basic_t'] = t\n    time.sleep(5)\n    print 'now try retrieving it'\n    tt = TestBasic.get_by_id(t.id)\n    _objects['test_basic_tt'] = tt\n    assert tt.id == t.id\n    l = TestBasic.get_by_id([t.id])\n    assert len(l) == 1\n    assert l[0].id == t.id\n    assert t.size == tt.size\n    assert t.foo == tt.foo\n    assert t.name == tt.name\n    #assert t.date == tt.date\n    return t\n\ndef test_float():\n    global _objects\n    t = TestFloat()\n    t.name = 'float object'\n    t.value = 98.6\n    print 'saving object'\n    t.save()\n    _objects['test_float_t'] = t\n    time.sleep(5)\n    print 'now try retrieving it'\n    tt = TestFloat.get_by_id(t.id)\n    _objects['test_float_tt'] = tt\n    assert tt.id == t.id\n    assert tt.name == t.name\n    assert tt.value == t.value\n    return t\n    \ndef test_required():\n    global _objects\n    t = TestRequired()\n    _objects['test_required_t'] = t\n    t.put()\n    return t\n\ndef test_reference(t=None):\n    global _objects\n    if not t:\n        t = test_basic()\n    tt = TestReference()\n    tt.ref = t\n    tt.put()\n    time.sleep(10)\n    tt = TestReference.get_by_id(tt.id)\n    _objects['test_reference_tt'] = tt\n    assert tt.ref.id == t.id\n    for o in t.refs:\n        print o\n\ndef test_subclass():\n    global _objects\n    t = TestSubClass()\n    _objects['test_subclass_t'] = t\n    t.name = 'a subclass'\n    t.size = -489\n    t.save()\n\ndef test_password():\n    global _objects\n    t = TestPassword()\n    _objects['test_password_t'] = t\n    t.password = \"foo\"\n    t.save()\n    time.sleep(5)\n    # Make sure it stored ok\n    tt = TestPassword.get_by_id(t.id)\n    _objects['test_password_tt'] = tt\n    #Testing password equality\n    assert tt.password == \"foo\"\n    #Testing password not stored as string\n    assert str(tt.password) != \"foo\"\n\ndef test_list():\n    global _objects\n    t = TestList()\n    _objects['test_list_t'] = t\n    t.name = 'a list of ints'\n    t.nums = [1,2,3,4,5]\n    t.put()\n    tt = TestList.get_by_id(t.id)\n    _objects['test_list_tt'] = tt\n    assert tt.name == t.name\n    for n in tt.nums:\n        assert isinstance(n, int)\n\ndef test_list_reference():\n    global _objects\n    t = TestBasic()\n    t.put()\n    _objects['test_list_ref_t'] = t\n    tt = TestListReference()\n    tt.name = \"foo\"\n    tt.basics = [t]\n    tt.put()\n    time.sleep(5)\n    _objects['test_list_ref_tt'] = tt\n    ttt = TestListReference.get_by_id(tt.id)\n    assert ttt.basics[0].id == t.id\n\ndef test_unique():\n    global _objects\n    t = TestUnique()\n    name = 'foo' + str(int(time.time()))\n    t.name = name\n    t.put()\n    _objects['test_unique_t'] = t\n    time.sleep(10)\n    tt = TestUnique()\n    _objects['test_unique_tt'] = tt\n    tt.name = name\n    try:\n        tt.put()\n        assert False\n    except(SDBPersistenceError):\n        pass\n\ndef test_datetime():\n    global _objects\n    t = TestAutoNow()\n    t.put()\n    _objects['test_datetime_t'] = t\n    time.sleep(5)\n    tt = TestAutoNow.get_by_id(t.id)\n    assert tt.create_date.timetuple() == t.create_date.timetuple()\n\ndef test():\n    print 'test_basic'\n    t1 = test_basic()\n    print 'test_required'\n    test_required()\n    print 'test_reference'\n    test_reference(t1)\n    print 'test_subclass'\n    test_subclass()\n    print 'test_password'\n    test_password()\n    print 'test_list'\n    test_list()\n    print 'test_list_reference'\n    test_list_reference()\n    print \"test_datetime\"\n    test_datetime()\n    print 'test_unique'\n    test_unique()\n\nif __name__ == \"__main__\":\n    test()\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/sdb/domain.py",
    "content": "# Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\n\"\"\"\nRepresents an SDB Domain\n\"\"\"\nfrom boto.sdb.queryresultset import SelectResultSet\n\nclass Domain:\n\n    def __init__(self, connection=None, name=None):\n        self.connection = connection\n        self.name = name\n        self._metadata = None\n\n    def __repr__(self):\n        return 'Domain:%s' % self.name\n\n    def __iter__(self):\n        return iter(self.select(\"SELECT * FROM `%s`\" % self.name))\n\n    def startElement(self, name, attrs, connection):\n        return None\n\n    def endElement(self, name, value, connection):\n        if name == 'DomainName':\n            self.name = value\n        else:\n            setattr(self, name, value)\n\n    def get_metadata(self):\n        if not self._metadata:\n            self._metadata = self.connection.domain_metadata(self)\n        return self._metadata\n\n    def put_attributes(self, item_name, attributes,\n                       replace=True, expected_value=None):\n        \"\"\"\n        Store attributes for a given item.\n\n        :type item_name: string\n        :param item_name: The name of the item whose attributes are being stored.\n\n        :type attribute_names: dict or dict-like object\n        :param attribute_names: The name/value pairs to store as attributes\n\n        :type expected_value: list\n        :param expected_value: If supplied, this is a list or tuple consisting\n            of a single attribute name and expected value. The list can be \n            of the form:\n\n             * ['name', 'value']\n\n            In which case the call will first verify that the attribute \n            \"name\" of this item has a value of \"value\".  If it does, the delete\n            will proceed, otherwise a ConditionalCheckFailed error will be \n            returned. The list can also be of the form:\n            \n             * ['name', True|False]\n            \n            which will simply check for the existence (True) or non-existence \n            (False) of the attribute.\n\n        :type replace: bool\n        :param replace: Whether the attribute values passed in will replace\n                        existing values or will be added as addition values.\n                        Defaults to True.\n\n        :rtype: bool\n        :return: True if successful\n        \"\"\"\n        return self.connection.put_attributes(self, item_name, attributes,\n                                              replace, expected_value)\n\n    def batch_put_attributes(self, items, replace=True):\n        \"\"\"\n        Store attributes for multiple items.\n\n        :type items: dict or dict-like object\n        :param items: A dictionary-like object.  The keys of the dictionary are\n                      the item names and the values are themselves dictionaries\n                      of attribute names/values, exactly the same as the\n                      attribute_names parameter of the scalar put_attributes\n                      call.\n\n        :type replace: bool\n        :param replace: Whether the attribute values passed in will replace\n                        existing values or will be added as addition values.\n                        Defaults to True.\n\n        :rtype: bool\n        :return: True if successful\n        \"\"\"\n        return self.connection.batch_put_attributes(self, items, replace)\n\n    def get_attributes(self, item_name, attribute_name=None,\n                       consistent_read=False, item=None):\n        \"\"\"\n        Retrieve attributes for a given item.\n\n        :type item_name: string\n        :param item_name: The name of the item whose attributes are being retrieved.\n\n        :type attribute_names: string or list of strings\n        :param attribute_names: An attribute name or list of attribute names.  This\n                                parameter is optional.  If not supplied, all attributes\n                                will be retrieved for the item.\n\n        :rtype: :class:`boto.sdb.item.Item`\n        :return: An Item mapping type containing the requested attribute name/values\n        \"\"\"\n        return self.connection.get_attributes(self, item_name, attribute_name,\n                                              consistent_read, item)\n\n    def delete_attributes(self, item_name, attributes=None,\n                          expected_values=None):\n        \"\"\"\n        Delete attributes from a given item.\n\n        :type item_name: string\n        :param item_name: The name of the item whose attributes are being deleted.\n\n        :type attributes: dict, list or :class:`boto.sdb.item.Item`\n        :param attributes: Either a list containing attribute names which will cause\n                           all values associated with that attribute name to be deleted or\n                           a dict or Item containing the attribute names and keys and list\n                           of values to delete as the value.  If no value is supplied,\n                           all attribute name/values for the item will be deleted.\n                           \n        :type expected_value: list\n        :param expected_value: If supplied, this is a list or tuple consisting\n            of a single attribute name and expected value. The list can be of \n            the form:\n\n             * ['name', 'value']\n\n            In which case the call will first verify that the attribute \"name\"\n            of this item has a value of \"value\".  If it does, the delete\n            will proceed, otherwise a ConditionalCheckFailed error will be \n            returned. The list can also be of the form:\n\n             * ['name', True|False]\n\n            which will simply check for the existence (True) or \n            non-existence (False) of the attribute.\n\n        :rtype: bool\n        :return: True if successful\n        \"\"\"\n        return self.connection.delete_attributes(self, item_name, attributes,\n                                                 expected_values)\n\n    def batch_delete_attributes(self, items):\n        \"\"\"\n        Delete multiple items in this domain.\n        \n        :type items: dict or dict-like object\n        :param items: A dictionary-like object.  The keys of the dictionary are\n            the item names and the values are either:\n\n                * dictionaries of attribute names/values, exactly the\n                  same as the attribute_names parameter of the scalar\n                  put_attributes call.  The attribute name/value pairs\n                  will only be deleted if they match the name/value\n                  pairs passed in.\n                * None which means that all attributes associated\n                  with the item should be deleted.  \n\n        :rtype: bool\n        :return: True if successful\n        \"\"\"\n        return self.connection.batch_delete_attributes(self, items)\n\n    def select(self, query='', next_token=None, consistent_read=False, max_items=None):\n        \"\"\"\n        Returns a set of Attributes for item names within domain_name that match the query.\n        The query must be expressed in using the SELECT style syntax rather than the\n        original SimpleDB query language.\n\n        :type query: string\n        :param query: The SimpleDB query to be performed.\n\n        :rtype: iter\n        :return: An iterator containing the results.  This is actually a generator\n                 function that will iterate across all search results, not just the\n                 first page.\n        \"\"\"\n        return SelectResultSet(self, query, max_items=max_items, next_token=next_token,\n                               consistent_read=consistent_read)\n\n    def get_item(self, item_name, consistent_read=False):\n        \"\"\"\n        Retrieves an item from the domain, along with all of its attributes.\n        \n        :param string item_name: The name of the item to retrieve.\n        :rtype: :class:`boto.sdb.item.Item` or ``None``\n        :keyword bool consistent_read: When set to true, ensures that the most \n                                       recent data is returned.\n        :return: The requested item, or ``None`` if there was no match found \n        \"\"\"\n        item = self.get_attributes(item_name, consistent_read=consistent_read)\n        if item:\n            item.domain = self\n            return item\n        else:\n            return None\n\n    def new_item(self, item_name):\n        return self.connection.item_cls(self, item_name)\n\n    def delete_item(self, item):\n        self.delete_attributes(item.name)\n\n    def to_xml(self, f=None):\n        \"\"\"Get this domain as an XML DOM Document\n        :param f: Optional File to dump directly to\n        :type f: File or Stream\n\n        :return: File object where the XML has been dumped to\n        :rtype: file\n        \"\"\"\n        if not f:\n            from tempfile import TemporaryFile\n            f = TemporaryFile()\n        print >> f, '<?xml version=\"1.0\" encoding=\"UTF-8\"?>'\n        print >> f, '<Domain id=\"%s\">' % self.name\n        for item in self:\n            print >> f, '\\t<Item id=\"%s\">' % item.name\n            for k in item:\n                print >> f, '\\t\\t<attribute id=\"%s\">' % k\n                values = item[k]\n                if not isinstance(values, list):\n                    values = [values]\n                for value in values:\n                    print >> f, '\\t\\t\\t<value><![CDATA[',\n                    if isinstance(value, unicode):\n                        value = value.encode('utf-8', 'replace')\n                    else:\n                        value = unicode(value, errors='replace').encode('utf-8', 'replace')\n                    f.write(value)\n                    print >> f, ']]></value>'\n                print >> f, '\\t\\t</attribute>'\n            print >> f, '\\t</Item>'\n        print >> f, '</Domain>'\n        f.flush()\n        f.seek(0)\n        return f\n\n\n    def from_xml(self, doc):\n        \"\"\"Load this domain based on an XML document\"\"\"\n        import xml.sax\n        handler = DomainDumpParser(self)\n        xml.sax.parse(doc, handler)\n        return handler\n\n    def delete(self):\n        \"\"\"\n        Delete this domain, and all items under it\n        \"\"\"\n        return self.connection.delete_domain(self)\n\n\nclass DomainMetaData:\n\n    def __init__(self, domain=None):\n        self.domain = domain\n        self.item_count = None\n        self.item_names_size = None\n        self.attr_name_count = None\n        self.attr_names_size = None\n        self.attr_value_count = None\n        self.attr_values_size = None\n\n    def startElement(self, name, attrs, connection):\n        return None\n\n    def endElement(self, name, value, connection):\n        if name == 'ItemCount':\n            self.item_count = int(value)\n        elif name == 'ItemNamesSizeBytes':\n            self.item_names_size = int(value)\n        elif name == 'AttributeNameCount':\n            self.attr_name_count = int(value)\n        elif name == 'AttributeNamesSizeBytes':\n            self.attr_names_size = int(value)\n        elif name == 'AttributeValueCount':\n            self.attr_value_count = int(value)\n        elif name == 'AttributeValuesSizeBytes':\n            self.attr_values_size = int(value)\n        elif name == 'Timestamp':\n            self.timestamp = value\n        else:\n            setattr(self, name, value)\n\nimport sys\nfrom xml.sax.handler import ContentHandler\nclass DomainDumpParser(ContentHandler):\n    \"\"\"\n    SAX parser for a domain that has been dumped\n    \"\"\"\n\n    def __init__(self, domain):\n        self.uploader = UploaderThread(domain)\n        self.item_id = None\n        self.attrs = {}\n        self.attribute = None\n        self.value = \"\"\n        self.domain = domain\n\n    def startElement(self, name, attrs):\n        if name == \"Item\":\n            self.item_id = attrs['id']\n            self.attrs = {}\n        elif name == \"attribute\":\n            self.attribute = attrs['id']\n        elif name == \"value\":\n            self.value = \"\"\n\n    def characters(self, ch):\n        self.value += ch\n\n    def endElement(self, name):\n        if name == \"value\":\n            if self.value and self.attribute:\n                value = self.value.strip()\n                attr_name = self.attribute.strip()\n                if self.attrs.has_key(attr_name):\n                    self.attrs[attr_name].append(value)\n                else:\n                    self.attrs[attr_name] = [value]\n        elif name == \"Item\":\n            self.uploader.items[self.item_id] = self.attrs\n            # Every 20 items we spawn off the uploader\n            if len(self.uploader.items) >= 20:\n                self.uploader.start()\n                self.uploader = UploaderThread(self.domain)\n        elif name == \"Domain\":\n            # If we're done, spawn off our last Uploader Thread\n            self.uploader.start()\n\nfrom threading import Thread\nclass UploaderThread(Thread):\n    \"\"\"Uploader Thread\"\"\"\n\n    def __init__(self, domain):\n        self.db = domain\n        self.items = {}\n        Thread.__init__(self)\n\n    def run(self):\n        try:\n            self.db.batch_put_attributes(self.items)\n        except:\n            print \"Exception using batch put, trying regular put instead\"\n            for item_name in self.items:\n                self.db.put_attributes(item_name, self.items[item_name])\n        print \".\",\n        sys.stdout.flush()\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/sdb/item.py",
    "content": "# Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nimport base64\n\nclass Item(dict):\n    \"\"\"\n    A ``dict`` sub-class that serves as an object representation of a\n    SimpleDB item. An item in SDB is similar to a row in a relational\n    database. Items belong to a :py:class:`Domain <boto.sdb.domain.Domain>`,\n    which is similar to a table in a relational database.\n    \n    The keys on instances of this object correspond to attributes that are\n    stored on the SDB item. \n    \n    .. tip:: While it is possible to instantiate this class directly, you may\n        want to use the convenience methods on :py:class:`boto.sdb.domain.Domain`\n        for that purpose. For example, :py:meth:`boto.sdb.domain.Domain.get_item`.\n    \"\"\"\n    def __init__(self, domain, name='', active=False):\n        \"\"\"\n        :type domain: :py:class:`boto.sdb.domain.Domain`\n        :param domain: The domain that this item belongs to.\n        \n        :param str name: The name of this item. This name will be used when\n            querying for items using methods like \n            :py:meth:`boto.sdb.domain.Domain.get_item`\n        \"\"\"\n        dict.__init__(self)\n        self.domain = domain\n        self.name = name\n        self.active = active\n        self.request_id = None\n        self.encoding = None\n        self.in_attribute = False\n        self.converter = self.domain.connection.converter\n\n    def startElement(self, name, attrs, connection):\n        if name == 'Attribute':\n            self.in_attribute = True\n        self.encoding = attrs.get('encoding', None)\n        return None\n\n    def decode_value(self, value):\n        if self.encoding == 'base64':\n            self.encoding = None\n            return base64.decodestring(value)\n        else:\n            return value\n\n    def endElement(self, name, value, connection):\n        if name == 'ItemName':\n            self.name = self.decode_value(value)\n        elif name == 'Name':\n            if self.in_attribute:\n                self.last_key = self.decode_value(value)\n            else:\n                self.name = self.decode_value(value)\n        elif name == 'Value':\n            if self.has_key(self.last_key):\n                if not isinstance(self[self.last_key], list):\n                    self[self.last_key] = [self[self.last_key]]\n                value = self.decode_value(value)\n                if self.converter:\n                    value = self.converter.decode(value)\n                self[self.last_key].append(value)\n            else:\n                value = self.decode_value(value)\n                if self.converter:\n                    value = self.converter.decode(value)\n                self[self.last_key] = value\n        elif name == 'BoxUsage':\n            try:\n                connection.box_usage += float(value)\n            except:\n                pass\n        elif name == 'RequestId':\n            self.request_id = value\n        elif name == 'Attribute':\n            self.in_attribute = False\n        else:\n            setattr(self, name, value)\n\n    def load(self):\n        \"\"\"\n        Loads or re-loads this item's attributes from SDB.\n        \n        .. warning:: \n            If you have changed attribute values on an Item instance,\n            this method will over-write the values if they are different in\n            SDB. For any local attributes that don't yet exist in SDB,\n            they will be safe.\n        \"\"\"\n        self.domain.get_attributes(self.name, item=self)\n\n    def save(self, replace=True):\n        \"\"\"\n        Saves this item to SDB.\n        \n        :param bool replace: If ``True``, delete any attributes on the remote\n            SDB item that have a ``None`` value on this object.\n        \"\"\"\n        self.domain.put_attributes(self.name, self, replace)\n        # Delete any attributes set to \"None\"\n        if replace:\n            del_attrs = []\n            for name in self:\n                if self[name] == None:\n                    del_attrs.append(name)\n            if len(del_attrs) > 0:\n                self.domain.delete_attributes(self.name, del_attrs)\n\n    def add_value(self, key, value):\n        \"\"\"\n        Helps set or add to attributes on this item. If you are adding a new\n        attribute that has yet to be set, it will simply create an attribute\n        named ``key`` with your given ``value`` as its value. If you are\n        adding a value to an existing attribute, this method will convert the\n        attribute to a list (if it isn't already) and append your new value \n        to said list.\n        \n        For clarification, consider the following interactive session:\n        \n        .. code-block:: python\n\n            >>> item = some_domain.get_item('some_item')\n            >>> item.has_key('some_attr')\n            False\n            >>> item.add_value('some_attr', 1)\n            >>> item['some_attr']\n            1\n            >>> item.add_value('some_attr', 2)\n            >>> item['some_attr']\n            [1, 2]\n        \n        :param str key: The attribute to add a value to.\n        :param object value: The value to set or append to the attribute. \n        \"\"\"\n        if key in self:\n            # We already have this key on the item.\n            if not isinstance(self[key], list):\n                # The key isn't already a list, take its current value and\n                # convert it to a list with the only member being the\n                # current value.\n                self[key] = [self[key]]\n            # Add the new value to the list.\n            self[key].append(value)\n        else:\n            # This is a new attribute, just set it.\n            self[key] = value\n\n    def delete(self):\n        \"\"\"\n        Deletes this item in SDB.\n        \n        .. note:: This local Python object remains in its current state\n            after deletion, this only deletes the remote item in SDB.\n        \"\"\"\n        self.domain.delete_item(self)\n\n        \n        \n\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/sdb/queryresultset.py",
    "content": "# Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\ndef query_lister(domain, query='', max_items=None, attr_names=None):\n    more_results = True\n    num_results = 0\n    next_token = None\n    while more_results:\n        rs = domain.connection.query_with_attributes(domain, query, attr_names,\n                                                     next_token=next_token)\n        for item in rs:\n            if max_items:\n                if num_results == max_items:\n                    raise StopIteration\n            yield item\n            num_results += 1\n        next_token = rs.next_token\n        more_results = next_token != None\n        \nclass QueryResultSet:\n\n    def __init__(self, domain=None, query='', max_items=None, attr_names=None):\n        self.max_items = max_items\n        self.domain = domain\n        self.query = query\n        self.attr_names = attr_names\n\n    def __iter__(self):\n        return query_lister(self.domain, self.query, self.max_items, self.attr_names)\n\ndef select_lister(domain, query='', max_items=None):\n    more_results = True\n    num_results = 0\n    next_token = None\n    while more_results:\n        rs = domain.connection.select(domain, query, next_token=next_token)\n        for item in rs:\n            if max_items:\n                if num_results == max_items:\n                    raise StopIteration\n            yield item\n            num_results += 1\n        next_token = rs.next_token\n        more_results = next_token != None\n        \nclass SelectResultSet(object):\n\n    def __init__(self, domain=None, query='', max_items=None,\n                 next_token=None, consistent_read=False):\n        self.domain = domain\n        self.query = query\n        self.consistent_read = consistent_read\n        self.max_items = max_items\n        self.next_token = next_token\n\n    def __iter__(self):\n        more_results = True\n        num_results = 0\n        while more_results:\n            rs = self.domain.connection.select(self.domain, self.query,\n                                               next_token=self.next_token,\n                                               consistent_read=self.consistent_read)\n            for item in rs:\n                if self.max_items and num_results >= self.max_items:\n                    raise StopIteration\n                yield item\n                num_results += 1\n            self.next_token = rs.next_token\n            if self.max_items and num_results >= self.max_items:\n                raise StopIteration\n            more_results = self.next_token != None\n\n    def next(self):\n        return self.__iter__().next()\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/sdb/regioninfo.py",
    "content": "# Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/\n# Copyright (c) 2010, Eucalyptus Systems, Inc.\n# All rights reserved.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n#\n\nfrom boto.regioninfo import RegionInfo\n\nclass SDBRegionInfo(RegionInfo):\n\n    def __init__(self, connection=None, name=None, endpoint=None):\n        from boto.sdb.connection import SDBConnection\n        RegionInfo.__init__(self, connection, name, endpoint,\n                            SDBConnection)\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/services/__init__.py",
    "content": "# Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n#\n\n\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/services/bs.py",
    "content": "#!/usr/bin/env python\n# Copyright (c) 2006-2008 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\nfrom optparse import OptionParser\nfrom boto.services.servicedef import ServiceDef\nfrom boto.services.submit import Submitter\nfrom boto.services.result import ResultProcessor\nimport boto\nimport sys, os, StringIO\n\nclass BS(object):\n\n    Usage = \"usage: %prog [options] config_file command\"\n\n    Commands = {'reset' : 'Clear input queue and output bucket',\n                'submit' : 'Submit local files to the service',\n                'start' : 'Start the service',\n                'status' : 'Report on the status of the service buckets and queues',\n                'retrieve' : 'Retrieve output generated by a batch',\n                'batches' : 'List all batches stored in current output_domain'}\n    \n    def __init__(self):\n        self.service_name = None\n        self.parser = OptionParser(usage=self.Usage)\n        self.parser.add_option(\"--help-commands\", action=\"store_true\", dest=\"help_commands\",\n                               help=\"provides help on the available commands\")\n        self.parser.add_option(\"-a\", \"--access-key\", action=\"store\", type=\"string\",\n                               help=\"your AWS Access Key\")\n        self.parser.add_option(\"-s\", \"--secret-key\", action=\"store\", type=\"string\",\n                               help=\"your AWS Secret Access Key\")\n        self.parser.add_option(\"-p\", \"--path\", action=\"store\", type=\"string\", dest=\"path\",\n                               help=\"the path to local directory for submit and retrieve\")\n        self.parser.add_option(\"-k\", \"--keypair\", action=\"store\", type=\"string\", dest=\"keypair\",\n                               help=\"the SSH keypair used with launched instance(s)\")\n        self.parser.add_option(\"-l\", \"--leave\", action=\"store_true\", dest=\"leave\",\n                               help=\"leave the files (don't retrieve) files during retrieve command\")\n        self.parser.set_defaults(leave=False)\n        self.parser.add_option(\"-n\", \"--num-instances\", action=\"store\", type=\"string\", dest=\"num_instances\",\n                               help=\"the number of launched instance(s)\")\n        self.parser.set_defaults(num_instances=1)\n        self.parser.add_option(\"-i\", \"--ignore-dirs\", action=\"append\", type=\"string\", dest=\"ignore\",\n                               help=\"directories that should be ignored by submit command\")\n        self.parser.add_option(\"-b\", \"--batch-id\", action=\"store\", type=\"string\", dest=\"batch\",\n                               help=\"batch identifier required by the retrieve command\")\n\n    def print_command_help(self):\n        print '\\nCommands:'\n        for key in self.Commands.keys():\n            print '  %s\\t\\t%s' % (key, self.Commands[key])\n\n    def do_reset(self):\n        iq = self.sd.get_obj('input_queue')\n        if iq:\n            print 'clearing out input queue'\n            i = 0\n            m = iq.read()\n            while m:\n                i += 1\n                iq.delete_message(m)\n                m = iq.read()\n            print 'deleted %d messages' % i\n        ob = self.sd.get_obj('output_bucket')\n        ib = self.sd.get_obj('input_bucket')\n        if ob:\n            if ib and ob.name == ib.name:\n                return\n            print 'delete generated files in output bucket'\n            i = 0\n            for k in ob:\n                i += 1\n                k.delete()\n            print 'deleted %d keys' % i\n\n    def do_submit(self):\n        if not self.options.path:\n            self.parser.error('No path provided')\n        if not os.path.exists(self.options.path):\n            self.parser.error('Invalid path (%s)' % self.options.path)\n        s = Submitter(self.sd)\n        t = s.submit_path(self.options.path, None, self.options.ignore, None,\n                          None, True, self.options.path)\n        print 'A total of %d files were submitted' % t[1]\n        print 'Batch Identifier: %s' % t[0]\n\n    def do_start(self):\n        ami_id = self.sd.get('ami_id')\n        instance_type = self.sd.get('instance_type', 'm1.small')\n        security_group = self.sd.get('security_group', 'default')\n        if not ami_id:\n            self.parser.error('ami_id option is required when starting the service')\n        ec2 = boto.connect_ec2()\n        if not self.sd.has_section('Credentials'):\n            self.sd.add_section('Credentials')\n            self.sd.set('Credentials', 'aws_access_key_id', ec2.aws_access_key_id)\n            self.sd.set('Credentials', 'aws_secret_access_key', ec2.aws_secret_access_key)\n        s = StringIO.StringIO()\n        self.sd.write(s)\n        rs = ec2.get_all_images([ami_id])\n        img = rs[0]\n        r = img.run(user_data=s.getvalue(), key_name=self.options.keypair,\n                    max_count=self.options.num_instances,\n                    instance_type=instance_type,\n                    security_groups=[security_group])\n        print 'Starting AMI: %s' % ami_id\n        print 'Reservation %s contains the following instances:' % r.id\n        for i in r.instances:\n            print '\\t%s' % i.id\n\n    def do_status(self):\n        iq = self.sd.get_obj('input_queue')\n        if iq:\n            print 'The input_queue (%s) contains approximately %s messages' % (iq.id, iq.count())\n        ob = self.sd.get_obj('output_bucket')\n        ib = self.sd.get_obj('input_bucket')\n        if ob:\n            if ib and ob.name == ib.name:\n                return\n            total = 0\n            for k in ob:\n                total += 1\n            print 'The output_bucket (%s) contains %d keys' % (ob.name, total)\n\n    def do_retrieve(self):\n        if not self.options.path:\n            self.parser.error('No path provided')\n        if not os.path.exists(self.options.path):\n            self.parser.error('Invalid path (%s)' % self.options.path)\n        if not self.options.batch:\n            self.parser.error('batch identifier is required for retrieve command')\n        s = ResultProcessor(self.options.batch, self.sd)\n        s.get_results(self.options.path, get_file=(not self.options.leave))\n\n    def do_batches(self):\n        d = self.sd.get_obj('output_domain')\n        if d:\n            print 'Available Batches:'\n            rs = d.query(\"['type'='Batch']\")\n            for item in rs:\n                print '  %s' % item.name\n        else:\n            self.parser.error('No output_domain specified for service')\n            \n    def main(self):\n        self.options, self.args = self.parser.parse_args()\n        if self.options.help_commands:\n            self.print_command_help()\n            sys.exit(0)\n        if len(self.args) != 2:\n            self.parser.error(\"config_file and command are required\")\n        self.config_file = self.args[0]\n        self.sd = ServiceDef(self.config_file)\n        self.command = self.args[1]\n        if hasattr(self, 'do_%s' % self.command):\n            method = getattr(self, 'do_%s' % self.command)\n            method()\n        else:\n            self.parser.error('command (%s) not recognized' % self.command)\n\nif __name__ == \"__main__\":\n    bs = BS()\n    bs.main()\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/services/message.py",
    "content": "# Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nfrom boto.sqs.message import MHMessage\nfrom boto.utils import get_ts\nfrom socket import gethostname\nimport os, mimetypes, time\n\nclass ServiceMessage(MHMessage):\n\n    def for_key(self, key, params=None, bucket_name=None):\n        if params:\n            self.update(params)\n        if key.path:\n            t = os.path.split(key.path)\n            self['OriginalLocation'] = t[0]\n            self['OriginalFileName'] = t[1]\n            mime_type = mimetypes.guess_type(t[1])[0]\n            if mime_type == None:\n                mime_type = 'application/octet-stream'\n            self['Content-Type'] = mime_type\n            s = os.stat(key.path)\n            t = time.gmtime(s[7])\n            self['FileAccessedDate'] = get_ts(t)\n            t = time.gmtime(s[8])\n            self['FileModifiedDate'] = get_ts(t)\n            t = time.gmtime(s[9])\n            self['FileCreateDate'] = get_ts(t)\n        else:\n            self['OriginalFileName'] = key.name\n            self['OriginalLocation'] = key.bucket.name\n            self['ContentType'] = key.content_type\n        self['Host'] = gethostname()\n        if bucket_name:\n            self['Bucket'] = bucket_name\n        else:\n            self['Bucket'] = key.bucket.name\n        self['InputKey'] = key.name\n        self['Size'] = key.size\n\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/services/result.py",
    "content": "#!/usr/bin/env python\n# Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nimport os\nfrom datetime import datetime, timedelta\nfrom boto.utils import parse_ts\nimport boto\n\nclass ResultProcessor:\n    \n    LogFileName = 'log.csv'\n\n    def __init__(self, batch_name, sd, mimetype_files=None):\n        self.sd = sd\n        self.batch = batch_name\n        self.log_fp = None\n        self.num_files = 0\n        self.total_time = 0\n        self.min_time = timedelta.max\n        self.max_time = timedelta.min\n        self.earliest_time = datetime.max\n        self.latest_time = datetime.min\n        self.queue = self.sd.get_obj('output_queue')\n        self.domain = self.sd.get_obj('output_domain')\n\n    def calculate_stats(self, msg):\n        start_time = parse_ts(msg['Service-Read'])\n        end_time = parse_ts(msg['Service-Write'])\n        elapsed_time = end_time - start_time\n        if elapsed_time > self.max_time:\n            self.max_time = elapsed_time\n        if elapsed_time < self.min_time:\n            self.min_time = elapsed_time\n        self.total_time += elapsed_time.seconds\n        if start_time < self.earliest_time:\n            self.earliest_time = start_time\n        if end_time > self.latest_time:\n            self.latest_time = end_time\n\n    def log_message(self, msg, path):\n        keys = msg.keys()\n        keys.sort()\n        if not self.log_fp:\n            self.log_fp = open(os.path.join(path, self.LogFileName), 'a')\n            line = ','.join(keys)\n            self.log_fp.write(line+'\\n')\n        values = []\n        for key in keys:\n            value = msg[key]\n            if value.find(',') > 0:\n                value = '\"%s\"' % value\n            values.append(value)\n        line = ','.join(values)\n        self.log_fp.write(line+'\\n')\n\n    def process_record(self, record, path, get_file=True):\n        self.log_message(record, path)\n        self.calculate_stats(record)\n        outputs = record['OutputKey'].split(',')\n        if record.has_key('OutputBucket'):\n            bucket = boto.lookup('s3', record['OutputBucket'])\n        else:\n            bucket = boto.lookup('s3', record['Bucket'])\n        for output in outputs:\n            if get_file:\n                key_name = output.split(';')[0]\n                key = bucket.lookup(key_name)\n                file_name = os.path.join(path, key_name)\n                print 'retrieving file: %s to %s' % (key_name, file_name)\n                key.get_contents_to_filename(file_name)\n            self.num_files += 1\n\n    def get_results_from_queue(self, path, get_file=True, delete_msg=True):\n        m = self.queue.read()\n        while m:\n            if m.has_key('Batch') and m['Batch'] == self.batch:\n                self.process_record(m, path, get_file)\n                if delete_msg:\n                    self.queue.delete_message(m)\n            m = self.queue.read()\n\n    def get_results_from_domain(self, path, get_file=True):\n        rs = self.domain.query(\"['Batch'='%s']\" % self.batch)\n        for item in rs:\n            self.process_record(item, path, get_file)\n\n    def get_results_from_bucket(self, path):\n        bucket = self.sd.get_obj('output_bucket')\n        if bucket:\n            print 'No output queue or domain, just retrieving files from output_bucket'\n            for key in bucket:\n                file_name = os.path.join(path, key)\n                print 'retrieving file: %s to %s' % (key, file_name)\n                key.get_contents_to_filename(file_name)\n                self.num_files + 1\n\n    def get_results(self, path, get_file=True, delete_msg=True):\n        if not os.path.isdir(path):\n            os.mkdir(path)\n        if self.queue:\n            self.get_results_from_queue(path, get_file)\n        elif self.domain:\n            self.get_results_from_domain(path, get_file)\n        else:\n            self.get_results_from_bucket(path)\n        if self.log_fp:\n            self.log_fp.close()\n        print '%d results successfully retrieved.' % self.num_files\n        if self.num_files > 0:\n            self.avg_time = float(self.total_time)/self.num_files\n            print 'Minimum Processing Time: %d' % self.min_time.seconds\n            print 'Maximum Processing Time: %d' % self.max_time.seconds\n            print 'Average Processing Time: %f' % self.avg_time\n            self.elapsed_time = self.latest_time-self.earliest_time\n            print 'Elapsed Time: %d' % self.elapsed_time.seconds\n            tput = 1.0 / ((self.elapsed_time.seconds/60.0) / self.num_files)\n            print 'Throughput: %f transactions / minute' % tput\n        \n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/services/service.py",
    "content": "# Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nimport boto\nfrom boto.services.message import ServiceMessage\nfrom boto.services.servicedef import ServiceDef\nfrom boto.pyami.scriptbase import ScriptBase\nfrom boto.utils import get_ts\nimport time\nimport os\nimport mimetypes\n\n\nclass Service(ScriptBase):\n\n    # Time required to process a transaction\n    ProcessingTime = 60\n\n    def __init__(self, config_file=None, mimetype_files=None):\n        ScriptBase.__init__(self, config_file)\n        self.name = self.__class__.__name__\n        self.working_dir = boto.config.get('Pyami', 'working_dir')\n        self.sd = ServiceDef(config_file)\n        self.retry_count = self.sd.getint('retry_count', 5)\n        self.loop_delay = self.sd.getint('loop_delay', 30)\n        self.processing_time = self.sd.getint('processing_time', 60)\n        self.input_queue = self.sd.get_obj('input_queue')\n        self.output_queue = self.sd.get_obj('output_queue')\n        self.output_domain = self.sd.get_obj('output_domain')\n        if mimetype_files:\n            mimetypes.init(mimetype_files)\n\n    def split_key(key):\n        if key.find(';') < 0:\n            t = (key, '')\n        else:\n            key, type = key.split(';')\n            label, mtype = type.split('=')\n            t = (key, mtype)\n        return t\n\n    def read_message(self):\n        boto.log.info('read_message')\n        message = self.input_queue.read(self.processing_time)\n        if message:\n            boto.log.info(message.get_body())\n            key = 'Service-Read'\n            message[key] = get_ts()\n        return message\n\n    # retrieve the source file from S3\n    def get_file(self, message):\n        bucket_name = message['Bucket']\n        key_name = message['InputKey']\n        file_name = os.path.join(self.working_dir, message.get('OriginalFileName', 'in_file'))\n        boto.log.info('get_file: %s/%s to %s' % (bucket_name, key_name, file_name))\n        bucket = boto.lookup('s3', bucket_name)\n        key = bucket.new_key(key_name)\n        key.get_contents_to_filename(os.path.join(self.working_dir, file_name))\n        return file_name\n\n    # process source file, return list of output files\n    def process_file(self, in_file_name, msg):\n        return []\n\n    # store result file in S3\n    def put_file(self, bucket_name, file_path, key_name=None):\n        boto.log.info('putting file %s as %s.%s' % (file_path, bucket_name, key_name))\n        bucket = boto.lookup('s3', bucket_name)\n        key = bucket.new_key(key_name)\n        key.set_contents_from_filename(file_path)\n        return key\n\n    def save_results(self, results, input_message, output_message):\n        output_keys = []\n        for file, type in results:\n            if input_message.has_key('OutputBucket'):\n                output_bucket = input_message['OutputBucket']\n            else:\n                output_bucket = input_message['Bucket']\n            key_name = os.path.split(file)[1]\n            key = self.put_file(output_bucket, file, key_name)\n            output_keys.append('%s;type=%s' % (key.name, type))\n        output_message['OutputKey'] = ','.join(output_keys)\n            \n    # write message to each output queue\n    def write_message(self, message):\n        message['Service-Write'] = get_ts()\n        message['Server'] = self.name\n        if os.environ.has_key('HOSTNAME'):\n            message['Host'] = os.environ['HOSTNAME']\n        else:\n            message['Host'] = 'unknown'\n        message['Instance-ID'] = self.instance_id\n        if self.output_queue:\n            boto.log.info('Writing message to SQS queue: %s' % self.output_queue.id)\n            self.output_queue.write(message)\n        if self.output_domain:\n            boto.log.info('Writing message to SDB domain: %s' % self.output_domain.name)\n            item_name = '/'.join([message['Service-Write'], message['Bucket'], message['InputKey']])\n            self.output_domain.put_attributes(item_name, message)\n\n    # delete message from input queue\n    def delete_message(self, message):\n        boto.log.info('deleting message from %s' % self.input_queue.id)\n        self.input_queue.delete_message(message)\n\n    # to clean up any files, etc. after each iteration\n    def cleanup(self):\n        pass\n\n    def shutdown(self):\n        on_completion = self.sd.get('on_completion', 'shutdown')\n        if on_completion == 'shutdown':\n            if self.instance_id:\n                time.sleep(60)\n                c = boto.connect_ec2()\n                c.terminate_instances([self.instance_id])\n\n    def main(self, notify=False):\n        self.notify('Service: %s Starting' % self.name)\n        empty_reads = 0\n        while self.retry_count < 0 or empty_reads < self.retry_count:\n            try:\n                input_message = self.read_message()\n                if input_message:\n                    empty_reads = 0\n                    output_message = ServiceMessage(None, input_message.get_body())\n                    input_file = self.get_file(input_message)\n                    results = self.process_file(input_file, output_message)\n                    self.save_results(results, input_message, output_message)\n                    self.write_message(output_message)\n                    self.delete_message(input_message)\n                    self.cleanup()\n                else:\n                    empty_reads += 1\n                    time.sleep(self.loop_delay)\n            except Exception:\n                boto.log.exception('Service Failed')\n                empty_reads += 1\n        self.notify('Service: %s Shutting Down' % self.name)\n        self.shutdown()\n\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/services/servicedef.py",
    "content": "# Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nfrom boto.pyami.config import Config\nfrom boto.services.message import ServiceMessage\nimport boto\n\nclass ServiceDef(Config):\n\n    def __init__(self, config_file, aws_access_key_id=None, aws_secret_access_key=None):\n        Config.__init__(self, config_file)\n        self.aws_access_key_id = aws_access_key_id\n        self.aws_secret_access_key = aws_secret_access_key\n        script = Config.get(self, 'Pyami', 'scripts')\n        if script:\n            self.name = script.split('.')[-1]\n        else:\n            self.name = None\n\n\n    def get(self, name, default=None):\n        return Config.get(self, self.name, name, default)\n\n    def has_option(self, option):\n        return Config.has_option(self, self.name, option)\n\n    def getint(self, option, default=0):\n        try:\n            val = Config.get(self, self.name, option)\n            val = int(val)\n        except:\n            val = int(default)\n        return val\n        \n    def getbool(self, option, default=False):\n        try:\n            val = Config.get(self, self.name, option)\n            if val.lower() == 'true':\n                val = True\n            else:\n                val = False\n        except:\n            val = default\n        return val\n        \n    def get_obj(self, name):\n        \"\"\"\n        Returns the AWS object associated with a given option.\n\n        The heuristics used are a bit lame.  If the option name contains\n        the word 'bucket' it is assumed to be an S3 bucket, if the name\n        contains the word 'queue' it is assumed to be an SQS queue and\n        if it contains the word 'domain' it is assumed to be a SimpleDB\n        domain.  If the option name specified does not exist in the\n        config file or if the AWS object cannot be retrieved this\n        returns None.\n        \"\"\"\n        val = self.get(name)\n        if not val:\n            return None\n        if name.find('queue') >= 0:\n            obj = boto.lookup('sqs', val)\n            if obj:\n                obj.set_message_class(ServiceMessage)\n        elif name.find('bucket') >= 0:\n            obj = boto.lookup('s3', val)\n        elif name.find('domain') >= 0:\n            obj = boto.lookup('sdb', val)\n        else:\n            obj = None\n        return obj\n\n    \n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/services/sonofmmm.py",
    "content": "# Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nimport boto\nfrom boto.services.service import Service\nfrom boto.services.message import ServiceMessage\nimport os\nimport mimetypes\n\nclass SonOfMMM(Service):\n\n    def __init__(self, config_file=None):\n        Service.__init__(self, config_file)\n        self.log_file = '%s.log' % self.instance_id\n        self.log_path = os.path.join(self.working_dir, self.log_file)\n        boto.set_file_logger(self.name, self.log_path)\n        if self.sd.has_option('ffmpeg_args'):\n            self.command = '/usr/local/bin/ffmpeg ' + self.sd.get('ffmpeg_args')\n        else:\n            self.command = '/usr/local/bin/ffmpeg -y -i %s %s'\n        self.output_mimetype = self.sd.get('output_mimetype')\n        if self.sd.has_option('output_ext'):\n            self.output_ext = self.sd.get('output_ext')\n        else:\n            self.output_ext = mimetypes.guess_extension(self.output_mimetype)\n        self.output_bucket = self.sd.get_obj('output_bucket')\n        self.input_bucket = self.sd.get_obj('input_bucket')\n        # check to see if there are any messages queue\n        # if not, create messages for all files in input_bucket\n        m = self.input_queue.read(1)\n        if not m:\n            self.queue_files()\n\n    def queue_files(self):\n        boto.log.info('Queueing files from %s' % self.input_bucket.name)\n        for key in self.input_bucket:\n            boto.log.info('Queueing %s' % key.name)\n            m = ServiceMessage()\n            if self.output_bucket:\n                d = {'OutputBucket' : self.output_bucket.name}\n            else:\n                d = None\n            m.for_key(key, d)\n            self.input_queue.write(m)\n\n    def process_file(self, in_file_name, msg):\n        base, ext = os.path.splitext(in_file_name)\n        out_file_name = os.path.join(self.working_dir,\n                                     base+self.output_ext)\n        command = self.command % (in_file_name, out_file_name)\n        boto.log.info('running:\\n%s' % command)\n        status = self.run(command)\n        if status == 0:\n            return [(out_file_name, self.output_mimetype)]\n        else:\n            return []\n\n    def shutdown(self):\n        if os.path.isfile(self.log_path):\n            if self.output_bucket:\n                key = self.output_bucket.new_key(self.log_file)\n                key.set_contents_from_filename(self.log_path)\n        Service.shutdown(self)\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/services/submit.py",
    "content": "# Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nimport time\nimport os\n\n\nclass Submitter:\n\n    def __init__(self, sd):\n        self.sd = sd\n        self.input_bucket = self.sd.get_obj('input_bucket')\n        self.output_bucket = self.sd.get_obj('output_bucket')\n        self.output_domain = self.sd.get_obj('output_domain')\n        self.queue = self.sd.get_obj('input_queue')\n\n    def get_key_name(self, fullpath, prefix):\n        key_name = fullpath[len(prefix):]\n        l = key_name.split(os.sep)\n        return '/'.join(l)\n\n    def write_message(self, key, metadata):\n        if self.queue:\n            m = self.queue.new_message()\n            m.for_key(key, metadata)\n            if self.output_bucket:\n                m['OutputBucket'] = self.output_bucket.name\n            self.queue.write(m)\n\n    def submit_file(self, path, metadata=None, cb=None, num_cb=0, prefix='/'):\n        if not metadata:\n            metadata = {}\n        key_name = self.get_key_name(path, prefix)\n        k = self.input_bucket.new_key(key_name)\n        k.update_metadata(metadata)\n        k.set_contents_from_filename(path, replace=False, cb=cb, num_cb=num_cb)\n        self.write_message(k, metadata)\n\n    def submit_path(self, path, tags=None, ignore_dirs=None, cb=None, num_cb=0, status=False, prefix='/'):\n        path = os.path.expanduser(path)\n        path = os.path.expandvars(path)\n        path = os.path.abspath(path)\n        total = 0\n        metadata = {}\n        if tags:\n            metadata['Tags'] = tags\n        l = []\n        for t in time.gmtime():\n            l.append(str(t))\n        metadata['Batch'] = '_'.join(l)\n        if self.output_domain:\n            self.output_domain.put_attributes(metadata['Batch'], {'type' : 'Batch'})\n        if os.path.isdir(path):\n            for root, dirs, files in os.walk(path):\n                if ignore_dirs:\n                    for ignore in ignore_dirs:\n                        if ignore in dirs:\n                            dirs.remove(ignore)\n                for file in files:\n                    fullpath = os.path.join(root, file)\n                    if status:\n                        print 'Submitting %s' % fullpath\n                    self.submit_file(fullpath, metadata, cb, num_cb, prefix)\n                    total += 1\n        elif os.path.isfile(path):\n            self.submit_file(path, metadata, cb, num_cb)\n            total += 1\n        else:\n            print 'problem with %s' % path\n        return (metadata['Batch'], total)\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/ses/__init__.py",
    "content": "# Copyright (c) 2010 Mitch Garnaat http://garnaat.org/\n# Copyright (c) 2011 Harry Marr http://hmarr.com/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nfrom connection import SESConnection\nfrom boto.regioninfo import RegionInfo\n\ndef regions():\n    \"\"\"\n    Get all available regions for the SES service.\n\n    :rtype: list\n    :return: A list of :class:`boto.regioninfo.RegionInfo` instances\n    \"\"\"\n    return [RegionInfo(name='us-east-1',\n                       endpoint='email.us-east-1.amazonaws.com',\n                       connection_cls=SESConnection)]\n\ndef connect_to_region(region_name, **kw_params):\n    \"\"\"\n    Given a valid region name, return a \n    :class:`boto.sns.connection.SESConnection`.\n\n    :type: str\n    :param region_name: The name of the region to connect to.\n    \n    :rtype: :class:`boto.sns.connection.SESConnection` or ``None``\n    :return: A connection to the given region, or None if an invalid region\n             name is given\n    \"\"\"\n    for region in regions():\n        if region.name == region_name:\n            return region.connect(**kw_params)\n    return None\n\ndef get_region(region_name, **kw_params):\n    \"\"\"\n    Find and return a :class:`boto.regioninfo.RegionInfo` object\n    given a region name.\n\n    :type: str\n    :param: The name of the region.\n\n    :rtype: :class:`boto.regioninfo.RegionInfo`\n    :return: The RegionInfo object for the given region or None if\n             an invalid region name is provided.\n    \"\"\"\n    for region in regions(**kw_params):\n        if region.name == region_name:\n            return region\n    return None\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/ses/connection.py",
    "content": "# Copyright (c) 2010 Mitch Garnaat http://garnaat.org/\n# Copyright (c) 2011 Harry Marr http://hmarr.com/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nfrom boto.connection import AWSAuthConnection\nfrom boto.exception import BotoServerError\nfrom boto.regioninfo import RegionInfo\nimport boto\nimport boto.jsonresponse\n\nimport urllib\nimport base64\n\n\nclass SESConnection(AWSAuthConnection):\n\n    ResponseError = BotoServerError\n    DefaultRegionName = 'us-east-1'\n    DefaultRegionEndpoint = 'email.us-east-1.amazonaws.com'\n    APIVersion = '2010-12-01'\n\n    def __init__(self, aws_access_key_id=None, aws_secret_access_key=None,\n                 is_secure=True, port=None, proxy=None, proxy_port=None,\n                 proxy_user=None, proxy_pass=None, debug=0,\n                 https_connection_factory=None, region=None, path='/'):\n        if not region:\n            region = RegionInfo(self, self.DefaultRegionName,\n                                self.DefaultRegionEndpoint)\n        self.region = region\n        AWSAuthConnection.__init__(self, self.region.endpoint,\n                                   aws_access_key_id, aws_secret_access_key,\n                                   is_secure, port, proxy, proxy_port,\n                                   proxy_user, proxy_pass, debug,\n                                   https_connection_factory, path)\n\n    def _required_auth_capability(self):\n        return ['ses']\n\n    def _build_list_params(self, params, items, label):\n        \"\"\"Add an AWS API-compatible parameter list to a dictionary.\n\n        :type params: dict\n        :param params: The parameter dictionary\n\n        :type items: list\n        :param items: Items to be included in the list\n\n        :type label: string\n        :param label: The parameter list's name\n        \"\"\"\n        if isinstance(items, basestring):\n            items = [items]\n        for i in range(1, len(items) + 1):\n            params['%s.%d' % (label, i)] = items[i - 1]\n\n\n    def _make_request(self, action, params=None):\n        \"\"\"Make a call to the SES API.\n\n        :type action: string\n        :param action: The API method to use (e.g. SendRawEmail)\n\n        :type params: dict\n        :param params: Parameters that will be sent as POST data with the API\n                       call.\n        \"\"\"\n        ct = 'application/x-www-form-urlencoded; charset=UTF-8'\n        headers = {'Content-Type': ct}\n        params = params or {}\n        params['Action'] = action\n\n        for k, v in params.items():\n            if isinstance(v, unicode):  # UTF-8 encode only if it's Unicode\n                params[k] = v.encode('utf-8')\n\n        response = super(SESConnection, self).make_request(\n            'POST',\n            '/',\n            headers=headers,\n            data=urllib.urlencode(params)\n        )\n        body = response.read()\n        if response.status == 200:\n            list_markers = ('VerifiedEmailAddresses', 'SendDataPoints')\n            e = boto.jsonresponse.Element(list_marker=list_markers)\n            h = boto.jsonresponse.XmlHandler(e, None)\n            h.parse(body)\n            return e\n        else:\n            boto.log.error('%s %s' % (response.status, response.reason))\n            boto.log.error('%s' % body)\n            raise self.ResponseError(response.status, response.reason, body)\n\n\n    def send_email(self, source, subject, body, to_addresses, cc_addresses=None,\n                   bcc_addresses=None, format='text', reply_addresses=None,\n                   return_path=None, text_body=None, html_body=None):\n        \"\"\"Composes an email message based on input data, and then immediately\n        queues the message for sending.\n\n        :type source: string\n        :param source: The sender's email address.\n\n        :type subject: string\n        :param subject: The subject of the message: A short summary of the\n                        content, which will appear in the recipient's inbox.\n\n        :type body: string\n        :param body: The message body.\n\n        :type to_addresses: list of strings or string\n        :param to_addresses: The To: field(s) of the message.\n\n        :type cc_addresses: list of strings or string\n        :param cc_addresses: The CC: field(s) of the message.\n\n        :type bcc_addresses: list of strings or string\n        :param bcc_addresses: The BCC: field(s) of the message.\n\n        :type format: string\n        :param format: The format of the message's body, must be either \"text\"\n                       or \"html\".\n\n        :type reply_addresses: list of strings or string\n        :param reply_addresses: The reply-to email address(es) for the\n                                message. If the recipient replies to the\n                                message, each reply-to address will\n                                receive the reply.\n\n        :type return_path: string\n        :param return_path: The email address to which bounce notifications are\n                            to be forwarded. If the message cannot be delivered\n                            to the recipient, then an error message will be\n                            returned from the recipient's ISP; this message will\n                            then be forwarded to the email address specified by\n                            the ReturnPath parameter.\n\n        :type text_body: string\n        :param text_body: The text body to send with this email.\n\n        :type html_body: string\n        :param html_body: The html body to send with this email.\n\n        \"\"\"\n        format = format.lower().strip()\n        if body is not None:\n            if format == \"text\":\n                if text_body is not None:\n                    raise Warning(\"You've passed in both a body and a text_body; please choose one or the other.\")\n                text_body = body\n            else:\n                if html_body is not None:\n                    raise Warning(\"You've passed in both a body and an html_body; please choose one or the other.\")\n                html_body = body\n\n        params = {\n            'Source': source,\n            'Message.Subject.Data': subject,\n        }\n\n        if return_path:\n            params['ReturnPath'] = return_path\n\n        if html_body is not None:\n            params['Message.Body.Html.Data'] = html_body\n        if text_body is not None:\n            params['Message.Body.Text.Data'] = text_body\n\n        if(format not in (\"text\",\"html\")):\n            raise ValueError(\"'format' argument must be 'text' or 'html'\")\n\n        if(not (html_body or text_body)):\n            raise ValueError(\"No text or html body found for mail\")\n\n        self._build_list_params(params, to_addresses,\n                               'Destination.ToAddresses.member')\n        if cc_addresses:\n            self._build_list_params(params, cc_addresses,\n                                   'Destination.CcAddresses.member')\n\n        if bcc_addresses:\n            self._build_list_params(params, bcc_addresses,\n                                   'Destination.BccAddresses.member')\n\n        if reply_addresses:\n            self._build_list_params(params, reply_addresses,\n                                   'ReplyToAddresses.member')\n\n        return self._make_request('SendEmail', params)\n\n    def send_raw_email(self, raw_message, source=None, destinations=None):\n        \"\"\"Sends an email message, with header and content specified by the\n        client. The SendRawEmail action is useful for sending multipart MIME\n        emails, with attachments or inline content. The raw text of the message\n        must comply with Internet email standards; otherwise, the message\n        cannot be sent.\n\n        :type source: string\n        :param source: The sender's email address. Amazon's docs say:\n\n          If you specify the Source parameter, then bounce notifications and\n          complaints will be sent to this email address. This takes precedence\n          over any Return-Path header that you might include in the raw text of\n          the message.\n\n        :type raw_message: string\n        :param raw_message: The raw text of the message. The client is\n          responsible for ensuring the following:\n\n          - Message must contain a header and a body, separated by a blank line.\n          - All required header fields must be present.\n          - Each part of a multipart MIME message must be formatted properly.\n          - MIME content types must be among those supported by Amazon SES.\n            Refer to the Amazon SES Developer Guide for more details.\n          - Content must be base64-encoded, if MIME requires it.\n\n        :type destinations: list of strings or string\n        :param destinations: A list of destinations for the message.\n\n        \"\"\"\n        params = {\n            'RawMessage.Data': base64.b64encode(raw_message),\n        }\n        \n        if source:\n            params['Source'] = source\n\n        if destinations:\n            self._build_list_params(params, destinations,\n                                   'Destinations.member')\n\n        return self._make_request('SendRawEmail', params)\n\n    def list_verified_email_addresses(self):\n        \"\"\"Fetch a list of the email addresses that have been verified.\n\n        :rtype: dict\n        :returns: A ListVerifiedEmailAddressesResponse structure. Note that\n                  keys must be unicode strings.\n        \"\"\"\n        return self._make_request('ListVerifiedEmailAddresses')\n\n    def get_send_quota(self):\n        \"\"\"Fetches the user's current activity limits.\n\n        :rtype: dict\n        :returns: A GetSendQuotaResponse structure. Note that keys must be\n                  unicode strings.\n        \"\"\"\n        return self._make_request('GetSendQuota')\n\n    def get_send_statistics(self):\n        \"\"\"Fetches the user's sending statistics. The result is a list of data\n        points, representing the last two weeks of sending activity.\n\n        Each data point in the list contains statistics for a 15-minute\n        interval.\n\n        :rtype: dict\n        :returns: A GetSendStatisticsResponse structure. Note that keys must be\n                  unicode strings.\n        \"\"\"\n        return self._make_request('GetSendStatistics')\n\n    def delete_verified_email_address(self, email_address):\n        \"\"\"Deletes the specified email address from the list of verified\n        addresses.\n\n        :type email_adddress: string\n        :param email_address: The email address to be removed from the list of\n                              verified addreses.\n\n        :rtype: dict\n        :returns: A DeleteVerifiedEmailAddressResponse structure. Note that\n                  keys must be unicode strings.\n        \"\"\"\n        return self._make_request('DeleteVerifiedEmailAddress', {\n            'EmailAddress': email_address,\n        })\n\n    def verify_email_address(self, email_address):\n        \"\"\"Verifies an email address. This action causes a confirmation email\n        message to be sent to the specified address.\n\n        :type email_adddress: string\n        :param email_address: The email address to be verified.\n\n        :rtype: dict\n        :returns: A VerifyEmailAddressResponse structure. Note that keys must\n                  be unicode strings.\n        \"\"\"\n        return self._make_request('VerifyEmailAddress', {\n            'EmailAddress': email_address,\n        })\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/sns/__init__.py",
    "content": "# Copyright (c) 2010-2011 Mitch Garnaat http://garnaat.org/\n# Copyright (c) 2010-2011, Eucalyptus Systems, Inc.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\n# this is here for backward compatibility\n# originally, the SNSConnection class was defined here\nfrom connection import SNSConnection\nfrom boto.regioninfo import RegionInfo\n\ndef regions():\n    \"\"\"\n    Get all available regions for the SNS service.\n\n    :rtype: list\n    :return: A list of :class:`boto.regioninfo.RegionInfo` instances\n    \"\"\"\n    return [RegionInfo(name='us-east-1',\n                       endpoint='sns.us-east-1.amazonaws.com',\n                       connection_cls=SNSConnection),\n            RegionInfo(name='eu-west-1',\n                       endpoint='sns.eu-west-1.amazonaws.com',\n                       connection_cls=SNSConnection),\n            RegionInfo(name='us-west-1',\n                       endpoint='sns.us-west-1.amazonaws.com',\n                       connection_cls=SNSConnection),\n            RegionInfo(name='ap-northeast-1',\n                       endpoint='sns.ap-northeast-1.amazonaws.com',\n                       connection_cls=SNSConnection),\n            RegionInfo(name='ap-southeast-1',\n                       endpoint='sns.ap-southeast-1.amazonaws.com',\n                       connection_cls=SNSConnection),\n            ]\n\ndef connect_to_region(region_name, **kw_params):\n    \"\"\"\n    Given a valid region name, return a \n    :class:`boto.sns.connection.SNSConnection`.\n\n    :type: str\n    :param region_name: The name of the region to connect to.\n    \n    :rtype: :class:`boto.sns.connection.SNSConnection` or ``None``\n    :return: A connection to the given region, or None if an invalid region\n             name is given\n    \"\"\"\n    for region in regions():\n        if region.name == region_name:\n            return region.connect(**kw_params)\n    return None\n\ndef get_region(region_name, **kw_params):\n    \"\"\"\n    Find and return a :class:`boto.regioninfo.RegionInfo` object\n    given a region name.\n\n    :type: str\n    :param: The name of the region.\n\n    :rtype: :class:`boto.regioninfo.RegionInfo`\n    :return: The RegionInfo object for the given region or None if\n             an invalid region name is provided.\n    \"\"\"\n    for region in regions(**kw_params):\n        if region.name == region_name:\n            return region\n    return None\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/sns/connection.py",
    "content": "# Copyright (c) 2010 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nfrom boto.connection import AWSQueryConnection\nfrom boto.regioninfo import RegionInfo\nimport boto\nimport uuid\ntry:\n    import simplejson as json\nexcept ImportError:\n    import json\n\nclass SNSConnection(AWSQueryConnection):\n\n    DefaultRegionName = 'us-east-1'\n    DefaultRegionEndpoint = 'sns.us-east-1.amazonaws.com'\n    APIVersion = '2010-03-31'\n\n    def __init__(self, aws_access_key_id=None, aws_secret_access_key=None,\n                 is_secure=True, port=None, proxy=None, proxy_port=None,\n                 proxy_user=None, proxy_pass=None, debug=0,\n                 https_connection_factory=None, region=None, path='/',\n                 security_token=None):\n        if not region:\n            region = RegionInfo(self, self.DefaultRegionName,\n                                self.DefaultRegionEndpoint,\n                                connection_cls=SNSConnection)\n        self.region = region\n        AWSQueryConnection.__init__(self, aws_access_key_id,\n                                    aws_secret_access_key,\n                                    is_secure, port, proxy, proxy_port,\n                                    proxy_user, proxy_pass,\n                                    self.region.endpoint, debug,\n                                    https_connection_factory, path,\n                                    security_token=security_token)\n\n    def _required_auth_capability(self):\n        return ['sns']\n\n    def get_all_topics(self, next_token=None):\n        \"\"\"\n        :type next_token: string\n        :param next_token: Token returned by the previous call to\n                           this method.\n\n        \"\"\"\n        params = {'ContentType' : 'JSON'}\n        if next_token:\n            params['NextToken'] = next_token\n        response = self.make_request('ListTopics', params, '/', 'GET')\n        body = response.read()\n        if response.status == 200:\n            return json.loads(body)\n        else:\n            boto.log.error('%s %s' % (response.status, response.reason))\n            boto.log.error('%s' % body)\n            raise self.ResponseError(response.status, response.reason, body)\n        \n    def get_topic_attributes(self, topic):\n        \"\"\"\n        Get attributes of a Topic\n\n        :type topic: string\n        :param topic: The ARN of the topic.\n\n        \"\"\"\n        params = {'ContentType' : 'JSON',\n                  'TopicArn' : topic}\n        response = self.make_request('GetTopicAttributes', params, '/', 'GET')\n        body = response.read()\n        if response.status == 200:\n            return json.loads(body)\n        else:\n            boto.log.error('%s %s' % (response.status, response.reason))\n            boto.log.error('%s' % body)\n            raise self.ResponseError(response.status, response.reason, body)\n        \n    def set_topic_attributes(self, topic, attr_name, attr_value):\n        \"\"\"\n        Get attributes of a Topic\n\n        :type topic: string\n        :param topic: The ARN of the topic.\n\n        :type attr_name: string\n        :param attr_name: The name of the attribute you want to set.\n                          Only a subset of the topic's attributes are mutable.\n                          Valid values: Policy | DisplayName\n\n        :type attr_value: string\n        :param attr_value: The new value for the attribute.\n\n        \"\"\"\n        params = {'ContentType' : 'JSON',\n                  'TopicArn' : topic,\n                  'AttributeName' : attr_name,\n                  'AttributeValue' : attr_value}\n        response = self.make_request('SetTopicAttributes', params, '/', 'GET')\n        body = response.read()\n        if response.status == 200:\n            return json.loads(body)\n        else:\n            boto.log.error('%s %s' % (response.status, response.reason))\n            boto.log.error('%s' % body)\n            raise self.ResponseError(response.status, response.reason, body)\n        \n    def add_permission(self, topic, label, account_ids, actions):\n        \"\"\"\n        Adds a statement to a topic's access control policy, granting\n        access for the specified AWS accounts to the specified actions.\n\n        :type topic: string\n        :param topic: The ARN of the topic.\n\n        :type label: string\n        :param label: A unique identifier for the new policy statement.\n\n        :type account_ids: list of strings\n        :param account_ids: The AWS account ids of the users who will be\n                            give access to the specified actions.\n\n        :type actions: list of strings\n        :param actions: The actions you want to allow for each of the\n                        specified principal(s).\n\n        \"\"\"\n        params = {'ContentType' : 'JSON',\n                  'TopicArn' : topic,\n                  'Label' : label}\n        self.build_list_params(params, account_ids, 'AWSAccountId')\n        self.build_list_params(params, actions, 'ActionName')\n        response = self.make_request('AddPermission', params, '/', 'GET')\n        body = response.read()\n        if response.status == 200:\n            return json.loads(body)\n        else:\n            boto.log.error('%s %s' % (response.status, response.reason))\n            boto.log.error('%s' % body)\n            raise self.ResponseError(response.status, response.reason, body)\n        \n    def remove_permission(self, topic, label):\n        \"\"\"\n        Removes a statement from a topic's access control policy.\n\n        :type topic: string\n        :param topic: The ARN of the topic.\n\n        :type label: string\n        :param label: A unique identifier for the policy statement\n                      to be removed.\n\n        \"\"\"\n        params = {'ContentType' : 'JSON',\n                  'TopicArn' : topic,\n                  'Label' : label}\n        response = self.make_request('RemovePermission', params, '/', 'GET')\n        body = response.read()\n        if response.status == 200:\n            return json.loads(body)\n        else:\n            boto.log.error('%s %s' % (response.status, response.reason))\n            boto.log.error('%s' % body)\n            raise self.ResponseError(response.status, response.reason, body)\n        \n    def create_topic(self, topic):\n        \"\"\"\n        Create a new Topic.\n\n        :type topic: string\n        :param topic: The name of the new topic.\n\n        \"\"\"\n        params = {'ContentType' : 'JSON',\n                  'Name' : topic}\n        response = self.make_request('CreateTopic', params, '/', 'GET')\n        body = response.read()\n        if response.status == 200:\n            return json.loads(body)\n        else:\n            boto.log.error('%s %s' % (response.status, response.reason))\n            boto.log.error('%s' % body)\n            raise self.ResponseError(response.status, response.reason, body)\n\n    def delete_topic(self, topic):\n        \"\"\"\n        Delete an existing topic\n\n        :type topic: string\n        :param topic: The ARN of the topic\n\n        \"\"\"\n        params = {'ContentType' : 'JSON',\n                  'TopicArn' : topic}\n        response = self.make_request('DeleteTopic', params, '/', 'GET')\n        body = response.read()\n        if response.status == 200:\n            return json.loads(body)\n        else:\n            boto.log.error('%s %s' % (response.status, response.reason))\n            boto.log.error('%s' % body)\n            raise self.ResponseError(response.status, response.reason, body)\n\n\n\n    def publish(self, topic, message, subject=None):\n        \"\"\"\n        Get properties of a Topic\n\n        :type topic: string\n        :param topic: The ARN of the new topic.\n\n        :type message: string\n        :param message: The message you want to send to the topic.\n                        Messages must be UTF-8 encoded strings and\n                        be at most 4KB in size.\n\n        :type subject: string\n        :param subject: Optional parameter to be used as the \"Subject\"\n                        line of the email notifications.\n\n        \"\"\"\n        params = {'ContentType' : 'JSON',\n                  'TopicArn' : topic,\n                  'Message' : message}\n        if subject:\n            params['Subject'] = subject\n        response = self.make_request('Publish', params, '/', 'GET')\n        body = response.read()\n        if response.status == 200:\n            return json.loads(body)\n        else:\n            boto.log.error('%s %s' % (response.status, response.reason))\n            boto.log.error('%s' % body)\n            raise self.ResponseError(response.status, response.reason, body)\n        \n    def subscribe(self, topic, protocol, endpoint):\n        \"\"\"\n        Subscribe to a Topic.\n\n        :type topic: string\n        :param topic: The name of the new topic.\n\n        :type protocol: string\n        :param protocol: The protocol used to communicate with\n                         the subscriber.  Current choices are:\n                         email|email-json|http|https|sqs\n\n        :type endpoint: string\n        :param endpoint: The location of the endpoint for\n                         the subscriber.\n                         * For email, this would be a valid email address\n                         * For email-json, this would be a valid email address\n                         * For http, this would be a URL beginning with http\n                         * For https, this would be a URL beginning with https\n                         * For sqs, this would be the ARN of an SQS Queue\n\n        \"\"\"\n        params = {'ContentType' : 'JSON',\n                  'TopicArn' : topic,\n                  'Protocol' : protocol,\n                  'Endpoint' : endpoint}\n        response = self.make_request('Subscribe', params, '/', 'GET')\n        body = response.read()\n        if response.status == 200:\n            return json.loads(body)\n        else:\n            boto.log.error('%s %s' % (response.status, response.reason))\n            boto.log.error('%s' % body)\n            raise self.ResponseError(response.status, response.reason, body)\n\n    def subscribe_sqs_queue(self, topic, queue):\n        \"\"\"\n        Subscribe an SQS queue to a topic.\n\n        This is convenience method that handles most of the complexity involved\n        in using ans SQS queue as an endpoint for an SNS topic.  To achieve this\n        the following operations are performed:\n        \n        * The correct ARN is constructed for the SQS queue and that ARN is\n          then subscribed to the topic.\n        * A JSON policy document is contructed that grants permission to\n          the SNS topic to send messages to the SQS queue.\n        * This JSON policy is then associated with the SQS queue using\n          the queue's set_attribute method.  If the queue already has\n          a policy associated with it, this process will add a Statement to\n          that policy.  If no policy exists, a new policy will be created.\n          \n        :type topic: string\n        :param topic: The name of the new topic.\n\n        :type queue: A boto Queue object\n        :param queue: The queue you wish to subscribe to the SNS Topic.\n        \"\"\"\n        t = queue.id.split('/')\n        q_arn = 'arn:aws:sqs:%s:%s:%s' % (queue.connection.region.name,\n                                          t[1], t[2])\n        resp = self.subscribe(topic, 'sqs', q_arn)\n        policy = queue.get_attributes('Policy')\n        if 'Version' not in policy:\n            policy['Version'] = '2008-10-17'\n        if 'Statement' not in policy:\n            policy['Statement'] = []\n        statement = {'Action' : 'SQS:SendMessage',\n                     'Effect' : 'Allow',\n                     'Principal' : {'AWS' : '*'},\n                     'Resource' : q_arn,\n                     'Sid' : str(uuid.uuid4()),\n                     'Condition' : {'StringLike' : {'aws:SourceArn' : topic}}}\n        policy['Statement'].append(statement)\n        queue.set_attribute('Policy', json.dumps(policy))\n        return resp\n\n    def confirm_subscription(self, topic, token,\n                             authenticate_on_unsubscribe=False):\n        \"\"\"\n        Get properties of a Topic\n\n        :type topic: string\n        :param topic: The ARN of the new topic.\n\n        :type token: string\n        :param token: Short-lived token sent to and endpoint during\n                      the Subscribe operation.\n\n        :type authenticate_on_unsubscribe: bool\n        :param authenticate_on_unsubscribe: Optional parameter indicating\n                                            that you wish to disable\n                                            unauthenticated unsubscription\n                                            of the subscription.\n\n        \"\"\"\n        params = {'ContentType' : 'JSON',\n                  'TopicArn' : topic,\n                  'Token' : token}\n        if authenticate_on_unsubscribe:\n            params['AuthenticateOnUnsubscribe'] = 'true'\n        response = self.make_request('ConfirmSubscription', params, '/', 'GET')\n        body = response.read()\n        if response.status == 200:\n            return json.loads(body)\n        else:\n            boto.log.error('%s %s' % (response.status, response.reason))\n            boto.log.error('%s' % body)\n            raise self.ResponseError(response.status, response.reason, body)\n        \n    def unsubscribe(self, subscription):\n        \"\"\"\n        Allows endpoint owner to delete subscription.\n        Confirmation message will be delivered.\n\n        :type subscription: string\n        :param subscription: The ARN of the subscription to be deleted.\n\n        \"\"\"\n        params = {'ContentType' : 'JSON',\n                  'SubscriptionArn' : subscription}\n        response = self.make_request('Unsubscribe', params, '/', 'GET')\n        body = response.read()\n        if response.status == 200:\n            return json.loads(body)\n        else:\n            boto.log.error('%s %s' % (response.status, response.reason))\n            boto.log.error('%s' % body)\n            raise self.ResponseError(response.status, response.reason, body)\n        \n    def get_all_subscriptions(self, next_token=None):\n        \"\"\"\n        Get list of all subscriptions.\n\n        :type next_token: string\n        :param next_token: Token returned by the previous call to\n                           this method.\n\n        \"\"\"\n        params = {'ContentType' : 'JSON'}\n        if next_token:\n            params['NextToken'] = next_token\n        response = self.make_request('ListSubscriptions', params, '/', 'GET')\n        body = response.read()\n        if response.status == 200:\n            return json.loads(body)\n        else:\n            boto.log.error('%s %s' % (response.status, response.reason))\n            boto.log.error('%s' % body)\n            raise self.ResponseError(response.status, response.reason, body)\n        \n    def get_all_subscriptions_by_topic(self, topic, next_token=None):\n        \"\"\"\n        Get list of all subscriptions to a specific topic.\n\n        :type topic: string\n        :param topic: The ARN of the topic for which you wish to\n                      find subscriptions.\n\n        :type next_token: string\n        :param next_token: Token returned by the previous call to\n                           this method.\n\n        \"\"\"\n        params = {'ContentType' : 'JSON',\n                  'TopicArn' : topic}\n        if next_token:\n            params['NextToken'] = next_token\n        response = self.make_request('ListSubscriptionsByTopic', params,\n                                     '/', 'GET')\n        body = response.read()\n        if response.status == 200:\n            return json.loads(body)\n        else:\n            boto.log.error('%s %s' % (response.status, response.reason))\n            boto.log.error('%s' % body)\n            raise self.ResponseError(response.status, response.reason, body)\n        \n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/sqs/__init__.py",
    "content": "# Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n#\n\nfrom regioninfo import SQSRegionInfo\n\ndef regions():\n    \"\"\"\n    Get all available regions for the SQS service.\n        \n    :rtype: list\n    :return: A list of :class:`boto.ec2.regioninfo.RegionInfo`\n    \"\"\"\n    return [SQSRegionInfo(name='us-east-1',\n                          endpoint='queue.amazonaws.com'),\n            SQSRegionInfo(name='eu-west-1',\n                          endpoint='eu-west-1.queue.amazonaws.com'),\n            SQSRegionInfo(name='us-west-1',\n                          endpoint='us-west-1.queue.amazonaws.com'),\n            SQSRegionInfo(name='ap-northeast-1',\n                          endpoint='ap-northeast-1.queue.amazonaws.com'),\n            SQSRegionInfo(name='ap-southeast-1',\n                          endpoint='ap-southeast-1.queue.amazonaws.com')\n            ]\n\ndef connect_to_region(region_name, **kw_params):\n    for region in regions():\n        if region.name == region_name:\n            return region.connect(**kw_params)\n    return None\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/sqs/attributes.py",
    "content": "# Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\n\"\"\"\nRepresents an SQS Attribute Name/Value set\n\"\"\"\n\nclass Attributes(dict):\n    \n    def __init__(self, parent):\n        self.parent = parent\n        self.current_key = None\n        self.current_value = None\n\n    def startElement(self, name, attrs, connection):\n        pass\n\n    def endElement(self, name, value, connection):\n        if name == 'Attribute':\n            self[self.current_key] = self.current_value\n        elif name == 'Name':\n            self.current_key = value\n        elif name == 'Value':\n            self.current_value = value\n        else:\n            setattr(self, name, value)\n\n        \n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/sqs/connection.py",
    "content": "# Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nfrom boto.connection import AWSQueryConnection\nfrom boto.sqs.regioninfo import SQSRegionInfo\nfrom boto.sqs.queue import Queue\nfrom boto.sqs.message import Message\nfrom boto.sqs.attributes import Attributes\nfrom boto.exception import SQSError\n\n\nclass SQSConnection(AWSQueryConnection):\n    \"\"\"\n    A Connection to the SQS Service.\n    \"\"\"\n    DefaultRegionName = 'us-east-1'\n    DefaultRegionEndpoint = 'queue.amazonaws.com'\n    APIVersion = '2009-02-01'\n    DefaultContentType = 'text/plain'\n    ResponseError = SQSError\n    \n    def __init__(self, aws_access_key_id=None, aws_secret_access_key=None,\n                 is_secure=True, port=None, proxy=None, proxy_port=None,\n                 proxy_user=None, proxy_pass=None, debug=0,\n                 https_connection_factory=None, region=None, path='/',\n                 security_token=None):\n        if not region:\n            region = SQSRegionInfo(self, self.DefaultRegionName,\n                                   self.DefaultRegionEndpoint)\n        self.region = region\n        AWSQueryConnection.__init__(self, aws_access_key_id,\n                                    aws_secret_access_key,\n                                    is_secure, port,\n                                    proxy, proxy_port,\n                                    proxy_user, proxy_pass,\n                                    self.region.endpoint, debug,\n                                    https_connection_factory, path,\n                                    security_token=security_token)\n\n    def _required_auth_capability(self):\n        return ['sqs']\n\n    def create_queue(self, queue_name, visibility_timeout=None):\n        \"\"\"\n        Create an SQS Queue.\n\n        :type queue_name: str or unicode\n        :param queue_name: The name of the new queue.  Names are scoped to\n                           an account and need to be unique within that\n                           account.  Calling this method on an existing\n                           queue name will not return an error from SQS\n                           unless the value for visibility_timeout is\n                           different than the value of the existing queue\n                           of that name.  This is still an expensive operation,\n                           though, and not the preferred way to check for\n                           the existence of a queue.  See the\n                           :func:`boto.sqs.connection.SQSConnection.lookup` method.\n\n        :type visibility_timeout: int\n        :param visibility_timeout: The default visibility timeout for all\n                                   messages written in the queue.  This can\n                                   be overridden on a per-message.\n\n        :rtype: :class:`boto.sqs.queue.Queue`\n        :return: The newly created queue.\n\n        \"\"\"\n        params = {'QueueName': queue_name}\n        if visibility_timeout:\n            params['DefaultVisibilityTimeout'] = '%d' % (visibility_timeout,)\n        return self.get_object('CreateQueue', params, Queue)\n\n    def delete_queue(self, queue, force_deletion=False):\n        \"\"\"\n        Delete an SQS Queue.\n\n        :type queue: A Queue object\n        :param queue: The SQS queue to be deleted\n        \n        :type force_deletion: Boolean\n        :param force_deletion: Normally, SQS will not delete a queue that\n                               contains messages.  However, if the\n                               force_deletion argument is True, the\n                               queue will be deleted regardless of whether\n                               there are messages in the queue or not.\n                               USE WITH CAUTION.  This will delete all\n                               messages in the queue as well.\n                               \n        :rtype: bool\n        :return: True if the command succeeded, False otherwise\n        \"\"\"\n        return self.get_status('DeleteQueue', None, queue.id)\n\n    def get_queue_attributes(self, queue, attribute='All'):\n        \"\"\"\n        Gets one or all attributes of a Queue\n        \n        :type queue: A Queue object\n        :param queue: The SQS queue to be deleted\n\n        :type attribute: str\n        :type attribute: The specific attribute requested.  If not supplied,\n                         the default is to return all attributes.\n                         Valid attributes are:\n                         \n                         ApproximateNumberOfMessages|\n                         ApproximateNumberOfMessagesNotVisible|\n                         VisibilityTimeout|\n                         CreatedTimestamp|\n                         LastModifiedTimestamp|\n                         Policy\n                         \n        :rtype: :class:`boto.sqs.attributes.Attributes`\n        :return: An Attributes object containing request value(s).\n        \"\"\"\n        params = {'AttributeName' : attribute}\n        return self.get_object('GetQueueAttributes', params,\n                               Attributes, queue.id)\n\n    def set_queue_attribute(self, queue, attribute, value):\n        params = {'Attribute.Name' : attribute, 'Attribute.Value' : value}\n        return self.get_status('SetQueueAttributes', params, queue.id)\n\n    def receive_message(self, queue, number_messages=1,\n                        visibility_timeout=None, attributes=None):\n        \"\"\"\n        Read messages from an SQS Queue.\n\n        :type queue: A Queue object\n        :param queue: The Queue from which messages are read.\n        \n        :type number_messages: int\n        :param number_messages: The maximum number of messages to read\n                                (default=1)\n        \n        :type visibility_timeout: int\n        :param visibility_timeout: The number of seconds the message should\n                                   remain invisible to other queue readers\n                                   (default=None which uses the Queues default)\n\n        :type attributes: str\n        :param attributes: The name of additional attribute to return\n                           with response or All if you want all attributes.\n                           The default is to return no additional attributes.\n                           Valid values:\n                           \n                           All|SenderId|SentTimestamp|\n                           ApproximateReceiveCount|\n                           ApproximateFirstReceiveTimestamp\n        \n        :rtype: list\n        :return: A list of :class:`boto.sqs.message.Message` objects.\n        \"\"\"\n        params = {'MaxNumberOfMessages' : number_messages}\n        if visibility_timeout:\n            params['VisibilityTimeout'] = visibility_timeout\n        if attributes:\n            self.build_list_params(params, attributes, 'AttributeName')\n        return self.get_list('ReceiveMessage', params,\n                             [('Message', queue.message_class)],\n                             queue.id, queue)\n\n    def delete_message(self, queue, message):\n        \"\"\"\n        Delete a message from a queue.\n\n        :type queue: A :class:`boto.sqs.queue.Queue` object\n        :param queue: The Queue from which messages are read.\n        \n        :type message: A :class:`boto.sqs.message.Message` object\n        :param message: The Message to be deleted\n        \n        :rtype: bool\n        :return: True if successful, False otherwise.\n        \"\"\"\n        params = {'ReceiptHandle' : message.receipt_handle}\n        return self.get_status('DeleteMessage', params, queue.id)\n\n    def delete_message_from_handle(self, queue, receipt_handle):\n        \"\"\"\n        Delete a message from a queue, given a receipt handle.\n\n        :type queue: A :class:`boto.sqs.queue.Queue` object\n        :param queue: The Queue from which messages are read.\n        \n        :type receipt_handle: str\n        :param receipt_handle: The receipt handle for the message\n        \n        :rtype: bool\n        :return: True if successful, False otherwise.\n        \"\"\"\n        params = {'ReceiptHandle' : receipt_handle}\n        return self.get_status('DeleteMessage', params, queue.id)\n\n    def send_message(self, queue, message_content):\n        params = {'MessageBody' : message_content}\n        return self.get_object('SendMessage', params, Message,\n                               queue.id, verb='POST')\n\n    def change_message_visibility(self, queue, receipt_handle,\n                                  visibility_timeout):\n        \"\"\"\n        Extends the read lock timeout for the specified message from\n        the specified queue to the specified value.\n\n        :type queue: A :class:`boto.sqs.queue.Queue` object\n        :param queue: The Queue from which messages are read.\n        \n        :type receipt_handle: str\n        :param queue: The receipt handle associated with the message whose\n                      visibility timeout will be changed.\n        \n        :type visibility_timeout: int\n        :param visibility_timeout: The new value of the message's visibility\n                                   timeout in seconds.\n        \"\"\"\n        params = {'ReceiptHandle' : receipt_handle,\n                  'VisibilityTimeout' : visibility_timeout}\n        return self.get_status('ChangeMessageVisibility', params, queue.id)\n\n    def get_all_queues(self, prefix=''):\n        params = {}\n        if prefix:\n            params['QueueNamePrefix'] = prefix\n        return self.get_list('ListQueues', params, [('QueueUrl', Queue)])\n        \n    def get_queue(self, queue_name):\n        rs = self.get_all_queues(queue_name)\n        for q in rs:\n            if q.url.endswith(queue_name):\n                return q\n        return None\n\n    lookup = get_queue\n\n    #\n    # Permissions methods\n    #\n\n    def add_permission(self, queue, label, aws_account_id, action_name):\n        \"\"\"\n        Add a permission to a queue.\n\n        :type queue: :class:`boto.sqs.queue.Queue`\n        :param queue: The queue object\n\n        :type label: str or unicode\n        :param label: A unique identification of the permission you are setting.\n                      Maximum of 80 characters ``[0-9a-zA-Z_-]``\n                      Example, AliceSendMessage\n\n        :type aws_account_id: str or unicode\n        :param principal_id: The AWS account number of the principal who will\n                             be given permission.  The principal must have\n                             an AWS account, but does not need to be signed\n                             up for Amazon SQS. For information\n                             about locating the AWS account identification.\n\n        :type action_name: str or unicode\n        :param action_name: The action.  Valid choices are:\n                            \\*|SendMessage|ReceiveMessage|DeleteMessage|\n                            ChangeMessageVisibility|GetQueueAttributes\n\n        :rtype: bool\n        :return: True if successful, False otherwise.\n\n        \"\"\"\n        params = {'Label': label,\n                  'AWSAccountId' : aws_account_id,\n                  'ActionName' : action_name}\n        return self.get_status('AddPermission', params, queue.id)\n\n    def remove_permission(self, queue, label):\n        \"\"\"\n        Remove a permission from a queue.\n\n        :type queue: :class:`boto.sqs.queue.Queue`\n        :param queue: The queue object\n\n        :type label: str or unicode\n        :param label: The unique label associated with the permission\n                      being removed.\n\n        :rtype: bool\n        :return: True if successful, False otherwise.\n        \"\"\"\n        params = {'Label': label}\n        return self.get_status('RemovePermission', params, queue.id)\n\n    \n    \n\n    \n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/sqs/jsonmessage.py",
    "content": "# Copyright (c) 2006-2008 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nfrom boto.sqs.message import MHMessage\nfrom boto.exception import SQSDecodeError\nimport base64\ntry:\n    import simplejson as json\nexcept ImportError:\n    import json\n\nclass JSONMessage(MHMessage):\n    \"\"\"\n    Acts like a dictionary but encodes it's data as a Base64 encoded JSON payload.\n    \"\"\"\n\n    def decode(self, value):\n        try:\n            value = base64.b64decode(value)\n            value = json.loads(value)\n        except:\n            raise SQSDecodeError('Unable to decode message', self)\n        return value\n\n    def encode(self, value):\n        value = json.dumps(value)\n        return base64.b64encode(value)\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/sqs/message.py",
    "content": "# Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\n\"\"\"\nSQS Message\n\nA Message represents the data stored in an SQS queue.  The rules for what is allowed within an SQS\nMessage are here:\n\n    http://docs.amazonwebservices.com/AWSSimpleQueueService/2008-01-01/SQSDeveloperGuide/Query_QuerySendMessage.html\n\nSo, at it's simplest level a Message just needs to allow a developer to store bytes in it and get the bytes\nback out.  However, to allow messages to have richer semantics, the Message class must support the \nfollowing interfaces:\n\nThe constructor for the Message class must accept a keyword parameter \"queue\" which is an instance of a\nboto Queue object and represents the queue that the message will be stored in.  The default value for\nthis parameter is None.\n\nThe constructor for the Message class must accept a keyword parameter \"body\" which represents the\ncontent or body of the message.  The format of this parameter will depend on the behavior of the\nparticular Message subclass.  For example, if the Message subclass provides dictionary-like behavior to the\nuser the body passed to the constructor should be a dict-like object that can be used to populate\nthe initial state of the message.\n\nThe Message class must provide an encode method that accepts a value of the same type as the body\nparameter of the constructor and returns a string of characters that are able to be stored in an\nSQS message body (see rules above).\n\nThe Message class must provide a decode method that accepts a string of characters that can be\nstored (and probably were stored!) in an SQS message and return an object of a type that is consistent\nwith the \"body\" parameter accepted on the class constructor.\n\nThe Message class must provide a __len__ method that will return the size of the encoded message\nthat would be stored in SQS based on the current state of the Message object.\n\nThe Message class must provide a get_body method that will return the body of the message in the\nsame format accepted in the constructor of the class.\n\nThe Message class must provide a set_body method that accepts a message body in the same format\naccepted by the constructor of the class.  This method should alter to the internal state of the\nMessage object to reflect the state represented in the message body parameter.\n\nThe Message class must provide a get_body_encoded method that returns the current body of the message\nin the format in which it would be stored in SQS.\n\"\"\"\n\nimport base64\nimport StringIO\nfrom boto.sqs.attributes import Attributes\nfrom boto.exception import SQSDecodeError\n\nclass RawMessage:\n    \"\"\"\n    Base class for SQS messages.  RawMessage does not encode the message\n    in any way.  Whatever you store in the body of the message is what\n    will be written to SQS and whatever is returned from SQS is stored\n    directly into the body of the message.\n    \"\"\"\n    \n    def __init__(self, queue=None, body=''):\n        self.queue = queue\n        self.set_body(body)\n        self.id = None\n        self.receipt_handle = None\n        self.md5 = None\n        self.attributes = Attributes(self)\n\n    def __len__(self):\n        return len(self.encode(self._body))\n\n    def startElement(self, name, attrs, connection):\n        if name == 'Attribute':\n            return self.attributes\n        return None\n\n    def endElement(self, name, value, connection):\n        if name == 'Body':\n            self.set_body(self.decode(value))\n        elif name == 'MessageId':\n            self.id = value\n        elif name == 'ReceiptHandle':\n            self.receipt_handle = value\n        elif name == 'MD5OfMessageBody':\n            self.md5 = value\n        else:\n            setattr(self, name, value)\n\n    def encode(self, value):\n        \"\"\"Transform body object into serialized byte array format.\"\"\"\n        return value\n\n    def decode(self, value):\n        \"\"\"Transform seralized byte array into any object.\"\"\"\n        return value\n \n    def set_body(self, body):\n        \"\"\"Override the current body for this object, using decoded format.\"\"\"\n        self._body = body\n\n    def get_body(self):\n        return self._body\n    \n    def get_body_encoded(self):\n        \"\"\"\n        This method is really a semi-private method used by the Queue.write\n        method when writing the contents of the message to SQS.\n        You probably shouldn't need to call this method in the normal course of events.\n        \"\"\"\n        return self.encode(self.get_body())\n\n    def delete(self):\n        if self.queue:\n            return self.queue.delete_message(self)\n\n    def change_visibility(self, visibility_timeout):\n        if self.queue:\n            self.queue.connection.change_message_visibility(self.queue,\n                                                            self.receipt_handle,\n                                                            visibility_timeout)\n    \nclass Message(RawMessage):\n    \"\"\"\n    The default Message class used for SQS queues.  This class automatically\n    encodes/decodes the message body using Base64 encoding to avoid any\n    illegal characters in the message body.  See:\n\n    http://developer.amazonwebservices.com/connect/thread.jspa?messageID=49680%EC%88%90\n\n    for details on why this is a good idea.  The encode/decode is meant to\n    be transparent to the end-user.\n    \"\"\"\n    \n    def encode(self, value):\n        return base64.b64encode(value)\n\n    def decode(self, value):\n        try:\n            value = base64.b64decode(value)\n        except:\n            raise SQSDecodeError('Unable to decode message', self)\n        return value\n\nclass MHMessage(Message):\n    \"\"\"\n    The MHMessage class provides a message that provides RFC821-like\n    headers like this:\n\n    HeaderName: HeaderValue\n\n    The encoding/decoding of this is handled automatically and after\n    the message body has been read, the message instance can be treated\n    like a mapping object, i.e. m['HeaderName'] would return 'HeaderValue'.\n    \"\"\"\n\n    def __init__(self, queue=None, body=None, xml_attrs=None):\n        if body == None or body == '':\n            body = {}\n        Message.__init__(self, queue, body)\n\n    def decode(self, value):\n        try:\n            msg = {}\n            fp = StringIO.StringIO(value)\n            line = fp.readline()\n            while line:\n                delim = line.find(':')\n                key = line[0:delim]\n                value = line[delim+1:].strip()\n                msg[key.strip()] = value.strip()\n                line = fp.readline()\n        except:\n            raise SQSDecodeError('Unable to decode message', self)\n        return msg\n\n    def encode(self, value):\n        s = ''\n        for item in value.items():\n            s = s + '%s: %s\\n' % (item[0], item[1])\n        return s\n\n    def __getitem__(self, key):\n        if self._body.has_key(key):\n            return self._body[key]\n        else:\n            raise KeyError(key)\n\n    def __setitem__(self, key, value):\n        self._body[key] = value\n        self.set_body(self._body)\n\n    def keys(self):\n        return self._body.keys()\n\n    def values(self):\n        return self._body.values()\n\n    def items(self):\n        return self._body.items()\n\n    def has_key(self, key):\n        return self._body.has_key(key)\n\n    def update(self, d):\n        self._body.update(d)\n        self.set_body(self._body)\n\n    def get(self, key, default=None):\n        return self._body.get(key, default)\n\nclass EncodedMHMessage(MHMessage):\n    \"\"\"\n    The EncodedMHMessage class provides a message that provides RFC821-like\n    headers like this:\n\n    HeaderName: HeaderValue\n\n    This variation encodes/decodes the body of the message in base64 automatically.\n    The message instance can be treated like a mapping object,\n    i.e. m['HeaderName'] would return 'HeaderValue'.\n    \"\"\"\n\n    def decode(self, value):\n        try:\n            value = base64.b64decode(value)\n        except:\n            raise SQSDecodeError('Unable to decode message', self)\n        return MHMessage.decode(self, value)\n\n    def encode(self, value):\n        value = MHMessage.encode(self, value)\n        return base64.b64encode(value)\n    \n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/sqs/queue.py",
    "content": "# Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\n\"\"\"\nRepresents an SQS Queue\n\"\"\"\n\nimport urlparse\nfrom boto.sqs.message import Message\n\n\nclass Queue:\n\n    def __init__(self, connection=None, url=None, message_class=Message):\n        self.connection = connection\n        self.url = url\n        self.message_class = message_class\n        self.visibility_timeout = None\n\n    def _id(self):\n        if self.url:\n            val = urlparse.urlparse(self.url)[2]\n        else:\n            val = self.url\n        return val\n    id = property(_id)\n\n    def _name(self):\n        if self.url:\n            val = urlparse.urlparse(self.url)[2].split('/')[2]\n        else:\n            val = self.url\n        return  val\n    name = property(_name)\n\n    def startElement(self, name, attrs, connection):\n        return None\n\n    def endElement(self, name, value, connection):\n        if name == 'QueueUrl':\n            self.url = value\n        elif name == 'VisibilityTimeout':\n            self.visibility_timeout = int(value)\n        else:\n            setattr(self, name, value)\n\n    def set_message_class(self, message_class):\n        \"\"\"\n        Set the message class that should be used when instantiating messages read\n        from the queue.  By default, the class boto.sqs.message.Message is used but\n        this can be overriden with any class that behaves like a message.\n\n        :type message_class: Message-like class\n        :param message_class:  The new Message class\n        \"\"\"\n        self.message_class = message_class\n\n    def get_attributes(self, attributes='All'):\n        \"\"\"\n        Retrieves attributes about this queue object and returns\n        them in an Attribute instance (subclass of a Dictionary).\n\n        :type attributes: string\n        :param attributes: String containing one of:\n                           ApproximateNumberOfMessages,\n                           ApproximateNumberOfMessagesNotVisible,\n                           VisibilityTimeout,\n                           CreatedTimestamp,\n                           LastModifiedTimestamp,\n                           Policy\n        :rtype: Attribute object\n        :return: An Attribute object which is a mapping type holding the\n                 requested name/value pairs\n        \"\"\"\n        return self.connection.get_queue_attributes(self, attributes)\n\n    def set_attribute(self, attribute, value):\n        \"\"\"\n        Set a new value for an attribute of the Queue.\n        \n        :type attribute: String\n        :param attribute: The name of the attribute you want to set.  The\n                           only valid value at this time is: VisibilityTimeout\n        :type value: int\n        :param value: The new value for the attribute.\n                      For VisibilityTimeout the value must be an\n                      integer number of seconds from 0 to 86400.\n\n        :rtype: bool\n        :return: True if successful, otherwise False.\n        \"\"\"\n        return self.connection.set_queue_attribute(self, attribute, value)\n\n    def get_timeout(self):\n        \"\"\"\n        Get the visibility timeout for the queue.\n        \n        :rtype: int\n        :return: The number of seconds as an integer.\n        \"\"\"\n        a = self.get_attributes('VisibilityTimeout')\n        return int(a['VisibilityTimeout'])\n\n    def set_timeout(self, visibility_timeout):\n        \"\"\"\n        Set the visibility timeout for the queue.\n\n        :type visibility_timeout: int\n        :param visibility_timeout: The desired timeout in seconds\n        \"\"\"\n        retval = self.set_attribute('VisibilityTimeout', visibility_timeout)\n        if retval:\n            self.visibility_timeout = visibility_timeout\n        return retval\n\n    def add_permission(self, label, aws_account_id, action_name):\n        \"\"\"\n        Add a permission to a queue.\n\n        :type label: str or unicode\n        :param label: A unique identification of the permission you are setting.\n                      Maximum of 80 characters ``[0-9a-zA-Z_-]``\n                      Example, AliceSendMessage\n\n        :type aws_account_id: str or unicode\n        :param principal_id: The AWS account number of the principal who will be given\n                             permission.  The principal must have an AWS account, but\n                             does not need to be signed up for Amazon SQS. For information\n                             about locating the AWS account identification.\n\n        :type action_name: str or unicode\n        :param action_name: The action.  Valid choices are:\n                            \\*|SendMessage|ReceiveMessage|DeleteMessage|\n                            ChangeMessageVisibility|GetQueueAttributes\n\n        :rtype: bool\n        :return: True if successful, False otherwise.\n\n        \"\"\"\n        return self.connection.add_permission(self, label, aws_account_id, action_name)\n\n    def remove_permission(self, label):\n        \"\"\"\n        Remove a permission from a queue.\n\n        :type label: str or unicode\n        :param label: The unique label associated with the permission being removed.\n\n        :rtype: bool\n        :return: True if successful, False otherwise.\n        \"\"\"\n        return self.connection.remove_permission(self, label)\n\n    def read(self, visibility_timeout=None):\n        \"\"\"\n        Read a single message from the queue.\n        \n        :type visibility_timeout: int\n        :param visibility_timeout: The timeout for this message in seconds\n\n        :rtype: :class:`boto.sqs.message.Message`\n        :return: A single message or None if queue is empty\n        \"\"\"\n        rs = self.get_messages(1, visibility_timeout)\n        if len(rs) == 1:\n            return rs[0]\n        else:\n            return None\n\n    def write(self, message):\n        \"\"\"\n        Add a single message to the queue.\n\n        :type message: Message\n        :param message: The message to be written to the queue\n\n        :rtype: :class:`boto.sqs.message.Message`\n        :return: The :class:`boto.sqs.message.Message` object that was written.\n        \"\"\"\n        new_msg = self.connection.send_message(self, message.get_body_encoded())\n        message.id = new_msg.id\n        message.md5 = new_msg.md5\n        return message\n\n    def new_message(self, body=''):\n        \"\"\"\n        Create new message of appropriate class.\n\n        :type body: message body\n        :param body: The body of the newly created message (optional).\n\n        :rtype: :class:`boto.sqs.message.Message`\n        :return: A new Message object\n        \"\"\"\n        m = self.message_class(self, body)\n        m.queue = self\n        return m\n\n    # get a variable number of messages, returns a list of messages\n    def get_messages(self, num_messages=1, visibility_timeout=None,\n                     attributes=None):\n        \"\"\"\n        Get a variable number of messages.\n\n        :type num_messages: int\n        :param num_messages: The maximum number of messages to read from the queue.\n        \n        :type visibility_timeout: int\n        :param visibility_timeout: The VisibilityTimeout for the messages read.\n\n        :type attributes: str\n        :param attributes: The name of additional attribute to return with response\n                           or All if you want all attributes.  The default is to\n                           return no additional attributes.  Valid values:\n                           All\n                           SenderId\n                           SentTimestamp\n                           ApproximateReceiveCount\n                           ApproximateFirstReceiveTimestamp\n                           \n        :rtype: list\n        :return: A list of :class:`boto.sqs.message.Message` objects.\n        \"\"\"\n        return self.connection.receive_message(self, number_messages=num_messages,\n                                               visibility_timeout=visibility_timeout,\n                                               attributes=attributes)\n\n    def delete_message(self, message):\n        \"\"\"\n        Delete a message from the queue.\n\n        :type message: :class:`boto.sqs.message.Message`\n        :param message: The :class:`boto.sqs.message.Message` object to delete.\n\n        :rtype: bool\n        :return: True if successful, False otherwise\n        \"\"\"\n        return self.connection.delete_message(self, message)\n\n    def delete(self):\n        \"\"\"\n        Delete the queue.\n        \"\"\"\n        return self.connection.delete_queue(self)\n\n    def clear(self, page_size=10, vtimeout=10):\n        \"\"\"Utility function to remove all messages from a queue\"\"\"\n        n = 0\n        l = self.get_messages(page_size, vtimeout)\n        while l:\n            for m in l:\n                self.delete_message(m)\n                n += 1\n            l = self.get_messages(page_size, vtimeout)\n        return n\n\n    def count(self, page_size=10, vtimeout=10):\n        \"\"\"\n        Utility function to count the number of messages in a queue.\n        Note: This function now calls GetQueueAttributes to obtain\n        an 'approximate' count of the number of messages in a queue.\n        \"\"\"\n        a = self.get_attributes('ApproximateNumberOfMessages')\n        return int(a['ApproximateNumberOfMessages'])\n\n    def count_slow(self, page_size=10, vtimeout=10):\n        \"\"\"\n        Deprecated.  This is the old 'count' method that actually counts\n        the messages by reading them all.  This gives an accurate count but\n        is very slow for queues with non-trivial number of messasges.\n        Instead, use get_attribute('ApproximateNumberOfMessages') to take\n        advantage of the new SQS capability.  This is retained only for\n        the unit tests.\n        \"\"\"\n        n = 0\n        l = self.get_messages(page_size, vtimeout)\n        while l:\n            for m in l:\n                n += 1\n            l = self.get_messages(page_size, vtimeout)\n        return n\n\n    def dump(self, file_name, page_size=10, vtimeout=10, sep='\\n'):\n        \"\"\"Utility function to dump the messages in a queue to a file\n        NOTE: Page size must be < 10 else SQS errors\"\"\"\n        fp = open(file_name, 'wb')\n        n = 0\n        l = self.get_messages(page_size, vtimeout)\n        while l:\n            for m in l:\n                fp.write(m.get_body())\n                if sep:\n                    fp.write(sep)\n                n += 1\n            l = self.get_messages(page_size, vtimeout)\n        fp.close()\n        return n\n\n    def save_to_file(self, fp, sep='\\n'):\n        \"\"\"\n        Read all messages from the queue and persist them to file-like object.\n        Messages are written to the file and the 'sep' string is written\n        in between messages.  Messages are deleted from the queue after\n        being written to the file.\n        Returns the number of messages saved.\n        \"\"\"\n        n = 0\n        m = self.read()\n        while m:\n            n += 1\n            fp.write(m.get_body())\n            if sep:\n                fp.write(sep)\n            self.delete_message(m)\n            m = self.read()\n        return n\n\n    def save_to_filename(self, file_name, sep='\\n'):\n        \"\"\"\n        Read all messages from the queue and persist them to local file.\n        Messages are written to the file and the 'sep' string is written\n        in between messages.  Messages are deleted from the queue after\n        being written to the file.\n        Returns the number of messages saved.\n        \"\"\"\n        fp = open(file_name, 'wb')\n        n = self.save_to_file(fp, sep)\n        fp.close()\n        return n\n\n    # for backwards compatibility\n    save = save_to_filename\n\n    def save_to_s3(self, bucket):\n        \"\"\"\n        Read all messages from the queue and persist them to S3.\n        Messages are stored in the S3 bucket using a naming scheme of::\n        \n            <queue_id>/<message_id>\n        \n        Messages are deleted from the queue after being saved to S3.\n        Returns the number of messages saved.\n        \"\"\"\n        n = 0\n        m = self.read()\n        while m:\n            n += 1\n            key = bucket.new_key('%s/%s' % (self.id, m.id))\n            key.set_contents_from_string(m.get_body())\n            self.delete_message(m)\n            m = self.read()\n        return n\n\n    def load_from_s3(self, bucket, prefix=None):\n        \"\"\"\n        Load messages previously saved to S3.\n        \"\"\"\n        n = 0\n        if prefix:\n            prefix = '%s/' % prefix\n        else:\n            prefix = '%s/' % self.id[1:]\n        rs = bucket.list(prefix=prefix)\n        for key in rs:\n            n += 1\n            m = self.new_message(key.get_contents_as_string())\n            self.write(m)\n        return n\n\n    def load_from_file(self, fp, sep='\\n'):\n        \"\"\"Utility function to load messages from a file-like object to a queue\"\"\"\n        n = 0\n        body = ''\n        l = fp.readline()\n        while l:\n            if l == sep:\n                m = Message(self, body)\n                self.write(m)\n                n += 1\n                print 'writing message %d' % n\n                body = ''\n            else:\n                body = body + l\n            l = fp.readline()\n        return n\n\n    def load_from_filename(self, file_name, sep='\\n'):\n        \"\"\"Utility function to load messages from a local filename to a queue\"\"\"\n        fp = open(file_name, 'rb')\n        n = self.load_from_file(fp, sep)\n        fp.close()\n        return n\n\n    # for backward compatibility\n    load = load_from_filename\n\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/sqs/regioninfo.py",
    "content": "# Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/\n# Copyright (c) 2010, Eucalyptus Systems, Inc.\n# All rights reserved.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n#\n\nfrom boto.regioninfo import RegionInfo\n\nclass SQSRegionInfo(RegionInfo):\n\n    def __init__(self, connection=None, name=None, endpoint=None):\n        from boto.sqs.connection import SQSConnection\n        RegionInfo.__init__(self, connection, name, endpoint,\n                            SQSConnection)\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/storage_uri.py",
    "content": "# Copyright 2010 Google Inc.\n# Copyright (c) 2011, Nexenta Systems Inc.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nimport boto\nimport os\nfrom boto.exception import BotoClientError\nfrom boto.exception import InvalidUriError\n\n\nclass StorageUri(object):\n    \"\"\"\n    Base class for representing storage provider-independent bucket and\n    object name with a shorthand URI-like syntax.\n\n    This is an abstract class: the constructor cannot be called (throws an\n    exception if you try).\n    \"\"\"\n\n    connection = None\n    # Optional args that can be set from one of the concrete subclass\n    # constructors, to change connection behavior (e.g., to override\n    # https_connection_factory).\n    connection_args = None\n\n    def __init__(self):\n        \"\"\"Uncallable constructor on abstract base StorageUri class.\n        \"\"\"\n        raise BotoClientError('Attempt to instantiate abstract StorageUri '\n                              'class')\n\n    def __repr__(self):\n        \"\"\"Returns string representation of URI.\"\"\"\n        return self.uri\n\n    def equals(self, uri):\n        \"\"\"Returns true if two URIs are equal.\"\"\"\n        return self.uri == uri.uri\n\n    def check_response(self, resp, level, uri):\n        if resp is None:\n            raise InvalidUriError('Attempt to get %s for \"%s\" failed. This '\n                                  'probably indicates the URI is invalid' %\n                                  (level, uri))\n\n    def connect(self, access_key_id=None, secret_access_key=None, **kwargs):\n        \"\"\"\n        Opens a connection to appropriate provider, depending on provider\n        portion of URI. Requires Credentials defined in boto config file (see\n        boto/pyami/config.py).\n        @type storage_uri: StorageUri\n        @param storage_uri: StorageUri specifying a bucket or a bucket+object\n        @rtype: L{AWSAuthConnection<boto.gs.connection.AWSAuthConnection>}\n        @return: A connection to storage service provider of the given URI.\n        \"\"\"\n\n        connection_args = dict(self.connection_args or ())\n        # Use OrdinaryCallingFormat instead of boto-default\n        # SubdomainCallingFormat because the latter changes the hostname\n        # that's checked during cert validation for HTTPS connections,\n        # which will fail cert validation (when cert validation is enabled).\n        # Note: the following import can't be moved up to the start of\n        # this file else it causes a config import failure when run from\n        # the resumable upload/download tests.\n        from boto.s3.connection import OrdinaryCallingFormat\n        connection_args['calling_format'] = OrdinaryCallingFormat()\n        connection_args.update(kwargs)\n        if not self.connection:\n            if self.scheme == 's3':\n                from boto.s3.connection import S3Connection\n                self.connection = S3Connection(access_key_id,\n                                               secret_access_key,\n                                               **connection_args)\n            elif self.scheme == 'gs':\n                from boto.gs.connection import GSConnection\n                self.connection = GSConnection(access_key_id,\n                                               secret_access_key,\n                                               **connection_args)\n            elif self.scheme == 'file':\n                from boto.file.connection import FileConnection\n                self.connection = FileConnection(self)\n            else:\n                raise InvalidUriError('Unrecognized scheme \"%s\"' %\n                                      self.scheme)\n        self.connection.debug = self.debug\n        return self.connection\n\n    def delete_key(self, validate=True, headers=None, version_id=None,\n                   mfa_token=None):\n        if not self.object_name:\n            raise InvalidUriError('delete_key on object-less URI (%s)' %\n                                  self.uri)\n        bucket = self.get_bucket(validate, headers)\n        return bucket.delete_key(self.object_name, headers, version_id,\n                                 mfa_token)\n\n    def get_all_keys(self, validate=True, headers=None):\n        bucket = self.get_bucket(validate, headers)\n        return bucket.get_all_keys(headers)\n\n    def get_bucket(self, validate=True, headers=None):\n        if self.bucket_name is None:\n            raise InvalidUriError('get_bucket on bucket-less URI (%s)' %\n                                  self.uri)\n        conn = self.connect()\n        bucket = conn.get_bucket(self.bucket_name, validate, headers)\n        self.check_response(bucket, 'bucket', self.uri)\n        return bucket\n\n    def get_key(self, validate=True, headers=None, version_id=None):\n        if not self.object_name:\n            raise InvalidUriError('get_key on object-less URI (%s)' % self.uri)\n        bucket = self.get_bucket(validate, headers)\n        key = bucket.get_key(self.object_name, headers, version_id)\n        self.check_response(key, 'key', self.uri)\n        return key\n\n    def new_key(self, validate=True, headers=None):\n        if not self.object_name:\n            raise InvalidUriError('new_key on object-less URI (%s)' % self.uri)\n        bucket = self.get_bucket(validate, headers)\n        return bucket.new_key(self.object_name)\n\n    def get_contents_as_string(self, validate=True, headers=None, cb=None,\n                               num_cb=10, torrent=False, version_id=None):\n        if not self.object_name:\n            raise InvalidUriError('get_contents_as_string on object-less URI '\n                                  '(%s)' % self.uri)\n        key = self.get_key(validate, headers)\n        self.check_response(key, 'key', self.uri)\n        return key.get_contents_as_string(headers, cb, num_cb, torrent,\n                                          version_id)\n\n    def acl_class(self):\n        if self.bucket_name is None:\n            raise InvalidUriError('acl_class on bucket-less URI (%s)' %\n                                  self.uri)\n        conn = self.connect()\n        acl_class = conn.provider.acl_class\n        self.check_response(acl_class, 'acl_class', self.uri)\n        return acl_class\n\n    def canned_acls(self):\n        if self.bucket_name is None:\n            raise InvalidUriError('canned_acls on bucket-less URI (%s)' %\n                                  self.uri)\n        conn = self.connect()\n        canned_acls = conn.provider.canned_acls\n        self.check_response(canned_acls, 'canned_acls', self.uri)\n        return canned_acls\n\n\nclass BucketStorageUri(StorageUri):\n    \"\"\"\n    StorageUri subclass that handles bucket storage providers.\n    Callers should instantiate this class by calling boto.storage_uri().\n    \"\"\"\n\n    def __init__(self, scheme, bucket_name=None, object_name=None,\n                 debug=0, connection_args=None):\n        \"\"\"Instantiate a BucketStorageUri from scheme,bucket,object tuple.\n\n        @type scheme: string\n        @param scheme: URI scheme naming the storage provider (gs, s3, etc.)\n        @type bucket_name: string\n        @param bucket_name: bucket name\n        @type object_name: string\n        @param object_name: object name\n        @type debug: int\n        @param debug: debug level to pass in to connection (range 0..2)\n        @type connection_args: map\n        @param connection_args: optional map containing args to be\n            passed to {S3,GS}Connection constructor (e.g., to override\n            https_connection_factory).\n\n        After instantiation the components are available in the following\n        fields: uri, scheme, bucket_name, object_name.\n        \"\"\"\n\n        self.scheme = scheme\n        self.bucket_name = bucket_name\n        self.object_name = object_name\n        if connection_args:\n            self.connection_args = connection_args\n        if self.bucket_name and self.object_name:\n            self.uri = ('%s://%s/%s' % (self.scheme, self.bucket_name,\n                                        self.object_name))\n        elif self.bucket_name:\n            self.uri = ('%s://%s/' % (self.scheme, self.bucket_name))\n        else:\n            self.uri = ('%s://' % self.scheme)\n        self.debug = debug\n\n    def clone_replace_name(self, new_name):\n        \"\"\"Instantiate a BucketStorageUri from the current BucketStorageUri,\n        but replacing the object_name.\n\n        @type new_name: string\n        @param new_name: new object name\n        \"\"\"\n        if not self.bucket_name:\n            raise InvalidUriError('clone_replace_name() on bucket-less URI %s' %\n                                  self.uri)\n        return BucketStorageUri(self.scheme, self.bucket_name, new_name,\n                                self.debug)\n\n    def get_acl(self, validate=True, headers=None, version_id=None):\n        if not self.bucket_name:\n            raise InvalidUriError('get_acl on bucket-less URI (%s)' % self.uri)\n        bucket = self.get_bucket(validate, headers)\n        # This works for both bucket- and object- level ACLs (former passes\n        # key_name=None):\n        acl = bucket.get_acl(self.object_name, headers, version_id)\n        self.check_response(acl, 'acl', self.uri)\n        return acl\n\n    def get_location(self, validate=True, headers=None):\n        if not self.bucket_name:\n            raise InvalidUriError('get_location on bucket-less URI (%s)' %\n                                  self.uri)\n        bucket = self.get_bucket(validate, headers)\n        return bucket.get_location()\n\n    def get_subresource(self, subresource, validate=True, headers=None,\n                        version_id=None):\n        if not self.bucket_name:\n            raise InvalidUriError(\n                'get_subresource on bucket-less URI (%s)' % self.uri)\n        bucket = self.get_bucket(validate, headers)\n        return bucket.get_subresource(subresource, self.object_name, headers,\n                                      version_id)\n\n    def add_group_email_grant(self, permission, email_address, recursive=False,\n                              validate=True, headers=None):\n        if self.scheme != 'gs':\n              raise ValueError('add_group_email_grant() not supported for %s '\n                               'URIs.' % self.scheme)\n        if self.object_name:\n            if recursive:\n              raise ValueError('add_group_email_grant() on key-ful URI cannot '\n                               'specify recursive=True')\n            key = self.get_key(validate, headers)\n            self.check_response(key, 'key', self.uri)\n            key.add_group_email_grant(permission, email_address, headers)\n        elif self.bucket_name:\n            bucket = self.get_bucket(validate, headers)\n            bucket.add_group_email_grant(permission, email_address, recursive,\n                                         headers)\n        else:\n            raise InvalidUriError('add_group_email_grant() on bucket-less URI %s' %\n                                  self.uri)\n\n    def add_email_grant(self, permission, email_address, recursive=False,\n                        validate=True, headers=None):\n        if not self.bucket_name:\n            raise InvalidUriError('add_email_grant on bucket-less URI (%s)' %\n                                  self.uri)\n        if not self.object_name:\n            bucket = self.get_bucket(validate, headers)\n            bucket.add_email_grant(permission, email_address, recursive,\n                                   headers)\n        else:\n            key = self.get_key(validate, headers)\n            self.check_response(key, 'key', self.uri)\n            key.add_email_grant(permission, email_address)\n\n    def add_user_grant(self, permission, user_id, recursive=False,\n                       validate=True, headers=None):\n        if not self.bucket_name:\n            raise InvalidUriError('add_user_grant on bucket-less URI (%s)' %\n                                  self.uri)\n        if not self.object_name:\n            bucket = self.get_bucket(validate, headers)\n            bucket.add_user_grant(permission, user_id, recursive, headers)\n        else:\n            key = self.get_key(validate, headers)\n            self.check_response(key, 'key', self.uri)\n            key.add_user_grant(permission, user_id)\n\n    def list_grants(self, headers=None):\n        if not self.bucket_name:\n            raise InvalidUriError('list_grants on bucket-less URI (%s)' %\n                                  self.uri)\n        bucket = self.get_bucket(headers)\n        return bucket.list_grants(headers)\n\n    def names_container(self):\n        \"\"\"Returns True if this URI names a bucket (vs. an object).\n        \"\"\"\n        return not self.object_name\n\n    def names_singleton(self):\n        \"\"\"Returns True if this URI names an object (vs. a bucket).\n        \"\"\"\n        return self.object_name\n\n    def is_file_uri(self):\n        return False\n\n    def is_cloud_uri(self):\n        return True\n\n    def create_bucket(self, headers=None, location='', policy=None):\n        if self.bucket_name is None:\n            raise InvalidUriError('create_bucket on bucket-less URI (%s)' %\n                                  self.uri)\n        conn = self.connect()\n        return conn.create_bucket(self.bucket_name, headers, location, policy)\n\n    def delete_bucket(self, headers=None):\n        if self.bucket_name is None:\n            raise InvalidUriError('delete_bucket on bucket-less URI (%s)' %\n                                  self.uri)\n        conn = self.connect()\n        return conn.delete_bucket(self.bucket_name, headers)\n\n    def get_all_buckets(self, headers=None):\n        conn = self.connect()\n        return conn.get_all_buckets(headers)\n\n    def get_provider(self):\n        conn = self.connect()\n        provider = conn.provider\n        self.check_response(provider, 'provider', self.uri)\n        return provider\n\n    def set_acl(self, acl_or_str, key_name='', validate=True, headers=None,\n                version_id=None):\n        if not self.bucket_name:\n            raise InvalidUriError('set_acl on bucket-less URI (%s)' %\n                                  self.uri)\n        self.get_bucket(validate, headers).set_acl(acl_or_str, key_name,\n                                                   headers, version_id)\n\n    def set_canned_acl(self, acl_str, validate=True, headers=None,\n                       version_id=None):\n        if not self.object_name:\n            raise InvalidUriError('set_canned_acl on object-less URI (%s)' %\n                                  self.uri)\n        key = self.get_key(validate, headers)\n        self.check_response(key, 'key', self.uri)\n        key.set_canned_acl(acl_str, headers, version_id)\n\n    def set_subresource(self, subresource, value, validate=True, headers=None,\n                        version_id=None):\n        if not self.bucket_name:\n            raise InvalidUriError(\n                'set_subresource on bucket-less URI (%s)' % self.uri)\n        bucket = self.get_bucket(validate, headers)\n        bucket.set_subresource(subresource, value, self.object_name, headers,\n                               version_id)\n\n    def set_contents_from_string(self, s, headers=None, replace=True,\n                                 cb=None, num_cb=10, policy=None, md5=None,\n                                 reduced_redundancy=False):\n        key = self.new_key(headers=headers)\n        key.set_contents_from_string(s, headers, replace, cb, num_cb, policy,\n                                     md5, reduced_redundancy)\n\n    def enable_logging(self, target_bucket, target_prefix=None,\n                       canned_acl=None, validate=True, headers=None,\n                       version_id=None):\n        if not self.bucket_name:\n            raise InvalidUriError(\n                'disable_logging on bucket-less URI (%s)' % self.uri)\n        bucket = self.get_bucket(validate, headers)\n        bucket.enable_logging(target_bucket, target_prefix, headers=headers,\n                              canned_acl=canned_acl)\n\n    def disable_logging(self, validate=True, headers=None, version_id=None):\n        if not self.bucket_name:\n            raise InvalidUriError(\n                'disable_logging on bucket-less URI (%s)' % self.uri)\n        bucket = self.get_bucket(validate, headers)\n        bucket.disable_logging(headers=headers)\n\n\n\nclass FileStorageUri(StorageUri):\n    \"\"\"\n    StorageUri subclass that handles files in the local file system.\n    Callers should instantiate this class by calling boto.storage_uri().\n\n    See file/README about how we map StorageUri operations onto a file system.\n    \"\"\"\n\n    def __init__(self, object_name, debug, is_stream=False):\n        \"\"\"Instantiate a FileStorageUri from a path name.\n\n        @type object_name: string\n        @param object_name: object name\n        @type debug: boolean\n        @param debug: whether to enable debugging on this StorageUri\n\n        After instantiation the components are available in the following\n        fields: uri, scheme, bucket_name (always blank for this \"anonymous\"\n        bucket), object_name.\n        \"\"\"\n\n        self.scheme = 'file'\n        self.bucket_name = ''\n        self.object_name = object_name\n        self.uri = 'file://' + object_name\n        self.debug = debug\n        self.stream = is_stream\n\n    def clone_replace_name(self, new_name):\n        \"\"\"Instantiate a FileStorageUri from the current FileStorageUri,\n        but replacing the object_name.\n\n        @type new_name: string\n        @param new_name: new object name\n        \"\"\"\n        return FileStorageUri(new_name, self.debug, self.stream)\n\n    def names_container(self):\n        \"\"\"Returns True if this URI is not representing input/output stream\n        and names a directory.\n        \"\"\"\n        if not self.stream:\n            return os.path.isdir(self.object_name)\n        else:\n            return False\n\n    def names_singleton(self):\n        \"\"\"Returns True if this URI names a file or\n        if URI represents input/output stream.\n        \"\"\"\n        if self.stream:\n            return True\n        else:\n            return os.path.isfile(self.object_name)\n\n    def is_file_uri(self):\n        return True\n\n    def is_cloud_uri(self):\n        return False\n\n    def is_stream(self):\n        \"\"\"Retruns True if this URI represents input/output stream.\n        \"\"\"\n        return self.stream\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/sts/__init__.py",
    "content": "# Copyright (c) 2010-2011 Mitch Garnaat http://garnaat.org/\n# Copyright (c) 2010-2011, Eucalyptus Systems, Inc.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nfrom connection import STSConnection\nfrom boto.regioninfo import RegionInfo\n\ndef regions():\n    \"\"\"\n    Get all available regions for the STS service.\n\n    :rtype: list\n    :return: A list of :class:`boto.regioninfo.RegionInfo` instances\n    \"\"\"\n    return [RegionInfo(name='us-east-1',\n                       endpoint='sts.amazonaws.com',\n                       connection_cls=STSConnection)\n            ]\n\ndef connect_to_region(region_name, **kw_params):\n    \"\"\"\n    Given a valid region name, return a \n    :class:`boto.sts.connection.STSConnection`.\n\n    :type: str\n    :param region_name: The name of the region to connect to.\n    \n    :rtype: :class:`boto.sts.connection.STSConnection` or ``None``\n    :return: A connection to the given region, or None if an invalid region\n             name is given\n    \"\"\"\n    for region in regions():\n        if region.name == region_name:\n            return region.connect(**kw_params)\n    return None\n\ndef get_region(region_name, **kw_params):\n    \"\"\"\n    Find and return a :class:`boto.regioninfo.RegionInfo` object\n    given a region name.\n\n    :type: str\n    :param: The name of the region.\n\n    :rtype: :class:`boto.regioninfo.RegionInfo`\n    :return: The RegionInfo object for the given region or None if\n             an invalid region name is provided.\n    \"\"\"\n    for region in regions(**kw_params):\n        if region.name == region_name:\n            return region\n    return None\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/sts/connection.py",
    "content": "# Copyright (c) 2011 Mitch Garnaat http://garnaat.org/\n# Copyright (c) 2011, Eucalyptus Systems, Inc.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nfrom boto.connection import AWSQueryConnection\nfrom boto.regioninfo import RegionInfo\nfrom credentials import Credentials, FederationToken\nimport boto\n\nclass STSConnection(AWSQueryConnection):\n\n    DefaultRegionName = 'us-east-1'\n    DefaultRegionEndpoint = 'sts.amazonaws.com'\n    APIVersion = '2011-06-15'\n\n    def __init__(self, aws_access_key_id=None, aws_secret_access_key=None,\n                 is_secure=True, port=None, proxy=None, proxy_port=None,\n                 proxy_user=None, proxy_pass=None, debug=0,\n                 https_connection_factory=None, region=None, path='/',\n                 converter=None):\n        if not region:\n            region = RegionInfo(self, self.DefaultRegionName,\n                                self.DefaultRegionEndpoint,\n                                connection_cls=STSConnection)\n        self.region = region\n        AWSQueryConnection.__init__(self, aws_access_key_id,\n                                    aws_secret_access_key,\n                                    is_secure, port, proxy, proxy_port,\n                                    proxy_user, proxy_pass,\n                                    self.region.endpoint, debug,\n                                    https_connection_factory, path)\n\n    def _required_auth_capability(self):\n        return ['sign-v2']\n\n    def get_session_token(self, duration=None):\n        \"\"\"\n        :type duration: int\n        :param duration: The number of seconds the credentials should\n                         remain valid.\n\n        \"\"\"\n        params = {}\n        if duration:\n            params['Duration'] = duration\n        return self.get_object('GetSessionToken', params,\n                                Credentials, verb='POST')\n        \n        \n    def get_federation_token(self, name, duration=None, policy=None):\n        \"\"\"\n        :type name: str\n        :param name: The name of the Federated user associated with\n                     the credentials.\n                     \n        :type duration: int\n        :param duration: The number of seconds the credentials should\n                         remain valid.\n\n        :type policy: str\n        :param policy: A JSON policy to associate with these credentials.\n\n        \"\"\"\n        params = {'Name' : name}\n        if duration:\n            params['Duration'] = duration\n        if policy:\n            params['Policy'] = policy\n        return self.get_object('GetFederationToken', params,\n                                FederationToken, verb='POST')\n        \n        \n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/sts/credentials.py",
    "content": "# Copyright (c) 2011 Mitch Garnaat http://garnaat.org/\n# Copyright (c) 2011, Eucalyptus Systems, Inc.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\nclass Credentials(object):\n    \"\"\"\n    :ivar access_key: The AccessKeyID.\n    :ivar secret_key: The SecretAccessKey.\n    :ivar session_token: The session token that must be passed with\n                         requests to use the temporary credentials\n    :ivar expiration: The timestamp for when the credentials will expire\n    \"\"\"\n\n    def __init__(self, parent=None):\n        self.parent = parent\n        self.access_key = None\n        self.secret_key = None\n        self.session_token = None\n        self.expiration = None\n\n    def startElement(self, name, attrs, connection):\n        return None\n\n    def endElement(self, name, value, connection):\n        if name == 'AccessKeyId':\n            self.access_key = value\n        elif name == 'SecretAccessKey':\n            self.secret_key = value\n        elif name == 'SessionToken':\n            self.session_token = value\n        elif name == 'Expiration':\n            self.expiration = value\n        elif name == 'RequestId':\n            self.request_id = value\n        else:\n            pass\n    \nclass FederationToken(object):\n    \"\"\"\n    :ivar credentials: A Credentials object containing the credentials.\n    :ivar federated_user_arn: ARN specifying federated user using credentials.\n    :ivar federated_user_id: The ID of the federated user using credentials.\n    :ivar packed_policy_size: A percentage value indicating the size of\n                             the policy in packed form\n    \"\"\"\n\n    def __init__(self, parent=None):\n        self.parent = parent\n        self.credentials = None\n        self.federated_user_arn = None\n        self.federated_user_id = None\n        self.packed_policy_size = None\n\n    def startElement(self, name, attrs, connection):\n        if name == 'Credentials':\n            self.credentials = Credentials()\n            return self.credentials\n        else:\n            return None\n\n    def endElement(self, name, value, connection):\n        if name == 'Arn':\n            self.federated_user_arn = value\n        elif name == 'FederatedUserId':\n            self.federated_user_id = value\n        elif name == 'PackedPolicySize':\n            self.packed_policy_size = int(value)\n        elif name == 'RequestId':\n            self.request_id = value\n        else:\n            pass\n        \n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/utils.py",
    "content": "# Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/\n# Copyright (c) 2010, Eucalyptus Systems, Inc.\n# All rights reserved.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\n#\n# Parts of this code were copied or derived from sample code supplied by AWS.\n# The following notice applies to that code.\n#\n#  This software code is made available \"AS IS\" without warranties of any\n#  kind.  You may copy, display, modify and redistribute the software\n#  code either by itself or as incorporated into your code; provided that\n#  you do not remove any proprietary notices.  Your use of this software\n#  code is at your own risk and you waive any claim against Amazon\n#  Digital Services, Inc. or its affiliates with respect to your use of\n#  this software code. (c) 2006 Amazon Digital Services, Inc. or its\n#  affiliates.\n\n\"\"\"\nSome handy utility functions used by several classes.\n\"\"\"\n\nimport urllib\nimport urllib2\nimport imp\nimport subprocess\nimport StringIO\nimport time\nimport logging.handlers\nimport boto\nimport tempfile\nimport smtplib\nimport datetime\nfrom email.MIMEMultipart import MIMEMultipart\nfrom email.MIMEBase import MIMEBase\nfrom email.MIMEText import MIMEText\nfrom email.Utils import formatdate\nfrom email import Encoders\nimport gzip\n\n\ntry:\n    import hashlib\n    _hashfn = hashlib.sha512\nexcept ImportError:\n    import md5\n    _hashfn = md5.md5\n\n# List of Query String Arguments of Interest\nqsa_of_interest = ['acl', 'location', 'logging', 'partNumber', 'policy',\n                   'requestPayment', 'torrent', 'versioning', 'versionId',\n                   'versions', 'website', 'uploads', 'uploadId',\n                   'response-content-type', 'response-content-language',\n                   'response-expires', 'reponse-cache-control',\n                   'response-content-disposition',\n                   'response-content-encoding']\n\n# generates the aws canonical string for the given parameters\ndef canonical_string(method, path, headers, expires=None,\n                     provider=None):\n    if not provider:\n        provider = boto.provider.get_default()\n    interesting_headers = {}\n    for key in headers:\n        lk = key.lower()\n        if headers[key] != None and (lk in ['content-md5', 'content-type', 'date'] or\n                                     lk.startswith(provider.header_prefix)):\n            interesting_headers[lk] = headers[key].strip()\n\n    # these keys get empty strings if they don't exist\n    if not interesting_headers.has_key('content-type'):\n        interesting_headers['content-type'] = ''\n    if not interesting_headers.has_key('content-md5'):\n        interesting_headers['content-md5'] = ''\n\n    # just in case someone used this.  it's not necessary in this lib.\n    if interesting_headers.has_key(provider.date_header):\n        interesting_headers['date'] = ''\n\n    # if you're using expires for query string auth, then it trumps date\n    # (and provider.date_header)\n    if expires:\n        interesting_headers['date'] = str(expires)\n\n    sorted_header_keys = interesting_headers.keys()\n    sorted_header_keys.sort()\n\n    buf = \"%s\\n\" % method\n    for key in sorted_header_keys:\n        val = interesting_headers[key]\n        if key.startswith(provider.header_prefix):\n            buf += \"%s:%s\\n\" % (key, val)\n        else:\n            buf += \"%s\\n\" % val\n\n    # don't include anything after the first ? in the resource...\n    # unless it is one of the QSA of interest, defined above\n    t =  path.split('?')\n    buf += t[0]\n\n    if len(t) > 1:\n        qsa = t[1].split('&')\n        qsa = [ a.split('=') for a in qsa]\n        qsa = [ a for a in qsa if a[0] in qsa_of_interest ]\n        if len(qsa) > 0:\n            qsa.sort(cmp=lambda x,y:cmp(x[0], y[0]))\n            qsa = [ '='.join(a) for a in qsa ]\n            buf += '?'\n            buf += '&'.join(qsa)\n\n    return buf\n\ndef merge_meta(headers, metadata, provider=None):\n    if not provider:\n        provider = boto.provider.get_default()\n    metadata_prefix = provider.metadata_prefix\n    final_headers = headers.copy()\n    for k in metadata.keys():\n        if k.lower() in ['cache-control', 'content-md5', 'content-type',\n                         'content-encoding', 'content-disposition',\n                         'date', 'expires']:\n            final_headers[k] = metadata[k]\n        else:\n            final_headers[metadata_prefix + k] = metadata[k]\n\n    return final_headers\n\ndef get_aws_metadata(headers, provider=None):\n    if not provider:\n        provider = boto.provider.get_default()\n    metadata_prefix = provider.metadata_prefix\n    metadata = {}\n    for hkey in headers.keys():\n        if hkey.lower().startswith(metadata_prefix):\n            val = urllib.unquote_plus(headers[hkey])\n            try:\n                metadata[hkey[len(metadata_prefix):]] = unicode(val, 'utf-8')\n            except UnicodeDecodeError:\n                metadata[hkey[len(metadata_prefix):]] = val\n            del headers[hkey]\n    return metadata\n\ndef retry_url(url, retry_on_404=True, num_retries=10):\n    for i in range(0, num_retries):\n        try:\n            req = urllib2.Request(url)\n            resp = urllib2.urlopen(req)\n            return resp.read()\n        except urllib2.HTTPError, e:\n            # in 2.6 you use getcode(), in 2.5 and earlier you use code\n            if hasattr(e, 'getcode'):\n                code = e.getcode()\n            else:\n                code = e.code\n            if code == 404 and not retry_on_404:\n                return ''\n        except:\n            pass\n        boto.log.exception('Caught exception reading instance data')\n        time.sleep(2**i)\n    boto.log.error('Unable to read instance data, giving up')\n    return ''\n\ndef _get_instance_metadata(url):\n    d = {}\n    data = retry_url(url)\n    if data:\n        fields = data.split('\\n')\n        for field in fields:\n            if field.endswith('/'):\n                d[field[0:-1]] = _get_instance_metadata(url + field)\n            else:\n                p = field.find('=')\n                if p > 0:\n                    key = field[p+1:]\n                    resource = field[0:p] + '/openssh-key'\n                else:\n                    key = resource = field\n                val = retry_url(url + resource)\n                p = val.find('\\n')\n                if p > 0:\n                    val = val.split('\\n')\n                d[key] = val\n    return d\n\ndef get_instance_metadata(version='latest', url='http://169.254.169.254'):\n    \"\"\"\n    Returns the instance metadata as a nested Python dictionary.\n    Simple values (e.g. local_hostname, hostname, etc.) will be\n    stored as string values.  Values such as ancestor-ami-ids will\n    be stored in the dict as a list of string values.  More complex\n    fields such as public-keys and will be stored as nested dicts.\n    \"\"\"\n    return _get_instance_metadata('%s/%s/meta-data/' % (url, version))\n\ndef get_instance_userdata(version='latest', sep=None,\n                          url='http://169.254.169.254'):\n    ud_url = '%s/%s/user-data' % (url,version)\n    user_data = retry_url(ud_url, retry_on_404=False)\n    if user_data:\n        if sep:\n            l = user_data.split(sep)\n            user_data = {}\n            for nvpair in l:\n                t = nvpair.split('=')\n                user_data[t[0].strip()] = t[1].strip()\n    return user_data\n\nISO8601 = '%Y-%m-%dT%H:%M:%SZ'\nISO8601_MS = '%Y-%m-%dT%H:%M:%S.%fZ'\n    \ndef get_ts(ts=None):\n    if not ts:\n        ts = time.gmtime()\n    return time.strftime(ISO8601, ts)\n\ndef parse_ts(ts):\n    try:\n        dt = datetime.datetime.strptime(ts, ISO8601)\n        return dt\n    except ValueError:\n        dt = datetime.datetime.strptime(ts, ISO8601_MS)\n        return dt\n\ndef find_class(module_name, class_name=None):\n    if class_name:\n        module_name = \"%s.%s\" % (module_name, class_name)\n    modules = module_name.split('.')\n    c = None\n\n    try:\n        for m in modules[1:]:\n            if c:\n                c = getattr(c, m)\n            else:\n                c = getattr(__import__(\".\".join(modules[0:-1])), m)\n        return c\n    except:\n        return None\n    \ndef update_dme(username, password, dme_id, ip_address):\n    \"\"\"\n    Update your Dynamic DNS record with DNSMadeEasy.com\n    \"\"\"\n    dme_url = 'https://www.dnsmadeeasy.com/servlet/updateip'\n    dme_url += '?username=%s&password=%s&id=%s&ip=%s'\n    s = urllib2.urlopen(dme_url % (username, password, dme_id, ip_address))\n    return s.read()\n\ndef fetch_file(uri, file=None, username=None, password=None):\n    \"\"\"\n    Fetch a file based on the URI provided. If you do not pass in a file pointer\n    a tempfile.NamedTemporaryFile, or None if the file could not be \n    retrieved is returned.\n    The URI can be either an HTTP url, or \"s3://bucket_name/key_name\"\n    \"\"\"\n    boto.log.info('Fetching %s' % uri)\n    if file == None:\n        file = tempfile.NamedTemporaryFile()\n    try:\n        if uri.startswith('s3://'):\n            bucket_name, key_name = uri[len('s3://'):].split('/', 1)\n            c = boto.connect_s3(aws_access_key_id=username, aws_secret_access_key=password)\n            bucket = c.get_bucket(bucket_name)\n            key = bucket.get_key(key_name)\n            key.get_contents_to_file(file)\n        else:\n            if username and password:\n                passman = urllib2.HTTPPasswordMgrWithDefaultRealm()\n                passman.add_password(None, uri, username, password)\n                authhandler = urllib2.HTTPBasicAuthHandler(passman)\n                opener = urllib2.build_opener(authhandler)\n                urllib2.install_opener(opener)\n            s = urllib2.urlopen(uri)\n            file.write(s.read())\n        file.seek(0)\n    except:\n        raise\n        boto.log.exception('Problem Retrieving file: %s' % uri)\n        file = None\n    return file\n\nclass ShellCommand(object):\n\n    def __init__(self, command, wait=True, fail_fast=False, cwd = None):\n        self.exit_code = 0\n        self.command = command\n        self.log_fp = StringIO.StringIO()\n        self.wait = wait\n        self.fail_fast = fail_fast\n        self.run(cwd = cwd)\n\n    def run(self, cwd=None):\n        boto.log.info('running:%s' % self.command)\n        self.process = subprocess.Popen(self.command, shell=True, stdin=subprocess.PIPE,\n                                        stdout=subprocess.PIPE, stderr=subprocess.PIPE,\n                                        cwd=cwd)\n        if(self.wait):\n            while self.process.poll() == None:\n                time.sleep(1)\n                t = self.process.communicate()\n                self.log_fp.write(t[0])\n                self.log_fp.write(t[1])\n            boto.log.info(self.log_fp.getvalue())\n            self.exit_code = self.process.returncode\n\n            if self.fail_fast and self.exit_code != 0:\n                raise Exception(\"Command \" + self.command + \" failed with status \" + self.exit_code)\n\n            return self.exit_code\n\n    def setReadOnly(self, value):\n        raise AttributeError\n\n    def getStatus(self):\n        return self.exit_code\n\n    status = property(getStatus, setReadOnly, None, 'The exit code for the command')\n\n    def getOutput(self):\n        return self.log_fp.getvalue()\n\n    output = property(getOutput, setReadOnly, None, 'The STDIN and STDERR output of the command')\n\nclass AuthSMTPHandler(logging.handlers.SMTPHandler):\n    \"\"\"\n    This class extends the SMTPHandler in the standard Python logging module\n    to accept a username and password on the constructor and to then use those\n    credentials to authenticate with the SMTP server.  To use this, you could\n    add something like this in your boto config file:\n    \n    [handler_hand07]\n    class=boto.utils.AuthSMTPHandler\n    level=WARN\n    formatter=form07\n    args=('localhost', 'username', 'password', 'from@abc', ['user1@abc', 'user2@xyz'], 'Logger Subject')\n    \"\"\"\n\n    def __init__(self, mailhost, username, password, fromaddr, toaddrs, subject):\n        \"\"\"\n        Initialize the handler.\n\n        We have extended the constructor to accept a username/password\n        for SMTP authentication.\n        \"\"\"\n        logging.handlers.SMTPHandler.__init__(self, mailhost, fromaddr, toaddrs, subject)\n        self.username = username\n        self.password = password\n        \n    def emit(self, record):\n        \"\"\"\n        Emit a record.\n\n        Format the record and send it to the specified addressees.\n        It would be really nice if I could add authorization to this class\n        without having to resort to cut and paste inheritance but, no.\n        \"\"\"\n        try:\n            port = self.mailport\n            if not port:\n                port = smtplib.SMTP_PORT\n            smtp = smtplib.SMTP(self.mailhost, port)\n            smtp.login(self.username, self.password)\n            msg = self.format(record)\n            msg = \"From: %s\\r\\nTo: %s\\r\\nSubject: %s\\r\\nDate: %s\\r\\n\\r\\n%s\" % (\n                            self.fromaddr,\n                            ','.join(self.toaddrs),\n                            self.getSubject(record),\n                            formatdate(), msg)\n            smtp.sendmail(self.fromaddr, self.toaddrs, msg)\n            smtp.quit()\n        except (KeyboardInterrupt, SystemExit):\n            raise\n        except:\n            self.handleError(record)\n\nclass LRUCache(dict):\n    \"\"\"A dictionary-like object that stores only a certain number of items, and\n    discards its least recently used item when full.\n    \n    >>> cache = LRUCache(3)\n    >>> cache['A'] = 0\n    >>> cache['B'] = 1\n    >>> cache['C'] = 2\n    >>> len(cache)\n    3\n    \n    >>> cache['A']\n    0\n    \n    Adding new items to the cache does not increase its size. Instead, the least\n    recently used item is dropped:\n    \n    >>> cache['D'] = 3\n    >>> len(cache)\n    3\n    >>> 'B' in cache\n    False\n    \n    Iterating over the cache returns the keys, starting with the most recently\n    used:\n    \n    >>> for key in cache:\n    ...     print key\n    D\n    A\n    C\n\n    This code is based on the LRUCache class from Genshi which is based on\n    Mighty's LRUCache from ``myghtyutils.util``, written\n    by Mike Bayer and released under the MIT license (Genshi uses the\n    BSD License). See:\n\n      http://svn.myghty.org/myghtyutils/trunk/lib/myghtyutils/util.py\n    \"\"\"\n\n    class _Item(object):\n        def __init__(self, key, value):\n            self.previous = self.next = None\n            self.key = key\n            self.value = value\n        def __repr__(self):\n            return repr(self.value)\n\n    def __init__(self, capacity):\n        self._dict = dict()\n        self.capacity = capacity\n        self.head = None\n        self.tail = None\n\n    def __contains__(self, key):\n        return key in self._dict\n\n    def __iter__(self):\n        cur = self.head\n        while cur:\n            yield cur.key\n            cur = cur.next\n\n    def __len__(self):\n        return len(self._dict)\n\n    def __getitem__(self, key):\n        item = self._dict[key]\n        self._update_item(item)\n        return item.value\n\n    def __setitem__(self, key, value):\n        item = self._dict.get(key)\n        if item is None:\n            item = self._Item(key, value)\n            self._dict[key] = item\n            self._insert_item(item)\n        else:\n            item.value = value\n            self._update_item(item)\n            self._manage_size()\n\n    def __repr__(self):\n        return repr(self._dict)\n\n    def _insert_item(self, item):\n        item.previous = None\n        item.next = self.head\n        if self.head is not None:\n            self.head.previous = item\n        else:\n            self.tail = item\n        self.head = item\n        self._manage_size()\n\n    def _manage_size(self):\n        while len(self._dict) > self.capacity:\n            del self._dict[self.tail.key]\n            if self.tail != self.head:\n                self.tail = self.tail.previous\n                self.tail.next = None\n            else:\n                self.head = self.tail = None\n\n    def _update_item(self, item):\n        if self.head == item:\n            return\n\n        previous = item.previous\n        previous.next = item.next\n        if item.next is not None:\n            item.next.previous = previous\n        else:\n            self.tail = previous\n\n        item.previous = None\n        item.next = self.head\n        self.head.previous = self.head = item\n\nclass Password(object):\n    \"\"\"\n    Password object that stores itself as hashed.\n    Hash defaults to SHA512 if available, MD5 otherwise.\n    \"\"\"\n    hashfunc=_hashfn\n    def __init__(self, str=None, hashfunc=None):\n        \"\"\"\n        Load the string from an initial value, this should be the raw hashed password.\n        \"\"\"\n        self.str = str\n        if hashfunc:\n           self.hashfunc = hashfunc\n\n    def set(self, value):\n        self.str = self.hashfunc(value).hexdigest()\n   \n    def __str__(self):\n        return str(self.str)\n   \n    def __eq__(self, other):\n        if other == None:\n            return False\n        return str(self.hashfunc(other).hexdigest()) == str(self.str)\n\n    def __len__(self):\n        if self.str:\n            return len(self.str)\n        else:\n            return 0\n\ndef notify(subject, body=None, html_body=None, to_string=None, attachments=None, append_instance_id=True):\n    attachments = attachments or []\n    if append_instance_id:\n        subject = \"[%s] %s\" % (boto.config.get_value(\"Instance\", \"instance-id\"), subject)\n    if not to_string:\n        to_string = boto.config.get_value('Notification', 'smtp_to', None)\n    if to_string:\n        try:\n            from_string = boto.config.get_value('Notification', 'smtp_from', 'boto')\n            msg = MIMEMultipart()\n            msg['From'] = from_string\n            msg['Reply-To'] = from_string\n            msg['To'] = to_string\n            msg['Date'] = formatdate(localtime=True)\n            msg['Subject'] = subject\n        \n            if body:\n                msg.attach(MIMEText(body))\n\n            if html_body:\n                part = MIMEBase('text', 'html')\n                part.set_payload(html_body)\n                Encoders.encode_base64(part)\n                msg.attach(part)\n\n            for part in attachments:\n                msg.attach(part)\n\n            smtp_host = boto.config.get_value('Notification', 'smtp_host', 'localhost')\n\n            # Alternate port support\n            if boto.config.get_value(\"Notification\", \"smtp_port\"):\n                server = smtplib.SMTP(smtp_host, int(boto.config.get_value(\"Notification\", \"smtp_port\")))\n            else:\n                server = smtplib.SMTP(smtp_host)\n\n            # TLS support\n            if boto.config.getbool(\"Notification\", \"smtp_tls\"):\n                server.ehlo()\n                server.starttls()\n                server.ehlo()\n            smtp_user = boto.config.get_value('Notification', 'smtp_user', '')\n            smtp_pass = boto.config.get_value('Notification', 'smtp_pass', '')\n            if smtp_user:\n                server.login(smtp_user, smtp_pass)\n            server.sendmail(from_string, to_string, msg.as_string())\n            server.quit()\n        except:\n            boto.log.exception('notify failed')\n\ndef get_utf8_value(value):\n    if not isinstance(value, str) and not isinstance(value, unicode):\n        value = str(value)\n    if isinstance(value, unicode):\n        return value.encode('utf-8')\n    else:\n        return value\n\ndef mklist(value):\n    if not isinstance(value, list):\n        if isinstance(value, tuple):\n            value = list(value)\n        else:\n            value = [value]\n    return value\n\ndef pythonize_name(name, sep='_'):\n    s = ''\n    if name[0].isupper:\n        s = name[0].lower()\n    for c in name[1:]:\n        if c.isupper():\n            s += sep + c.lower()\n        else:\n            s += c\n    return s\n\ndef write_mime_multipart(content, compress=False, deftype='text/plain', delimiter=':'):\n    \"\"\"Description:\n    :param content: A list of tuples of name-content pairs. This is used\n    instead of a dict to ensure that scripts run in order\n    :type list of tuples:\n\n    :param compress: Use gzip to compress the scripts, defaults to no compression\n    :type bool:\n\n    :param deftype: The type that should be assumed if nothing else can be figured out\n    :type str:\n\n    :param delimiter: mime delimiter\n    :type str:\n\n    :return: Final mime multipart\n    :rtype: str:\n    \"\"\"\n    wrapper = MIMEMultipart()\n    for name,con in content:\n        definite_type = guess_mime_type(con, deftype)\n        maintype, subtype = definite_type.split('/', 1)\n        if maintype == 'text':\n            mime_con = MIMEText(con, _subtype=subtype)\n        else:\n            mime_con = MIMEBase(maintype, subtype)\n            mime_con.set_payload(con)\n            # Encode the payload using Base64\n            Encoders.encode_base64(mime_con)\n        mime_con.add_header('Content-Disposition', 'attachment', filename=name)\n        wrapper.attach(mime_con)\n    rcontent = wrapper.as_string()\n\n    if compress:\n        buf = StringIO.StringIO()\n        gz = gzip.GzipFile(mode='wb', fileobj=buf)\n        try:\n            gz.write(rcontent)\n        finally:\n            gz.close()\n        rcontent = buf.getvalue()\n\n    return rcontent\n\ndef guess_mime_type(content, deftype):\n    \"\"\"Description: Guess the mime type of a block of text\n    :param content: content we're finding the type of\n    :type str:\n\n    :param deftype: Default mime type\n    :type str:\n\n    :rtype: <type>:\n    :return: <description>\n    \"\"\"\n    #Mappings recognized by cloudinit\n    starts_with_mappings={\n        '#include' : 'text/x-include-url',\n        '#!' : 'text/x-shellscript',\n        '#cloud-config' : 'text/cloud-config',\n        '#upstart-job'  : 'text/upstart-job',\n        '#part-handler' : 'text/part-handler',\n        '#cloud-boothook' : 'text/cloud-boothook'\n    }\n    rtype = deftype\n    for possible_type,mimetype in starts_with_mappings.items():\n        if content.startswith(possible_type):\n            rtype = mimetype\n            break\n    return(rtype)\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/vpc/__init__.py",
    "content": "# Copyright (c) 2009 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\n\"\"\"\nRepresents a connection to the EC2 service.\n\"\"\"\n\nfrom boto.ec2.connection import EC2Connection\nfrom boto.resultset import ResultSet\nfrom boto.vpc.vpc import VPC\nfrom boto.vpc.customergateway import CustomerGateway\nfrom boto.vpc.routetable import RouteTable\nfrom boto.vpc.internetgateway import InternetGateway\nfrom boto.vpc.vpngateway import VpnGateway, Attachment\nfrom boto.vpc.dhcpoptions import DhcpOptions\nfrom boto.vpc.subnet import Subnet\nfrom boto.vpc.vpnconnection import VpnConnection\n\nclass VPCConnection(EC2Connection):\n\n    # VPC methods\n\n    def get_all_vpcs(self, vpc_ids=None, filters=None):\n        \"\"\"\n        Retrieve information about your VPCs.  You can filter results to\n        return information only about those VPCs that match your search\n        parameters.  Otherwise, all VPCs associated with your account\n        are returned.\n\n        :type vpc_ids: list\n        :param vpc_ids: A list of strings with the desired VPC ID's\n\n        :type filters: list of tuples\n        :param filters: A list of tuples containing filters.  Each tuple\n                        consists of a filter key and a filter value.\n                        Possible filter keys are:\n\n                        - *state*, the state of the VPC (pending or available)\n                        - *cidrBlock*, CIDR block of the VPC\n                        - *dhcpOptionsId*, the ID of a set of DHCP options\n\n        :rtype: list\n        :return: A list of :class:`boto.vpc.vpc.VPC`\n        \"\"\"\n        params = {}\n        if vpc_ids:\n            self.build_list_params(params, vpc_ids, 'VpcId')\n        if filters:\n            i = 1\n            for filter in filters:\n                params[('Filter.%d.Name' % i)] = filter[0]\n                params[('Filter.%d.Value.1' % i)] = filter[1]\n                i += 1\n        return self.get_list('DescribeVpcs', params, [('item', VPC)])\n\n    def create_vpc(self, cidr_block):\n        \"\"\"\n        Create a new Virtual Private Cloud.\n\n        :type cidr_block: str\n        :param cidr_block: A valid CIDR block\n\n        :rtype: The newly created VPC\n        :return: A :class:`boto.vpc.vpc.VPC` object\n        \"\"\"\n        params = {'CidrBlock' : cidr_block}\n        return self.get_object('CreateVpc', params, VPC)\n\n    def delete_vpc(self, vpc_id):\n        \"\"\"\n        Delete a Virtual Private Cloud.\n\n        :type vpc_id: str\n        :param vpc_id: The ID of the vpc to be deleted.\n\n        :rtype: bool\n        :return: True if successful\n        \"\"\"\n        params = {'VpcId': vpc_id}\n        return self.get_status('DeleteVpc', params)\n\n    # Route Tables\n\n    def get_all_route_tables(self, route_table_ids=None, filters=None):\n        \"\"\"\n        Retrieve information about your routing tables. You can filter results\n        to return information only about those route tables that match your\n        search parameters. Otherwise, all route tables associated with your\n        account are returned.\n\n        :type route_table_ids: list\n        :param route_table_ids: A list of strings with the desired route table\n                                IDs.\n\n        :type filters: list of tuples\n        :param filters: A list of tuples containing filters. Each tuple\n                        consists of a filter key and a filter value.\n\n        :rtype: list\n        :return: A list of :class:`boto.vpc.routetable.RouteTable`\n        \"\"\"\n        params = {}\n        if route_table_ids:\n            self.build_list_params(params, route_table_ids, \"RouteTableId\")\n        if filters:\n            self.build_filter_params(params, dict(filters))\n        return self.get_list('DescribeRouteTables', params, [('item', RouteTable)])\n\n    def associate_route_table(self, route_table_id, subnet_id):\n        \"\"\"\n        Associates a route table with a specific subnet.\n\n        :type route_table_id: str\n        :param route_table_id: The ID of the route table to associate.\n\n        :type subnet_id: str\n        :param subnet_id: The ID of the subnet to associate with.\n\n        :rtype: str\n        :return: The ID of the association created\n        \"\"\"\n        params = {\n            'RouteTableId': route_table_id,\n            'SubnetId': subnet_id\n        }\n\n        result = self.get_object('AssociateRouteTable', params, ResultSet)\n        return result.associationId\n\n    def disassociate_route_table(self, association_id):\n        \"\"\"\n        Removes an association from a route table. This will cause all subnets\n        that would've used this association to now use the main routing\n        association instead.\n\n        :type association_id: str\n        :param association_id: The ID of the association to disassociate.\n\n        :rtype: bool\n        :return: True if successful\n        \"\"\"\n        params = { 'AssociationId': association_id }\n        return self.get_status('DisassociateRouteTable', params)\n\n    def create_route_table(self, vpc_id):\n        \"\"\"\n        Creates a new route table.\n\n        :type vpc_id: str\n        :param vpc_id: The VPC ID to associate this route table with.\n\n        :rtype: The newly created route table\n        :return: A :class:`boto.vpc.routetable.RouteTable` object\n        \"\"\"\n        params = { 'VpcId': vpc_id }\n        return self.get_object('CreateRouteTable', params, RouteTable)\n\n    def delete_route_table(self, route_table_id):\n        \"\"\"\n        Delete a route table.\n\n        :type route_table_id: str\n        :param route_table_id: The ID of the route table to delete.\n\n        :rtype: bool\n        :return: True if successful\n        \"\"\"\n        params = { 'RouteTableId': route_table_id }\n        return self.get_status('DeleteRouteTable', params)\n\n    def create_route(self, route_table_id, destination_cidr_block, gateway_id=None, instance_id=None):\n        \"\"\"\n        Creates a new route in the route table within a VPC. The route's target\n        can be either a gateway attached to the VPC or a NAT instance in the\n        VPC.\n\n        :type route_table_id: str\n        :param route_table_id: The ID of the route table for the route.\n\n        :type destination_cidr_block: str\n        :param destination_cidr_block: The CIDR address block used for the\n                                       destination match.\n\n        :type gateway_id: str\n        :param gateway_id: The ID of the gateway attached to your VPC.\n\n        :type instance_id: str\n        :param instance_id: The ID of a NAT instance in your VPC.\n\n        :rtype: bool\n        :return: True if successful\n        \"\"\"\n        params = {\n            'RouteTableId': route_table_id,\n            'DestinationCidrBlock': destination_cidr_block\n        }\n\n        if gateway_id is not None:\n            params['GatewayId'] = gateway_id\n        elif instance_id is not None:\n            params['InstanceId'] = instance_id\n\n        return self.get_status('CreateRoute', params)\n\n    def delete_route(self, route_table_id, destination_cidr_block):\n        \"\"\"\n        Deletes a route from a route table within a VPC.\n\n        :type route_table_id: str\n        :param route_table_id: The ID of the route table with the route.\n\n        :type destination_cidr_block: str\n        :param destination_cidr_block: The CIDR address block used for\n                                       destination match.\n\n        :rtype: bool\n        :return: True if successful\n        \"\"\"\n        params = {\n            'RouteTableId': route_table_id,\n            'DestinationCidrBlock': destination_cidr_block\n        }\n\n        return self.get_status('DeleteRoute', params)\n\n    # Internet Gateways\n\n    def get_all_internet_gateways(self, internet_gateway_ids=None, filters=None):\n        \"\"\"\n        Get a list of internet gateways. You can filter results to return information\n        about only those gateways that you're interested in.\n\n        :type internet_gateway_ids: list\n        :param internet_gateway_ids: A list of strings with the desired gateway IDs.\n\n        :type filters: list of tuples\n        :param filters: A list of tuples containing filters.  Each tuple\n                        consists of a filter key and a filter value.\n        \"\"\"\n        params = {}\n\n        if internet_gateway_ids:\n            self.build_list_params(params, internet_gateway_ids, 'InternetGatewayId')\n        if filters:\n            self.build_filter_params(params, dict(filters))\n\n        return self.get_list('DescribeInternetGateways', params, [('item', InternetGateway)])\n\n    def create_internet_gateway(self):\n        \"\"\"\n        Creates an internet gateway for VPC.\n\n        :rtype: Newly created internet gateway.\n        :return: `boto.vpc.internetgateway.InternetGateway`\n        \"\"\"\n        return self.get_object('CreateInternetGateway', {}, InternetGateway)\n\n    def delete_internet_gateway(self, internet_gateway_id):\n        \"\"\"\n        Deletes an internet gateway from the VPC.\n\n        :type internet_gateway_id: str\n        :param internet_gateway_id: The ID of the internet gateway to delete.\n\n        :rtype: Bool\n        :return: True if successful\n        \"\"\"\n        params = { 'InternetGatewayId': internet_gateway_id }\n        return self.get_status('DeleteInternetGateway', params)\n\n    def attach_internet_gateway(self, internet_gateway_id, vpc_id):\n        \"\"\"\n        Attach an internet gateway to a specific VPC.\n\n        :type internet_gateway_id: str\n        :param internet_gateway_id: The ID of the internet gateway to delete.\n\n        :type vpc_id: str\n        :param vpc_id: The ID of the VPC to attach to.\n\n        :rtype: Bool\n        :return: True if successful\n        \"\"\"\n        params = {\n            'InternetGatewayId': internet_gateway_id,\n            'VpcId': vpc_id\n        }\n\n        return self.get_status('AttachInternetGateway', params)\n\n    def detach_internet_gateway(self, internet_gateway_id, vpc_id):\n        \"\"\"\n        Detach an internet gateway from a specific VPC.\n\n        :type internet_gateway_id: str\n        :param internet_gateway_id: The ID of the internet gateway to delete.\n\n        :type vpc_id: str\n        :param vpc_id: The ID of the VPC to attach to.\n\n        :rtype: Bool\n        :return: True if successful\n        \"\"\"\n        params = {\n            'InternetGatewayId': internet_gateway_id,\n            'VpcId': vpc_id\n        }\n\n        return self.get_status('DetachInternetGateway', params)\n\n    # Customer Gateways\n\n    def get_all_customer_gateways(self, customer_gateway_ids=None, filters=None):\n        \"\"\"\n        Retrieve information about your CustomerGateways.  You can filter results to\n        return information only about those CustomerGateways that match your search\n        parameters.  Otherwise, all CustomerGateways associated with your account\n        are returned.\n\n        :type customer_gateway_ids: list\n        :param customer_gateway_ids: A list of strings with the desired CustomerGateway ID's\n\n        :type filters: list of tuples\n        :param filters: A list of tuples containing filters.  Each tuple\n                        consists of a filter key and a filter value.\n                        Possible filter keys are:\n\n                         - *state*, the state of the CustomerGateway\n                           (pending,available,deleting,deleted)\n                         - *type*, the type of customer gateway (ipsec.1)\n                         - *ipAddress* the IP address of customer gateway's\n                           internet-routable external inteface\n\n        :rtype: list\n        :return: A list of :class:`boto.vpc.customergateway.CustomerGateway`\n        \"\"\"\n        params = {}\n        if customer_gateway_ids:\n            self.build_list_params(params, customer_gateway_ids, 'CustomerGatewayId')\n        if filters:\n            i = 1\n            for filter in filters:\n                params[('Filter.%d.Name' % i)] = filter[0]\n                params[('Filter.%d.Value.1')] = filter[1]\n                i += 1\n        return self.get_list('DescribeCustomerGateways', params, [('item', CustomerGateway)])\n\n    def create_customer_gateway(self, type, ip_address, bgp_asn):\n        \"\"\"\n        Create a new Customer Gateway\n\n        :type type: str\n        :param type: Type of VPN Connection.  Only valid valid currently is 'ipsec.1'\n\n        :type ip_address: str\n        :param ip_address: Internet-routable IP address for customer's gateway.\n                           Must be a static address.\n\n        :type bgp_asn: str\n        :param bgp_asn: Customer gateway's Border Gateway Protocol (BGP)\n                        Autonomous System Number (ASN)\n\n        :rtype: The newly created CustomerGateway\n        :return: A :class:`boto.vpc.customergateway.CustomerGateway` object\n        \"\"\"\n        params = {'Type' : type,\n                  'IpAddress' : ip_address,\n                  'BgpAsn' : bgp_asn}\n        return self.get_object('CreateCustomerGateway', params, CustomerGateway)\n\n    def delete_customer_gateway(self, customer_gateway_id):\n        \"\"\"\n        Delete a Customer Gateway.\n\n        :type customer_gateway_id: str\n        :param customer_gateway_id: The ID of the customer_gateway to be deleted.\n\n        :rtype: bool\n        :return: True if successful\n        \"\"\"\n        params = {'CustomerGatewayId': customer_gateway_id}\n        return self.get_status('DeleteCustomerGateway', params)\n\n    # VPN Gateways\n\n    def get_all_vpn_gateways(self, vpn_gateway_ids=None, filters=None):\n        \"\"\"\n        Retrieve information about your VpnGateways.  You can filter results to\n        return information only about those VpnGateways that match your search\n        parameters.  Otherwise, all VpnGateways associated with your account\n        are returned.\n\n        :type vpn_gateway_ids: list\n        :param vpn_gateway_ids: A list of strings with the desired VpnGateway ID's\n\n        :type filters: list of tuples\n        :param filters: A list of tuples containing filters.  Each tuple\n                        consists of a filter key and a filter value.\n                        Possible filter keys are:\n\n                        - *state*, the state of the VpnGateway\n                          (pending,available,deleting,deleted)\n                        - *type*, the type of customer gateway (ipsec.1)\n                        - *availabilityZone*, the Availability zone the\n                          VPN gateway is in.\n\n        :rtype: list\n        :return: A list of :class:`boto.vpc.customergateway.VpnGateway`\n        \"\"\"\n        params = {}\n        if vpn_gateway_ids:\n            self.build_list_params(params, vpn_gateway_ids, 'VpnGatewayId')\n        if filters:\n            i = 1\n            for filter in filters:\n                params[('Filter.%d.Name' % i)] = filter[0]\n                params[('Filter.%d.Value.1')] = filter[1]\n                i += 1\n        return self.get_list('DescribeVpnGateways', params, [('item', VpnGateway)])\n\n    def create_vpn_gateway(self, type, availability_zone=None):\n        \"\"\"\n        Create a new Vpn Gateway\n\n        :type type: str\n        :param type: Type of VPN Connection.  Only valid valid currently is 'ipsec.1'\n\n        :type availability_zone: str\n        :param availability_zone: The Availability Zone where you want the VPN gateway.\n\n        :rtype: The newly created VpnGateway\n        :return: A :class:`boto.vpc.vpngateway.VpnGateway` object\n        \"\"\"\n        params = {'Type' : type}\n        if availability_zone:\n            params['AvailabilityZone'] = availability_zone\n        return self.get_object('CreateVpnGateway', params, VpnGateway)\n\n    def delete_vpn_gateway(self, vpn_gateway_id):\n        \"\"\"\n        Delete a Vpn Gateway.\n\n        :type vpn_gateway_id: str\n        :param vpn_gateway_id: The ID of the vpn_gateway to be deleted.\n\n        :rtype: bool\n        :return: True if successful\n        \"\"\"\n        params = {'VpnGatewayId': vpn_gateway_id}\n        return self.get_status('DeleteVpnGateway', params)\n\n    def attach_vpn_gateway(self, vpn_gateway_id, vpc_id):\n        \"\"\"\n        Attaches a VPN gateway to a VPC.\n\n        :type vpn_gateway_id: str\n        :param vpn_gateway_id: The ID of the vpn_gateway to attach\n\n        :type vpc_id: str\n        :param vpc_id: The ID of the VPC you want to attach the gateway to.\n\n        :rtype: An attachment\n        :return: a :class:`boto.vpc.vpngateway.Attachment`\n        \"\"\"\n        params = {'VpnGatewayId': vpn_gateway_id,\n                  'VpcId' : vpc_id}\n        return self.get_object('AttachVpnGateway', params, Attachment)\n\n    # Subnets\n\n    def get_all_subnets(self, subnet_ids=None, filters=None):\n        \"\"\"\n        Retrieve information about your Subnets.  You can filter results to\n        return information only about those Subnets that match your search\n        parameters.  Otherwise, all Subnets associated with your account\n        are returned.\n\n        :type subnet_ids: list\n        :param subnet_ids: A list of strings with the desired Subnet ID's\n\n        :type filters: list of tuples\n        :param filters: A list of tuples containing filters.  Each tuple\n                        consists of a filter key and a filter value.\n                        Possible filter keys are:\n\n                        - *state*, the state of the Subnet\n                          (pending,available)\n                        - *vpdId*, the ID of teh VPC the subnet is in.\n                        - *cidrBlock*, CIDR block of the subnet\n                        - *availabilityZone*, the Availability Zone\n                          the subnet is in.\n\n\n        :rtype: list\n        :return: A list of :class:`boto.vpc.subnet.Subnet`\n        \"\"\"\n        params = {}\n        if subnet_ids:\n            self.build_list_params(params, subnet_ids, 'SubnetId')\n        if filters:\n            i = 1\n            for filter in filters:\n                params[('Filter.%d.Name' % i)] = filter[0]\n                params[('Filter.%d.Value.1' % i)] = filter[1]\n                i += 1\n        return self.get_list('DescribeSubnets', params, [('item', Subnet)])\n\n    def create_subnet(self, vpc_id, cidr_block, availability_zone=None):\n        \"\"\"\n        Create a new Subnet\n\n        :type vpc_id: str\n        :param vpc_id: The ID of the VPC where you want to create the subnet.\n\n        :type cidr_block: str\n        :param cidr_block: The CIDR block you want the subnet to cover.\n\n        :type availability_zone: str\n        :param availability_zone: The AZ you want the subnet in\n\n        :rtype: The newly created Subnet\n        :return: A :class:`boto.vpc.customergateway.Subnet` object\n        \"\"\"\n        params = {'VpcId' : vpc_id,\n                  'CidrBlock' : cidr_block}\n        if availability_zone:\n            params['AvailabilityZone'] = availability_zone\n        return self.get_object('CreateSubnet', params, Subnet)\n\n    def delete_subnet(self, subnet_id):\n        \"\"\"\n        Delete a subnet.\n\n        :type subnet_id: str\n        :param subnet_id: The ID of the subnet to be deleted.\n\n        :rtype: bool\n        :return: True if successful\n        \"\"\"\n        params = {'SubnetId': subnet_id}\n        return self.get_status('DeleteSubnet', params)\n\n\n    # DHCP Options\n\n    def get_all_dhcp_options(self, dhcp_options_ids=None):\n        \"\"\"\n        Retrieve information about your DhcpOptions.\n\n        :type dhcp_options_ids: list\n        :param dhcp_options_ids: A list of strings with the desired DhcpOption ID's\n\n        :rtype: list\n        :return: A list of :class:`boto.vpc.dhcpoptions.DhcpOptions`\n        \"\"\"\n        params = {}\n        if dhcp_options_ids:\n            self.build_list_params(params, dhcp_options_ids, 'DhcpOptionsId')\n        return self.get_list('DescribeDhcpOptions', params, [('item', DhcpOptions)])\n\n    def create_dhcp_options(self, vpc_id, cidr_block, availability_zone=None):\n        \"\"\"\n        Create a new DhcpOption\n\n        :type vpc_id: str\n        :param vpc_id: The ID of the VPC where you want to create the subnet.\n\n        :type cidr_block: str\n        :param cidr_block: The CIDR block you want the subnet to cover.\n\n        :type availability_zone: str\n        :param availability_zone: The AZ you want the subnet in\n\n        :rtype: The newly created DhcpOption\n        :return: A :class:`boto.vpc.customergateway.DhcpOption` object\n        \"\"\"\n        params = {'VpcId' : vpc_id,\n                  'CidrBlock' : cidr_block}\n        if availability_zone:\n            params['AvailabilityZone'] = availability_zone\n        return self.get_object('CreateDhcpOption', params, DhcpOptions)\n\n    def delete_dhcp_options(self, dhcp_options_id):\n        \"\"\"\n        Delete a DHCP Options\n\n        :type dhcp_options_id: str\n        :param dhcp_options_id: The ID of the DHCP Options to be deleted.\n\n        :rtype: bool\n        :return: True if successful\n        \"\"\"\n        params = {'DhcpOptionsId': dhcp_options_id}\n        return self.get_status('DeleteDhcpOptions', params)\n\n    def associate_dhcp_options(self, dhcp_options_id, vpc_id):\n        \"\"\"\n        Associate a set of Dhcp Options with a VPC.\n\n        :type dhcp_options_id: str\n        :param dhcp_options_id: The ID of the Dhcp Options\n\n        :type vpc_id: str\n        :param vpc_id: The ID of the VPC.\n\n        :rtype: bool\n        :return: True if successful\n        \"\"\"\n        params = {'DhcpOptionsId': dhcp_options_id,\n                  'VpcId' : vpc_id}\n        return self.get_status('AssociateDhcpOptions', params)\n\n    # VPN Connection\n\n    def get_all_vpn_connections(self, vpn_connection_ids=None, filters=None):\n        \"\"\"\n        Retrieve information about your VPN_CONNECTIONs.  You can filter results to\n        return information only about those VPN_CONNECTIONs that match your search\n        parameters.  Otherwise, all VPN_CONNECTIONs associated with your account\n        are returned.\n\n        :type vpn_connection_ids: list\n        :param vpn_connection_ids: A list of strings with the desired VPN_CONNECTION ID's\n\n        :type filters: list of tuples\n        :param filters: A list of tuples containing filters.  Each tuple\n                        consists of a filter key and a filter value.\n                        Possible filter keys are:\n\n                        - *state*, the state of the VPN_CONNECTION\n                          pending,available,deleting,deleted\n                        - *type*, the type of connection, currently 'ipsec.1'\n                        - *customerGatewayId*, the ID of the customer gateway\n                          associated with the VPN\n                        - *vpnGatewayId*, the ID of the VPN gateway associated\n                          with the VPN connection\n\n        :rtype: list\n        :return: A list of :class:`boto.vpn_connection.vpnconnection.VpnConnection`\n        \"\"\"\n        params = {}\n        if vpn_connection_ids:\n            self.build_list_params(params, vpn_connection_ids, 'Vpn_ConnectionId')\n        if filters:\n            i = 1\n            for filter in filters:\n                params[('Filter.%d.Name' % i)] = filter[0]\n                params[('Filter.%d.Value.1')] = filter[1]\n                i += 1\n        return self.get_list('DescribeVpnConnections', params, [('item', VpnConnection)])\n\n    def create_vpn_connection(self, type, customer_gateway_id, vpn_gateway_id):\n        \"\"\"\n        Create a new VPN Connection.\n\n        :type type: str\n        :param type: The type of VPN Connection.  Currently only 'ipsec.1'\n                     is supported\n\n        :type customer_gateway_id: str\n        :param customer_gateway_id: The ID of the customer gateway.\n\n        :type vpn_gateway_id: str\n        :param vpn_gateway_id: The ID of the VPN gateway.\n\n        :rtype: The newly created VpnConnection\n        :return: A :class:`boto.vpc.vpnconnection.VpnConnection` object\n        \"\"\"\n        params = {'Type' : type,\n                  'CustomerGatewayId' : customer_gateway_id,\n                  'VpnGatewayId' : vpn_gateway_id}\n        return self.get_object('CreateVpnConnection', params, VpnConnection)\n\n    def delete_vpn_connection(self, vpn_connection_id):\n        \"\"\"\n        Delete a VPN Connection.\n\n        :type vpn_connection_id: str\n        :param vpn_connection_id: The ID of the vpn_connection to be deleted.\n\n        :rtype: bool\n        :return: True if successful\n        \"\"\"\n        params = {'VpnConnectionId': vpn_connection_id}\n        return self.get_status('DeleteVpnConnection', params)\n\n\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/vpc/customergateway.py",
    "content": "# Copyright (c) 2009-2010 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\n\"\"\"\nRepresents a Customer Gateway\n\"\"\"\n\nfrom boto.ec2.ec2object import TaggedEC2Object\n\nclass CustomerGateway(TaggedEC2Object):\n\n    def __init__(self, connection=None):\n        TaggedEC2Object.__init__(self, connection)\n        self.id = None\n        self.type = None\n        self.state = None\n        self.ip_address = None\n        self.bgp_asn = None\n\n    def __repr__(self):\n        return 'CustomerGateway:%s' % self.id\n    \n    def endElement(self, name, value, connection):\n        if name == 'customerGatewayId':\n            self.id = value\n        elif name == 'ipAddress':\n            self.ip_address = value\n        elif name == 'type':\n            self.type = value\n        elif name == 'state':\n            self.state = value\n        elif name == 'bgpAsn':\n            self.bgp_asn = value\n        else:\n            setattr(self, name, value)\n\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/vpc/dhcpoptions.py",
    "content": "# Copyright (c) 2009-2010 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\n\"\"\"\nRepresents a DHCP Options set\n\"\"\"\n\nfrom boto.ec2.ec2object import TaggedEC2Object\n\nclass DhcpValueSet(list):\n\n    def startElement(self, name, attrs, connection):\n        pass\n\n    def endElement(self, name, value, connection):\n        if name == 'value':\n            self.append(value)\n    \nclass DhcpConfigSet(dict):\n\n    def startElement(self, name, attrs, connection):\n        if name == 'valueSet':\n            if not self.has_key(self._name):\n                self[self._name] = DhcpValueSet()\n            return self[self._name]\n\n    def endElement(self, name, value, connection):\n        if name == 'key':\n            self._name = value\n    \nclass DhcpOptions(TaggedEC2Object):\n\n    def __init__(self, connection=None):\n        TaggedEC2Object.__init__(self, connection)\n        self.id = None\n        self.options = None\n\n    def __repr__(self):\n        return 'DhcpOptions:%s' % self.id\n    \n    def startElement(self, name, attrs, connection):\n        retval = TaggedEC2Object.startElement(self, name, attrs, connection)\n        if retval is not None:\n            return retval\n        if name == 'dhcpConfigurationSet':\n            self.options = DhcpConfigSet()\n            return self.options\n\n    def endElement(self, name, value, connection):\n        if name == 'dhcpOptionsId':\n            self.id = value\n        else:\n            setattr(self, name, value)\n\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/vpc/internetgateway.py",
    "content": "# Copyright (c) 2009-2010 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\n\"\"\"\nRepresents an Internet Gateway\n\"\"\"\n\nfrom boto.ec2.ec2object import TaggedEC2Object\nfrom boto.resultset import ResultSet\n\nclass InternetGateway(TaggedEC2Object):\n    def __init__(self, connection=None):\n        TaggedEC2Object.__init__(self, connection)\n        self.id = None\n        self.attachments = []\n\n    def __repr__(self):\n        return 'InternetGateway:%s' % self.id\n\n    def startElement(self, name, attrs, connection):\n        result = super(InternetGateway, self).startElement(name, attrs, connection)\n\n        if result is not None:\n            # Parent found an interested element, just return it\n            return result\n\n        if name == 'attachmentSet':\n            self.attachments = ResultSet([('item', InternetGatewayAttachment)])\n            return self.attachments\n        else:\n            return None\n\n    def endElement(self, name, value, connection):\n        if name == 'internetGatewayId':\n            self.id = value\n        else:\n            setattr(self, name, value)\n\nclass InternetGatewayAttachment(object):\n    def __init__(self, connection=None):\n        self.vpc_id = None\n        self.state = None\n\n    def __repr__(self):\n        return 'InternetGatewayAttachment:%s' % self.vpc_id\n\n    def startElement(self, name, attrs, connection):\n        return None\n\n    def endElement(self, name, value, connection):\n        if name == 'vpcId':\n            self.vpc_id = value\n        elif name == 'state':\n            self.state = value\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/vpc/routetable.py",
    "content": "# Copyright (c) 2009-2010 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\n\"\"\"\nRepresents a Route Table\n\"\"\"\n\nfrom boto.ec2.ec2object import TaggedEC2Object\nfrom boto.resultset import ResultSet\n\nclass RouteTable(TaggedEC2Object):\n\n    def __init__(self, connection=None):\n        TaggedEC2Object.__init__(self, connection)\n        self.id = None\n        self.vpc_id = None\n        self.routes = []\n        self.associations = []\n\n    def __repr__(self):\n        return 'RouteTable:%s' % self.id\n\n    def startElement(self, name, attrs, connection):\n        result = super(RouteTable, self).startElement(name, attrs, connection)\n\n        if result is not None:\n            # Parent found an interested element, just return it\n            return result\n\n        if name == 'routeSet':\n            self.routes = ResultSet([('item', Route)])\n            return self.routes\n        elif name == 'associationSet':\n            self.associations = ResultSet([('item', RouteAssociation)])\n            return self.associations\n        else:\n            return None\n\n    def endElement(self, name, value, connection):\n        if name == 'routeTableId':\n            self.id = value\n        elif name == 'vpcId':\n            self.vpc_id = value\n        else:\n            setattr(self, name, value)\n\nclass Route(object):\n    def __init__(self, connection=None):\n        self.destination_cidr_block = None\n        self.gateway_id = None\n        self.instance_id = None\n        self.state = None\n\n    def __repr__(self):\n        return 'Route:%s' % self.destination_cidr_block\n\n    def startElement(self, name, attrs, connection):\n        return None\n\n    def endElement(self, name, value, connection):\n        if name == 'destinationCidrBlock':\n            self.destination_cidr_block = value\n        elif name == 'gatewayId':\n            self.gateway_id = value\n        elif name == 'instanceId':\n            self.instance_id = value\n        elif name == 'state':\n            self.state = value\n\nclass RouteAssociation(object):\n    def __init__(self, connection=None):\n        self.id = None\n        self.route_table_id = None\n        self.subnet_id = None\n        self.main = False\n\n    def __repr__(self):\n        return 'RouteAssociation:%s' % self.id\n\n    def startElement(self, name, attrs, connection):\n        return None\n\n    def endElement(self, name, value, connection):\n        if name == 'routeTableAssociationId':\n            self.id = value\n        elif name == 'routeTableId':\n            self.route_table_id = value\n        elif name == 'subnetId':\n            self.subnet_id = value\n        elif name == 'main':\n            self.main = value == 'true'\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/vpc/subnet.py",
    "content": "# Copyright (c) 2009-2010 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\n\"\"\"\nRepresents a Subnet\n\"\"\"\n\nfrom boto.ec2.ec2object import TaggedEC2Object\n\nclass Subnet(TaggedEC2Object):\n\n    def __init__(self, connection=None):\n        TaggedEC2Object.__init__(self, connection)\n        self.id = None\n        self.vpc_id = None\n        self.state = None\n        self.cidr_block = None\n        self.available_ip_address_count = 0\n        self.availability_zone = None\n\n    def __repr__(self):\n        return 'Subnet:%s' % self.id\n\n    def endElement(self, name, value, connection):\n        if name == 'subnetId':\n            self.id = value\n        elif name == 'vpcId':\n            self.vpc_id = value\n        elif name == 'state':\n            self.state = value\n        elif name == 'cidrBlock':\n            self.cidr_block = value\n        elif name == 'availableIpAddressCount':\n            self.available_ip_address_count = int(value)\n        elif name == 'availabilityZone':\n            self.availability_zone = value\n        else:\n            setattr(self, name, value)\n\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/vpc/vpc.py",
    "content": "# Copyright (c) 2009-2010 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\n\"\"\"\nRepresents a Virtual Private Cloud.\n\"\"\"\n\nfrom boto.ec2.ec2object import TaggedEC2Object\n\nclass VPC(TaggedEC2Object):\n\n    def __init__(self, connection=None):\n        TaggedEC2Object.__init__(self, connection)\n        self.id = None\n        self.dhcp_options_id = None\n        self.state = None\n        self.cidr_block = None\n\n    def __repr__(self):\n        return 'VPC:%s' % self.id\n    \n    def endElement(self, name, value, connection):\n        if name == 'vpcId':\n            self.id = value\n        elif name == 'dhcpOptionsId':\n            self.dhcp_options_id = value\n        elif name == 'state':\n            self.state = value\n        elif name == 'cidrBlock':\n            self.cidr_block = value\n        else:\n            setattr(self, name, value)\n\n    def delete(self):\n        return self.connection.delete_vpc(self.id)\n\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/vpc/vpnconnection.py",
    "content": "# Copyright (c) 2009-2010 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\n\"\"\"\nRepresents a VPN Connectionn\n\"\"\"\n\nfrom boto.ec2.ec2object import EC2Object\n\nclass VpnConnection(EC2Object):\n\n    def __init__(self, connection=None):\n        EC2Object.__init__(self, connection)\n        self.id = None\n        self.state = None\n        self.customer_gateway_configuration = None\n        self.type = None\n        self.customer_gateway_id = None\n        self.vpn_gateway_id = None\n\n    def __repr__(self):\n        return 'VpnConnection:%s' % self.id\n    \n    def endElement(self, name, value, connection):\n        if name == 'vpnConnectionId':\n            self.id = value\n        elif name == 'state':\n            self.state = value\n        elif name == 'CustomerGatewayConfiguration':\n            self.customer_gateway_configuration = value\n        elif name == 'type':\n            self.type = value\n        elif name == 'customerGatewayId':\n            self.customer_gateway_id = value\n        elif name == 'vpnGatewayId':\n            self.vpn_gateway_id = value\n        else:\n            setattr(self, name, value)\n\n    def delete(self):\n        return self.connection.delete_vpn_connection(self.id)\n\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/boto/vpc/vpngateway.py",
    "content": "# Copyright (c) 2009-2010 Mitch Garnaat http://garnaat.org/\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\n\"\"\"\nRepresents a Vpn Gateway\n\"\"\"\n\nfrom boto.ec2.ec2object import TaggedEC2Object\n\nclass Attachment(object):\n\n    def __init__(self, connection=None):\n        self.vpc_id = None\n        self.state = None\n\n    def startElement(self, name, attrs, connection):\n        pass\n    \n    def endElement(self, name, value, connection):\n        if name == 'vpcId':\n            self.vpc_id = value\n        elif name == 'state':\n            self.state = value\n        else:\n            setattr(self, name, value)\n            \nclass VpnGateway(TaggedEC2Object):\n\n    def __init__(self, connection=None):\n        TaggedEC2Object.__init__(self, connection)\n        self.id = None\n        self.type = None\n        self.state = None\n        self.availability_zone = None\n        self.attachments = []\n\n    def __repr__(self):\n        return 'VpnGateway:%s' % self.id\n\n    def startElement(self, name, attrs, connection):\n        retval = TaggedEC2Object.startElement(self, name, attrs, connection)\n        if retval is not None:\n            return retval\n        if name == 'item':\n            att = Attachment()\n            self.attachments.append(att)\n            return att\n    \n    def endElement(self, name, value, connection):\n        if name == 'vpnGatewayId':\n            self.id = value\n        elif name == 'type':\n            self.type = value\n        elif name == 'state':\n            self.state = value\n        elif name == 'availabilityZone':\n            self.availability_zone = value\n        elif name == 'attachments':\n            pass\n        else:\n            setattr(self, name, value)\n\n    def attach(self, vpc_id):\n        return self.connection.attach_vpn_gateway(self.id, vpc_id)\n\n"
  },
  {
    "path": "deploy/third_party/boto-2.1.1/setup.py",
    "content": "#!/usr/bin/env python\n\n# Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/\n# Copyright (c) 2010, Eucalyptus Systems, Inc.\n# All rights reserved.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\ntry:\n    from setuptools import setup\n    extra = dict(test_suite=\"tests.test.suite\", include_package_data=True)\nexcept ImportError:\n    from distutils.core import setup\n    extra = {}\n\nimport sys\n\nfrom boto import __version__\n\nif sys.version_info <= (2, 4):\n    error = \"ERROR: boto requires Python Version 2.5 or above...exiting.\"\n    print >> sys.stderr, error\n    sys.exit(1)\n\nsetup(name = \"boto\",\n      version = __version__,\n      description = \"Amazon Web Services Library\",\n      long_description = \"Python interface to Amazon's Web Services.\",\n      author = \"Mitch Garnaat\",\n      author_email = \"mitch@garnaat.com\",\n      scripts = [\"bin/sdbadmin\", \"bin/elbadmin\", \"bin/cfadmin\",\n                 \"bin/s3put\", \"bin/fetch_file\", \"bin/launch_instance\",\n                 \"bin/list_instances\", \"bin/taskadmin\", \"bin/kill_instance\",\n                 \"bin/bundle_image\", \"bin/pyami_sendmail\", \"bin/lss3\",\n                 \"bin/cq\", \"bin/route53\", \"bin/s3multiput\", \"bin/cwutil\"],\n      url = \"http://code.google.com/p/boto/\",\n      packages = [\"boto\", \"boto.sqs\", \"boto.s3\", \"boto.gs\", \"boto.file\",\n                  \"boto.ec2\", \"boto.ec2.cloudwatch\", \"boto.ec2.autoscale\",\n                  \"boto.ec2.elb\", \"boto.sdb\", \"boto.cacerts\",\n                  \"boto.sdb.db\", \"boto.sdb.db.manager\", \"boto.mturk\",\n                  \"boto.pyami\", \"boto.mashups\", \"boto.contrib\", \"boto.manage\",\n                  \"boto.services\", \"boto.cloudfront\", \"boto.roboto\",\n                  \"boto.rds\", \"boto.vpc\", \"boto.fps\", \"boto.emr\", \"boto.sns\",\n                  \"boto.ecs\", \"boto.iam\", \"boto.route53\", \"boto.ses\",\n                  \"boto.cloudformation\", \"boto.sts\"],\n      package_data = {\"boto.cacerts\": [\"cacerts.txt\"]},\n      license = \"MIT\",\n      platforms = \"Posix; MacOS X; Windows\",\n      classifiers = [\"Development Status :: 5 - Production/Stable\",\n                     \"Intended Audience :: Developers\",\n                     \"License :: OSI Approved :: MIT License\",\n                     \"Operating System :: OS Independent\",\n                     \"Topic :: Internet\"],\n      **extra\n      )\n"
  },
  {
    "path": "lib/README",
    "content": "mvn install:install-file -DgroupId=javax.jms -DartifactId=jms           -Dversion=1.1 -Dpackaging=jar -Dfile=./javax.jms-1.1.jar\n"
  },
  {
    "path": "pom.xml",
    "content": "<!--\n  Copyright 2013 The Regents of The University California\n  \n  Licensed under the Apache License, Version 2.0 (the \"License\");\n  you may not use this file except in compliance with the License.\n  You may obtain a copy of the License at\n  \n    http://www.apache.org/licenses/LICENSE-2.0\n  \n  Unless required by applicable law or agreed to in writing, software\n  distributed under the License is distributed on an \"AS IS\" BASIS,\n  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  See the License for the specific language governing permissions and\n  limitations under the License.\n-->\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n  xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n  <groupId>edu.berkeley</groupId>\n  <artifactId>sparrow</artifactId>\n  <packaging>jar</packaging>\n  <version>1.0-SNAPSHOT</version>\n  <name>sparrow</name>\n  <url>http://maven.apache.org</url>\n  <dependencies>\n    <dependency>\n      <groupId>junit</groupId>\n      <artifactId>junit</artifactId>\n      <version>4.10</version>\n      <scope>test</scope>\n    </dependency>\n\t\t<dependency>\n\t\t  <groupId>com.google.guava</groupId>\n\t\t  <artifactId>guava</artifactId>\n\t\t  <version>14.0.1</version>\n\t\t</dependency>    \n    <dependency>\n      <groupId>com.google.protobuf</groupId>\n      <artifactId>protobuf-java</artifactId>\n      <version>2.4.1</version>\n    </dependency>\n    <dependency>\n      <groupId>log4j</groupId>\n      <artifactId>log4j</artifactId>\n      <version>1.2.16</version>\n   </dependency>\n   <dependency>\n     <groupId>org.slf4j</groupId>\n     <artifactId>slf4j-log4j12</artifactId>\n     <version>1.6.4</version>\n   </dependency>\n   <dependency>\n  \t<groupId>org.apache.thrift</groupId>\n\t  <artifactId>libthrift</artifactId>\n\t\t<version>0.8.0</version>\n\t</dependency>\n\t<dependency>\n    <groupId>org.mockito</groupId>\n    <artifactId>mockito-core</artifactId>  \n    <version>1.9.0</version> \n    <scope>test</scope>\n  </dependency>\n  <dependency>\n\t  <groupId>commons-pool</groupId>\n\t\t<artifactId>commons-pool</artifactId>\n\t  <version>1.6</version>\n  </dependency>\n  <dependency>\n    <groupId>net.sf.jopt-simple</groupId>\n    <artifactId>jopt-simple</artifactId>\n    <version>4.3</version>\n  </dependency>          \n    <dependency>\n    \t<groupId>org.apache.zookeeper</groupId>\n    \t<artifactId>zookeeper</artifactId>\n    \t<version>3.3.4</version>\n    \t<exclusions>\n    \t  <exclusion>\n    \t    <groupId>com.sun.jmx</groupId>\n    \t    <artifactId>jmxri</artifactId>\n    \t  </exclusion>\n    \t  <exclusion>\n    \t    <groupId>com.sun.jdmk</groupId>\n    \t    <artifactId>jmxtools</artifactId>\n    \t  </exclusion>\n    \t</exclusions>\n    </dependency>\n    <dependency>\n    \t<groupId>commons-configuration</groupId>\n    \t<artifactId>commons-configuration</artifactId>\n    \t<version>1.7</version>\n    </dependency>\n    <dependency>\n    \t<groupId>org.apache.commons</groupId>\n    \t<artifactId>commons-math</artifactId>\n    \t<version>2.2</version>\n    </dependency>\n  </dependencies>\n  <build>\n\t\t<plugins>\n\t\t<plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>1.5</version>\n        <configuration>\n          <!-- put your configurations here -->\n        </configuration>\n        <executions>\n          <execution>\n            <phase>package</phase>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n          </execution>\n        </executions>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <version>2.5.1</version>\n        <configuration>\n          <source>1.5</source>\n          <target>1.5</target>\n        </configuration>\n      </plugin>\n      <plugin>\n        <groupId>org.codehaus.mojo</groupId>\n        <artifactId>build-helper-maven-plugin</artifactId>\n        <version>1.7</version>\n        <executions>\n          <execution>\n            <id>add-source</id>\n            <phase>generate-sources</phase>\n            <goals>\n              <goal>add-source</goal>\n            </goals>\n            <configuration>\n              <sources>\n                <source>src/main/gen-java</source>\n              </sources>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n\t\t<pluginManagement>\n\t\t\t<plugins>\n\t\t\t\t<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->\n\t\t\t\t<plugin>\n\t\t\t\t\t<groupId>org.eclipse.m2e</groupId>\n\t\t\t\t\t<artifactId>lifecycle-mapping</artifactId>\n\t\t\t\t\t<version>1.0.0</version>\n\t\t\t\t\t<configuration>\n\t\t\t\t\t\t<lifecycleMappingMetadata>\n\t\t\t\t\t\t\t<pluginExecutions>\n\t\t\t\t\t\t\t\t<pluginExecution>\n\t\t\t\t\t\t\t\t\t<pluginExecutionFilter>\n\t\t\t\t\t\t\t\t\t\t<groupId>\n\t\t\t\t\t\t\t\t\t\t\torg.apache.avro\n\t\t\t\t\t\t\t\t\t\t</groupId>\n\t\t\t\t\t\t\t\t\t\t<artifactId>\n\t\t\t\t\t\t\t\t\t\t\tavro-maven-plugin\n\t\t\t\t\t\t\t\t\t\t</artifactId>\n\t\t\t\t\t\t\t\t\t\t<versionRange>\n\t\t\t\t\t\t\t\t\t\t\t[1.6.1,)\n\t\t\t\t\t\t\t\t\t\t</versionRange>\n\t\t\t\t\t\t\t\t\t\t<goals>\n\t\t\t\t\t\t\t\t\t\t\t<goal>idl-protocol</goal>\n\t\t\t\t\t\t\t\t\t\t\t<goal>protocol</goal>\n\t\t\t\t\t\t\t\t\t\t\t<goal>schema</goal>\n\t\t\t\t\t\t\t\t\t\t</goals>\n\t\t\t\t\t\t\t\t\t</pluginExecutionFilter>\n\t\t\t\t\t\t\t\t\t<action>\n\t\t\t\t\t\t\t\t\t\t<ignore></ignore>\n\t\t\t\t\t\t\t\t\t</action>\n\t\t\t\t\t\t\t\t</pluginExecution>\n\t\t\t\t\t\t\t</pluginExecutions>\n\t\t\t\t\t\t</lifecycleMappingMetadata>\n\t\t\t\t\t</configuration>\n\t\t\t\t</plugin>\n\t\t\t</plugins>\n\t\t</pluginManagement>\n  </build>\n</project>\n"
  },
  {
    "path": "readme.markdown",
    "content": "Sparrow Scheduler\n================================\nSparrow is a high throughput, low latency, and fault-tolerant distributed cluster scheduler. Sparrow is designed for applications that require resource allocations frequently for very short jobs, such as analytics frameworks. Sparrow schedules from a distributed set of schedulers that maintain no shared state. Instead, to schedule a job, a scheduler obtains intantaneous load information by sending probes to a subset of worker machines. The scheduler places the job's tasks on the least loaded of the probed workers. This technique allows Sparrow to schedule in milliseconds, two orders of magnitude faster than existing approaches. Sparrow also handles failures: if a scheduler fails, a client simply directs scheduling requests to an alternate scheduler.\n\nTo read more about Sparrow, check out our [paper](http://dl.acm.org/citation.cfm?doid=2517349.2522716).\n\nIf you're interested in using Sparrow, we recommend that you join the [Sparrow mailing list](https://groups.google.com/group/sparrow-scheduler-users).\n\n\nCode Layout\n-------------------------\n`/sparrow/src` (maven-style source directory)\n\n`/sparrow/src/main/java/edu/berkeley/sparrow` (most of the interesting java code)\n\n`/sparrow/src/main/java/edu/berkeley/sparrow/examples` (Example applications that use Sparrow)\n\n`/deploy/`     (contains ec2 deployment scripts)\n\nBuilding Sparrow\n-------------------------\n\nYou can build Sparrow using Maven:\n\n<pre>\n$ mvn compile\n$ mvn package -Dmaven.test.skip=true\n</pre>\n\nSparrow and Spark\n------------------------\n\nWe have ported [Spark](http://spark.incubator.apache.org/), an in-memory analytics framework, to schedule using Sparrow. To use Spark with Sparrow, you'll need to use the [our forked version of Spark](https://github.com/kayousterhout/spark/tree/sparrow), which includes the Sparrow scheduling plugin.\n\nResearch\n-------------------------\nSparrow is a research project within the [U.C. Berkeley AMPLab](http://amplab.cs.berkeley.edu/). The Sparrow team, listed roughly order of height, consists of Kay Ousterhout, Patrick Wendell, Matei Zaharia, and Ion Stoica. Please contact us for more information.\n"
  },
  {
    "path": "simulation/run_simulation.py",
    "content": "#\n# Copyright 2013 The Regents of The University California\n# \n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n# \n#   http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n\nimport simulation_random\nimport simulation_batch\nimport simulation_centralized\nimport simulation_multi\nimport simulation_cancellation\nimport util\n\ndef get_percentile(N, percent, key=lambda x:x):\n    if not N:\n        return 0\n    k = (len(N) - 1) * percent\n    f = math.floor(k)\n    c = math.ceil(k)\n    if f == c:\n        return key(N[int(k)])\n    d0 = key(N[int(f)]) * (c-k)\n    d1 = key(N[int(c)]) * (k-f)\n    return d0 + d1\n\nNUM_JOBS = 10000\nDISTRIBUTION = util.TaskDistributions.EXP_JOBS\n\nloads = [0.1, 0.3, 0.5, 0.7, 0.8, 0.9, 0.95]\n#loads = [0.95]\nloads.reverse()\nfor load in loads:\n    print \"Running simulations at %s load\" % load\n\n    print \"******Multiget\"\n    s = simulation_multi.Simulation(NUM_JOBS, \"multi_tasks_%s\" % load, load, DISTRIBUTION)\n    s.run()\n\n\n    print \"Sparrow\"\n    simulation_cancellation.WORK_STEALING = False\n    simulation_cancellation.CANCELLATION = False\n    s = simulation_cancellation.Simulation(NUM_JOBS, \"sparrow_%s\" % load, load, DISTRIBUTION)\n    s.run()\n\n    print \"Cancellation\"\n    simulation_cancellation.WORK_STEALING = False\n    simulation_cancellation.CANCELLATION = True\n    s = simulation_cancellation.Simulation(NUM_JOBS, \"cancellation_%s\" % load, load, DISTRIBUTION)\n    s.run()\n\n    print \"Centralized\"\n    s = simulation_centralized.Simulation(NUM_JOBS, \"centralized_%s\" % load, load, DISTRIBUTION)\n    s.run()\n\n    print \"Random\"\n    s = simulation_random.Simulation(NUM_JOBS, \"random_%s\" % load, load, DISTRIBUTION)\n    s.run()\n\n    print \"Per task\"\n    simulation_batch.PER_TASK = True\n    s = simulation_batch.Simulation(NUM_JOBS, \"per_task_%s\" % load, load, DISTRIBUTION)\n    s.run()\n\n    print \"Batch sampling\"\n    simulation_batch.PER_TASK = False\n    s = simulation_batch.Simulation(NUM_JOBS, \"batch_%s\" % load, load, DISTRIBUTION)\n    s.run()\n\n    continue\n    print \"Work Stealing (10000 schedulers)\"\n    simulation_cancellation.WORK_STEALING = True\n    simulation_cancellation.NUM_SCHEDULERS = 10000\n    simulation_cancellation.CANCELLATION = False\n    s = simulation_cancellation.Simulation(NUM_JOBS, \"stealing_s10000_%s\" % load, load, DISTRIBUTION)\n    s.run()\n\n    continue\n\n\n"
  },
  {
    "path": "simulation/simulation.py",
    "content": "#\n# Copyright 2013 The Regents of The University California\n# \n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n# \n#   http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n\nimport logging\nimport math\nimport numpy\nimport random\nfrom util import Job, TaskDistributions\nimport Queue\n\nMEDIAN_TASK_DURATION = 100\nNETWORK_DELAY = 0\nTASKS_PER_JOB = 500\nSLOTS_PER_WORKER = 4\nTOTAL_WORKERS = 10000\nPROBE_RATIO = 2\n\ndef get_percentile(N, percent, key=lambda x:x):\n    if not N:\n        return 0\n    k = (len(N) - 1) * percent\n    f = math.floor(k)\n    c = math.ceil(k)\n    if f == c:\n        return key(N[int(k)])\n    d0 = key(N[int(f)]) * (c-k)\n    d1 = key(N[int(c)]) * (k-f)\n    return d0 + d1\n\ndef plot_cdf(values, filename):\n    values.sort()\n    f = open(filename, \"w\")\n    for percent in range(100):\n        fraction = percent / 100.\n        f.write(\"%s\\t%s\\n\" % (fraction, get_percentile(values, fraction)))\n    f.close()\n\nclass Event(object):\n    \"\"\" Abstract class representing events. \"\"\"\n    def __init__(self):\n        raise NotImplementedError(\"Event is an abstract class and cannot be \"\n                                  \"instantiated directly\")\n\n    def run(self, current_time):\n        \"\"\" Returns any events that should be added to the queue. \"\"\"\n        raise NotImplementedError(\"The run() method must be implemented by \"\n                                  \"each class subclassing Event\")\n\nclass JobArrival(Event):\n    \"\"\" Event to signify a job arriving at a scheduler. \"\"\"\n    def __init__(self, simulation, interarrival_delay, task_distribution):\n        self.simulation = simulation\n        self.interarrival_delay = interarrival_delay\n        self.task_distribution= task_distribution\n\n    def run(self, current_time):\n        job = Job(TASKS_PER_JOB, current_time, self.task_distribution, MEDIAN_TASK_DURATION)\n        logging.getLogger(\"sim\").debug(\"Job %s arrived at %s\" % (job.id, current_time))\n        # Schedule job.\n        new_events = self.simulation.send_probes(job, current_time)\n        # Add new Job Arrival event, for the next job to arrive after this one.\n        arrival_delay = random.expovariate(1.0 / self.interarrival_delay)\n        new_events.append((current_time + arrival_delay, self))\n        logging.getLogger(\"sim\").debug(\"Retuning %s events\" % len(new_events))\n        return new_events\n\nclass ProbeEvent(Event):\n    \"\"\" Event to signify a probe arriving at a worker. \"\"\"\n    def __init__(self, worker, job_id):\n        self.worker = worker\n        self.job_id = job_id\n\n    def run(self, current_time):\n        logging.getLogger(\"sim\").debug(\"Probe for job %s arrived at worker %s at %s\" %\n                      (self.job_id, self.worker.id, current_time))\n        return self.worker.add_probe(self.job_id, current_time)\n\nclass NoopGetTaskResponseEvent(Event):\n    \"\"\" Signifies when a getTask() RPC response arrives at a worker, with a noop response. \"\"\"\n    def __init__(self, worker):\n        self.worker = worker\n\n    def run(self, current_time):\n        logging.getLogger(\"sim\").debug(\"getTask() request for worker %s returned no task at %s\" %\n                      (self.worker.id, current_time))\n        return self.worker.free_slot(current_time)\n\n\nclass TaskEndEvent():\n    def __init__(self, worker):\n        self.worker = worker\n\n    def run(self, current_time):\n        return self.worker.free_slot(current_time)\n\nclass Worker(object):\n    def __init__(self, simulation, num_slots, id):\n        self.simulation = simulation\n        self.free_slots = num_slots\n        # Just a list of job ids!\n        self.queued_probes = Queue.Queue()\n        self.id = id\n        self.probes_replied_to_immediately = 0\n\n    def add_probe(self, job_id, current_time):\n        self.queued_probes.put(job_id)\n        new_events = self.maybe_get_task(current_time)\n        self.probes_replied_to_immediately += len(new_events)\n        logging.getLogger(\"sim\").debug(\"Worker %s: %s\" %\n                                       (self.id, self.probes_replied_to_immediately))\n        return new_events\n\n    def free_slot(self, current_time):\n        \"\"\" Frees a slot on the worker and attempts to launch another task in that slot. \"\"\"\n        self.free_slots += 1\n        get_task_events = self.maybe_get_task(current_time)\n        return get_task_events\n\n    def maybe_get_task(self, current_time):\n        if not self.queued_probes.empty() and self.free_slots > 0:\n            # Account for \"running\" task\n            self.free_slots -= 1\n            job_id = self.queued_probes.get()\n\n            task_duration = self.simulation.get_task(job_id)\n            probe_response_time = current_time + 2*NETWORK_DELAY\n            if task_duration > 0:\n                task_end_time = probe_response_time + task_duration\n                logging.getLogger(\"sim\").debug((\"Task for job %s running on worker %s (get task at: %s, duration: \"\n                               \"%s, end: %s)\") %\n                              (job_id, self.id, current_time, task_duration, task_end_time))\n                self.simulation.add_task_completion_time(job_id, task_end_time)\n                new_event = TaskEndEvent(self)\n                return [(task_end_time, new_event)]\n            else:\n                # There was no task left for the job, so send another probe\n                # after 1RTT.\n                logging.getLogger(\"sim\").debug(\"Noop returning on worker %s at %s\" %\n                                               (self.id, probe_response_time))\n                return [(probe_response_time, NoopGetTaskResponseEvent(self))]\n        return []\n\nclass Simulation(object):\n    def __init__(self, num_jobs, file_prefix, load, task_distribution):\n        avg_used_slots = load * SLOTS_PER_WORKER * TOTAL_WORKERS\n        self.interarrival_delay = (1.0 * MEDIAN_TASK_DURATION * TASKS_PER_JOB / avg_used_slots)\n        print (\"Interarrival delay: %s (avg slots in use: %s)\" %\n               (self.interarrival_delay, avg_used_slots))\n        self.jobs = {}\n        self.remaining_jobs = num_jobs\n        self.event_queue = Queue.PriorityQueue()\n        self.workers = []\n        self.file_prefix = file_prefix\n        while len(self.workers) < TOTAL_WORKERS:\n            self.workers.append(Worker(self, SLOTS_PER_WORKER, len(self.workers)))\n        self.worker_indices = range(TOTAL_WORKERS)\n        self.task_distribution = task_distribution\n\n    def send_probes(self, job, current_time):\n        \"\"\" Send probes to acquire load information, in order to schedule a job. \"\"\"\n        self.jobs[job.id] = job\n\n        random.shuffle(self.worker_indices)\n        probe_events = []\n        num_probes = PROBE_RATIO * len(job.unscheduled_tasks)\n        for worker_index in self.worker_indices[:num_probes]:\n            probe_events.append((current_time + NETWORK_DELAY,\n                                 ProbeEvent(self.workers[worker_index], job.id)))\n        return probe_events\n\n    def get_task(self, job_id):\n        job = self.jobs[job_id]\n        if len(job.unscheduled_tasks) > 0:\n            task_duration = job.unscheduled_tasks[0]\n            job.unscheduled_tasks = job.unscheduled_tasks[1:]\n            return task_duration\n        return -1\n\n    def add_task_completion_time(self, job_id, completion_time):\n        job_complete = self.jobs[job_id].task_completed(completion_time)\n        if job_complete:\n            self.remaining_jobs -= 1\n            logging.getLogger(\"sim\").debug(\"Job %s completed in %s\" %\n                          (job_id, self.jobs[job_id].end_time - self.jobs[job_id].start_time))\n\n    def run(self):\n        self.event_queue.put((0,\n                              JobArrival(self, self.interarrival_delay, self.task_distribution)))\n        last_time = 0\n        while self.remaining_jobs > 0:\n            current_time, event = self.event_queue.get()\n            assert current_time >= last_time\n            last_time = current_time\n            new_events = event.run(current_time)\n            for new_event in new_events:\n                self.event_queue.put(new_event)\n\n        print (\"Simulation ended after %s milliseconds (%s jobs started)\" %\n               (last_time, len(self.jobs)))\n        complete_jobs = [j for j in self.jobs.values() if j.completed_tasks_count == j.num_tasks]\n        print \"%s complete jobs\" % len(complete_jobs)\n        response_times = [job.end_time - job.start_time for job in complete_jobs\n                          if job.start_time > 500]\n        print \"Included %s jobs\" % len(response_times)\n        plot_cdf(response_times, \"%s_response_times.data\" % self.file_prefix)\n        print \"Average response time: \", numpy.mean(response_times)\n\n        longest_tasks = [job.longest_task for job in complete_jobs]\n        plot_cdf(longest_tasks, \"%s_ideal_response_time.data\" % self.file_prefix)\n\n        tasks_replied_to_immediately = sum([w.probes_replied_to_immediately for w in self.workers])\n        print \"Tasks replied to immeiately: \", tasks_replied_to_immediately\n\n        return response_times\n\ndef main():\n    random.seed(1)\n    logging.basicConfig(level=logging.INFO)\n    sim = Simulation(1000, \"sparrow\", 0.95, TaskDistributions.CONSTANT)\n    sim.run()\n\nif __name__ == \"__main__\":\n    main()"
  },
  {
    "path": "simulation/simulation_batch.py",
    "content": "#\n# Copyright 2013 The Regents of The University California\n# \n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n# \n#   http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n\nimport math\nimport numpy\nimport random\nimport Queue\nfrom util import Job, TaskDistributions\n\nMEDIAN_TASK_DURATION = 100\nNETWORK_DELAY = 0.5\nTASKS_PER_JOB = 100\n# This needs to be set!\nSLOTS_PER_WORKER = 4\nTOTAL_WORKERS = 10000\nPROBE_RATIO = 2\n\n# Whether to do per-task assignment.\nPER_TASK = True\n\ndef get_percentile(N, percent, key=lambda x:x):\n    if not N:\n        return 0\n    k = (len(N) - 1) * percent\n    f = math.floor(k)\n    c = math.ceil(k)\n    if f == c:\n        return key(N[int(k)])\n    d0 = key(N[int(f)]) * (c-k)\n    d1 = key(N[int(c)]) * (k-f)\n    return d0 + d1\n\ndef plot_cdf(values, filename):\n    values.sort()\n    f = open(filename, \"w\")\n    for percent in range(100):\n        fraction = percent / 100.\n        f.write(\"%s\\t%s\\n\" % (fraction, get_percentile(values, fraction)))\n    f.close()\n\nclass Event(object):\n    \"\"\" Abstract class representing events. \"\"\"\n    def __init__(self):\n        raise NotImplementedError(\"Event is an abstract class and cannot be \"\n                                  \"instantiated directly\")\n\n    def run(self, current_time):\n        \"\"\" Returns any events that should be added to the queue. \"\"\"\n        raise NotImplementedError(\"The run() method must be implemented by \"\n                                  \"each class subclassing Event\")\n\nclass JobArrival(Event):\n    \"\"\" Event to signify a job arriving at a scheduler. \"\"\"\n    def __init__(self, simulation, interarrival_delay, task_distribution):\n        self.simulation = simulation\n        self.interarrival_delay = interarrival_delay\n        self.task_distribution = task_distribution\n\n    def run(self, current_time):\n        job = Job(TASKS_PER_JOB, current_time, self.task_distribution, MEDIAN_TASK_DURATION)\n        #print \"Job %s arrived at %s\" % (job.id, current_time)\n        # Schedule job.\n        probe_event = self.simulation.send_probes(job, current_time)\n        # Add new Job Arrival event, for the next job to arrive after this one.\n        arrival_delay = random.expovariate(1.0 / self.interarrival_delay)\n        job_arrival_event = (current_time + arrival_delay, self)\n        return [probe_event, job_arrival_event]\n\nclass ProbeEvent(Event):\n    \"\"\" Event to signify all probes for a job arriving at all probed workers.\n\n    Probed workers are selected when the probes \"arrive\" (i.e., in the run method).\"\"\"\n    def __init__(self, simulation, job_id):\n        self.simulation = simulation\n        self.job_id = job_id\n\n    def run(self, current_time):\n        task_arrival_events = []\n        if PER_TASK:\n            task_arrival_events = self.simulation.assign_tasks_per_task(current_time, self.job_id)\n        else:\n            task_arrival_events = self.simulation.assign_tasks(current_time, self.job_id)\n        assert (len(task_arrival_events) == self.simulation.jobs[self.job_id].num_tasks)\n        return task_arrival_events\n\nclass TaskArrival(Event):\n    \"\"\" Event to signify a task arriving at a worker. \"\"\"\n    def __init__(self, worker, task_duration, job_id):\n        self.worker = worker\n        self.task_duration = task_duration\n        self.job_id = job_id\n\n    def run(self, current_time):\n        return self.worker.add_task(current_time, self.task_duration, self.job_id)\n\n\nclass TaskEndEvent():\n    def __init__(self, worker):\n        self.worker = worker\n\n    def run(self, current_time):\n        return self.worker.free_slot(current_time)\n\nclass Worker(object):\n    def __init__(self, simulation, num_slots, id):\n        self.simulation = simulation\n        self.free_slots = num_slots\n        # Just a list of (task duration, job id) pairs.\n        self.queued_tasks = Queue.Queue()\n        self.num_queued_tasks = 0\n        self.id = id\n\n    def queue_length(self):\n        queue_length = self.num_queued_tasks\n        if self.free_slots > 0:\n            assert self.num_queued_tasks == 0\n            return -self.free_slots\n        return queue_length\n\n    def add_task(self, current_time, task_duration, job_id):\n        self.queued_tasks.put((task_duration, job_id))\n        self.num_queued_tasks += 1\n        return self.maybe_start_task(current_time)\n\n    def free_slot(self, current_time):\n        \"\"\" Frees a slot on the worker and attempts to launch another task in that slot. \"\"\"\n        self.free_slots += 1\n        get_task_events = self.maybe_start_task(current_time)\n        return get_task_events\n\n    def maybe_start_task(self, current_time):\n        if not self.queued_tasks.empty() and self.free_slots > 0:\n            # Account for \"running\" task\n            self.free_slots -= 1\n            task_duration, job_id = self.queued_tasks.get()\n            self.num_queued_tasks -= 1\n            task_end_time = current_time + task_duration\n            #print (\"Task for job %s on worker %s launched at %s; will complete at %s\" %\n            #       (job_id, self.id, current_time, task_end_time))\n            self.simulation.add_task_completion_time(job_id, task_end_time)\n            return [(task_end_time, TaskEndEvent(self))]\n        return []\n\nclass Simulation(object):\n    def __init__(self, num_jobs, file_prefix, load, task_distribution):\n        avg_used_slots = load * SLOTS_PER_WORKER * TOTAL_WORKERS\n        self.interarrival_delay = (1.0 * MEDIAN_TASK_DURATION * TASKS_PER_JOB / avg_used_slots)\n        print (\"Interarrival delay: %s (avg slots in use: %s)\" %\n               (self.interarrival_delay, avg_used_slots))\n        self.jobs = {}\n        self.remaining_jobs = num_jobs\n        self.event_queue = Queue.PriorityQueue()\n        self.workers = []\n        self.file_prefix = file_prefix\n        while len(self.workers) < TOTAL_WORKERS:\n            self.workers.append(Worker(self, SLOTS_PER_WORKER, len(self.workers)))\n        self.worker_indices = range(TOTAL_WORKERS)\n        self.task_distribution = task_distribution\n\n    def assign_tasks(self, current_time, job_id):\n        # Randomly choose workers\n        #(note that this doesn't have to be done until the probe \"arrives\").\n        job = self.jobs[job_id]\n        random.shuffle(self.worker_indices)\n        num_probes = PROBE_RATIO * job.num_tasks\n        loads = [(i, self.workers[i].queue_length())\n                 for i in self.worker_indices[:num_probes]]\n        loads.sort(key = lambda x: x[1])\n        #loads_str = \", \".join([\"%s:%s\" % (l[0], l[1]) for l in loads])\n\n        # Assign tasks\n        task_arrival_events = []\n        for i, (worker_index, load) in enumerate(loads[:job.num_tasks]):\n            #print (\"Assigning task of duration %s for job %s to %s\" %\n            #       (job.unscheduled_tasks[i], job_id, worker_index))\n            task_arrival_events.append(\n                        (current_time + 2*NETWORK_DELAY,\n                         TaskArrival(self.workers[worker_index], job.unscheduled_tasks[i], job_id)))\n        return task_arrival_events\n\n    def assign_tasks_per_task(self, current_time, job_id):\n        \"\"\" Non-generously does per-task sampling.\"\"\"\n        job = self.jobs[job_id]\n        random.shuffle(self.worker_indices)\n        task_arrival_events = []\n        for i, task_duration in enumerate(job.unscheduled_tasks):\n            loads = [(i, self.workers[i].queue_length())\n                     for i in self.worker_indices[PROBE_RATIO*i:PROBE_RATIO*(i+1)]]\n            #loads_str = \", \".join([\"%s:%s\" % (l[0], l[1]) for l in loads])\n            #print \"Loads: %s\" % loads_str\n            loads.sort(key = lambda x: x[1])\n            #print (\"Assigning task of duration %s for job %s to worker %s\" %\n            #       (task_duration, job_id, loads[0][0]))\n            task_arrival_events.append(\n                    (current_time + 2*NETWORK_DELAY,\n                     TaskArrival(self.workers[loads[0][0]], task_duration, job_id)))\n        return task_arrival_events\n\n    def send_probes(self, job, current_time):\n        \"\"\" Send probes to acquire load information, in order to schedule a job. \"\"\"\n        self.jobs[job.id] = job\n        return (current_time + NETWORK_DELAY, ProbeEvent(self, job.id))\n\n    def add_task_completion_time(self, job_id, completion_time):\n        job_complete = self.jobs[job_id].task_completed(completion_time)\n        if job_complete:\n            self.remaining_jobs -= 1\n\n    def run(self):\n        self.event_queue.put((0, JobArrival(self, self.interarrival_delay, self.task_distribution)))\n        last_time = 0\n        while self.remaining_jobs > 0:\n            current_time, event = self.event_queue.get()\n            assert current_time >= last_time\n            last_time = current_time\n            new_events = event.run(current_time)\n            for new_event in new_events:\n                self.event_queue.put(new_event)\n\n        print (\"Simulation ended after %s milliseconds (%s jobs started)\" %\n               (last_time, len(self.jobs)))\n        complete_jobs = [j for j in self.jobs.values() if j.completed_tasks_count == j.num_tasks]\n        print \"%s complete jobs\" % len(complete_jobs)\n        response_times = [job.end_time - job.start_time for job in complete_jobs\n                          if job.start_time > 500]\n        print \"Included %s jobs\" % len(response_times)\n        plot_cdf(response_times, \"%s_response_times.data\" % self.file_prefix)\n        print \"Average response time: \", numpy.mean(response_times)\n\n        longest_tasks = [job.longest_task for job in complete_jobs]\n        plot_cdf(longest_tasks, \"%s_ideal_response_time.data\" % self.file_prefix)\n        return response_times\n\ndef main():\n    sim = Simulation(10, \"per_task\", 0.9, TaskDistributions.CONSTANT)\n    sim.run()\n\nif __name__ == \"__main__\":\n    main()"
  },
  {
    "path": "simulation/simulation_cancellation.py",
    "content": "#\n# Copyright 2013 The Regents of The University California\n# \n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n# \n#   http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n\nimport logging\nimport math\nimport numpy\nimport random\nimport Queue\nfrom util import Job, TaskDistributions\n\nMEDIAN_TASK_DURATION = 100\nNETWORK_DELAY = 0.5\nTASKS_PER_JOB = 100\nSLOTS_PER_WORKER = 4\nTOTAL_WORKERS = 10000\nPROBE_RATIO = 2\nCANCELLATION = False\nWORK_STEALING = False\nNUM_SCHEDULERS = 1\n\ndef get_percentile(N, percent, key=lambda x:x):\n    if not N:\n        return 0\n    k = (len(N) - 1) * percent\n    f = math.floor(k)\n    c = math.ceil(k)\n    if f == c:\n        return key(N[int(k)])\n    d0 = key(N[int(f)]) * (c-k)\n    d1 = key(N[int(c)]) * (k-f)\n    return d0 + d1\n\ndef plot_cdf(values, filename):\n    values.sort()\n    f = open(filename, \"w\")\n    for percent in range(100):\n        fraction = percent / 100.\n        f.write(\"%s\\t%s\\n\" % (fraction, get_percentile(values, fraction)))\n    f.close()\n\nclass Event(object):\n    \"\"\" Abstract class representing events. \"\"\"\n    def __init__(self):\n        raise NotImplementedError(\"Event is an abstract class and cannot be \"\n                                  \"instantiated directly\")\n\n    def run(self, current_time):\n        \"\"\" Returns any events that should be added to the queue. \"\"\"\n        raise NotImplementedError(\"The run() method must be implemented by \"\n                                  \"each class subclassing Event\")\n\nclass JobArrival(Event):\n    \"\"\" Event to signify a job arriving at a scheduler. \"\"\"\n    def __init__(self, simulation, interarrival_delay, task_distribution):\n        self.simulation = simulation\n        self.interarrival_delay = interarrival_delay\n        self.task_distribution = task_distribution\n\n    def run(self, current_time):\n        scheduler = random.randint(0, NUM_SCHEDULERS - 1)\n        job = Job(TASKS_PER_JOB, current_time, self.task_distribution, MEDIAN_TASK_DURATION,\n                  scheduler)\n        #print \"Job %s arrived at %s\" % (job.id, current_time)\n        # Schedule job.\n        new_events = self.simulation.send_probes(job, current_time)\n        # Add new Job Arrival event, for the next job to arrive after this one.\n        arrival_delay = random.expovariate(1.0 / self.interarrival_delay)\n        new_events.append((current_time + arrival_delay, self))\n        #print \"Retuning %s events\" % len(new_events)\n        return new_events\n\nclass ProbeEvent(Event):\n    \"\"\" Event to signify a probe arriving at a worker. \"\"\"\n    def __init__(self, worker, job_id):\n        self.worker = worker\n        self.job_id = job_id\n\n    def run(self, current_time):\n        #print (\"Probe for job %s arrived at worker %s at %s\" %\n        #       (self.job_id, self.worker.id, current_time))\n        return self.worker.add_probe(self.job_id, current_time)\n\nclass NoopGetTaskResponseEvent(Event):\n    \"\"\" Signifies when a getTask() RPC response arrives at a worker, with a noop response. \"\"\"\n    def __init__(self, worker):\n        self.worker = worker\n\n    def run(self, current_time):\n        #print (\"getTask() request for worker %s returned no task at %s\" %\n        #       (self.worker.id, current_time))\n        return self.worker.free_slot(current_time)\n\n\nclass TaskEndEvent():\n    def __init__(self, worker):\n        self.worker = worker\n\n    def run(self, current_time):\n        return self.worker.free_slot(current_time)\n\nclass CancellationEvent():\n    def __init__(self, worker, job_id):\n        self.worker = worker\n        self.job_id = job_id\n\n    def run(self, current_time):\n        self.worker.cancel_probe(self.job_id, current_time)\n        return []\n\nclass Worker(object):\n    def __init__(self, simulation, num_slots, id):\n        self.simulation = simulation\n\n        # List of times when slots were freed, for each free slot (used to track the time\n        # the worker spends idle).\n        self.free_slots = []\n        while len(self.free_slots) < num_slots:\n            self.free_slots.append(0)\n        self.idle_ms = 0\n\n        # Just a list of job ids!\n        self.queued_probes = []\n        self.id = id\n        self.successful_cancellations = 0\n\n    def add_probe(self, job_id, current_time):\n        self.queued_probes.append(job_id)\n        return self.maybe_get_task(current_time)\n\n    def free_slot(self, current_time):\n        \"\"\" Frees a slot on the worker and attempts to launch another task in that slot. \"\"\"\n        self.free_slots.append(current_time)\n        get_task_events = self.maybe_get_task(current_time)\n        if len(get_task_events) > 0:\n            return get_task_events\n\n        if WORK_STEALING:\n            # Choose a random scheduler.\n            scheduler = random.randint(0, NUM_SCHEDULERS - 1)\n            time_slot_freed = self.free_slots.pop(0)\n            self.idle_ms += current_time - time_slot_freed\n            new_task_events = self.simulation.get_any_task(self, scheduler, current_time)\n            assert len(new_task_events) >= 1\n            return new_task_events\n\n        return []\n\n    def maybe_get_task(self, current_time):\n        if len(self.queued_probes) > 0 and len(self.free_slots) > 0:\n            # Account for \"running\" task\n            time_slot_freed = self.free_slots.pop(0)\n            self.idle_ms += current_time - time_slot_freed\n\n            job_id = self.queued_probes[0]\n            self.queued_probes = self.queued_probes[1:]\n\n            return self.simulation.get_task(job_id, self, current_time)\n        return []\n\n    def cancel_probe(self, job_id, current_time):\n        logging.debug(\"Attempting to cancel probe for job %s on worker %s (queue: %s) at %s\" %\n                      (job_id, self.id, self.queued_probes, current_time))\n        if job_id in self.queued_probes:\n            self.queued_probes.remove(job_id)\n            self.successful_cancellations += 1\n\n    def finish_simulation(self, current_time):\n        \"\"\" Completes the simulation by adding the idle time at the end. \"\"\"\n        for time_freed in self.free_slots:\n            self.idle_ms += time_freed - current_time\n\nclass Simulation(object):\n    def __init__(self, num_jobs, file_prefix, load, task_distribution):\n        avg_used_slots = load * SLOTS_PER_WORKER * TOTAL_WORKERS\n        self.interarrival_delay = (1.0 * MEDIAN_TASK_DURATION * TASKS_PER_JOB / avg_used_slots)\n        print (\"Interarrival delay: %s (avg slots in use: %s)\" %\n               (self.interarrival_delay, avg_used_slots))\n        self.jobs = {}\n        self.unscheduled_jobs = []\n        while len(self.unscheduled_jobs) < NUM_SCHEDULERS:\n            self.unscheduled_jobs.append([])\n        self.remaining_jobs = num_jobs\n        self.event_queue = Queue.PriorityQueue()\n        self.workers = []\n        self.file_prefix = file_prefix\n        while len(self.workers) < TOTAL_WORKERS:\n            self.workers.append(Worker(self, SLOTS_PER_WORKER, len(self.workers)))\n        self.worker_indices = range(TOTAL_WORKERS)\n        self.task_distribution = task_distribution\n\n        self.tasks_stolen = 0\n        self.attempted_tasks_stolen = 0\n\n        self.attempted_cancellations = 0\n\n        self.successful_get_tasks = 0\n        self.total_get_tasks = 0\n\n    def send_probes(self, job, current_time):\n        \"\"\" Send probes to acquire load information, in order to schedule a job. \"\"\"\n        self.jobs[job.id] = job\n        self.unscheduled_jobs[job.scheduler].append(job)\n\n        random.shuffle(self.worker_indices)\n        probe_events = []\n        num_probes = PROBE_RATIO * len(job.unscheduled_tasks)\n        for worker_index in self.worker_indices[:num_probes]:\n            probe_events.append((current_time + NETWORK_DELAY,\n                                 ProbeEvent(self.workers[worker_index], job.id)))\n            job.probed_workers.add(worker_index)\n        return probe_events\n\n    def get_task(self, job_id, worker, current_time):\n        self.total_get_tasks += 1\n        job = self.jobs[job_id]\n        # Need to add a network delay here to account for the fact that we\n        # call get_task when the probe is launched (not when it is received) to\n        # avoid additional event processing.\n        job.add_probe_response(worker, current_time + NETWORK_DELAY)\n        response_time = current_time + 2*NETWORK_DELAY\n        if len(job.unscheduled_tasks) > 0:\n            self.successful_get_tasks += 1\n            return self.get_task_for_job(job, worker, response_time)\n        else:\n            return [(response_time, NoopGetTaskResponseEvent(worker))]\n\n    def get_task_for_job(self, job, worker, response_time):\n        assert len(job.unscheduled_tasks) > 0\n        events = []\n        task_duration = job.unscheduled_tasks.pop(0)\n\n        task_end_time = task_duration + response_time\n        self.add_task_completion_time(job.id, task_end_time)\n\n        # Remove this worker from the list of the job's probed workers.\n        events.append((task_end_time, TaskEndEvent(worker)))\n\n        if len(job.unscheduled_tasks) == 0:\n            logging.info(\"Finished scheduling tasks for job %s\" % job.id)\n            self.unscheduled_jobs[job.scheduler].remove(job)\n            if CANCELLATION:\n                # Cancel remaining outstanding probes.\n                logging.debug(\"Cancelling probes for job %s (will arrive at %s)\" %\n                              (job.id, response_time))\n                for worker_id in job.probed_workers:\n                    self.attempted_cancellations += 1\n                    events.append((response_time,\n                                   CancellationEvent(self.workers[worker_id], job.id)))\n        return events\n\n    def get_any_task(self, worker, scheduler, current_time):\n        \"\"\" Used by an idle worker, to attempt to steal extra work.\"\"\"\n        self.attempted_tasks_stolen += 1\n        response_time = current_time + 2*NETWORK_DELAY\n        unscheduled_jobs = self.unscheduled_jobs[scheduler]\n        if len(unscheduled_jobs) == 0:\n            return [(response_time, NoopGetTaskResponseEvent(worker))]\n\n        self.tasks_stolen += 1\n        return self.get_task_for_job(unscheduled_jobs[0], worker, response_time)\n\n    def add_task_completion_time(self, job_id, completion_time):\n        job_complete = self.jobs[job_id].task_completed(completion_time)\n        if job_complete:\n            self.remaining_jobs -= 1\n            #print (\"Job %s completed in %s\" %\n            #       (job_id, self.jobs[job_id].end_time - self.jobs[job_id].start_time))\n\n    def run(self):\n        self.event_queue.put((0, JobArrival(self, self.interarrival_delay, self.task_distribution)))\n        last_time = 0\n        last_report = self.remaining_jobs\n        half_jobs = self.remaining_jobs / 2\n        output_worker_loads = False\n        while self.remaining_jobs > 0:\n            #if self.remaining_jobs != last_report and self.remaining_jobs % 100 == 0:\n            #    print self.remaining_jobs, \"jobs remaining\"\n            #    last_report = self.remaining_jobs\n            # At a point in the middle of the experiment, get the distribution of tasks\n            # on each worker.\n            if not output_worker_loads and self.remaining_jobs == half_jobs:\n                worker_loads = [len(w.free_slots) for w in self.workers]\n                plot_cdf(worker_loads, \"%s_worker_loads.data\" % self.file_prefix)\n                output_worker_loads = True\n\n            current_time, event = self.event_queue.get()\n            assert current_time >= last_time\n            last_time = current_time\n            new_events = event.run(current_time)\n            for new_event in new_events:\n                self.event_queue.put(new_event)\n\n        for worker in self.workers:\n            worker.finish_simulation(last_time)\n        total_slot_ms = len(self.workers) * SLOTS_PER_WORKER * last_time\n        total_idle_ms = sum([x.idle_ms for x in self.workers])\n        fraction_idle = total_idle_ms * 1.0 / total_slot_ms\n\n        rtt = 2 * NETWORK_DELAY\n        total_failed_get_task_ms = (self.total_get_tasks - self.successful_get_tasks) * rtt\n        fraction_failed_get_task = total_failed_get_task_ms * 1.0 / total_slot_ms\n\n        total_failed_stolen_ms = (self.attempted_tasks_stolen - self.tasks_stolen) * rtt\n        fraction_failed_stolen = total_failed_stolen_ms * 1.0 / total_slot_ms\n\n        total_successful_get_task_ms = self.successful_get_tasks * rtt\n        fraction_successful_get_task = total_successful_get_task_ms * 1.0 / total_slot_ms\n        total_successful_stolen_ms = self.tasks_stolen * 2 * NETWORK_DELAY\n        fraction_successful_stolen = total_successful_stolen_ms * 1.0 / total_slot_ms\n        print ((\"Idle time: %s (%s), failed get task time: %s (%s), failed steals time: %s (%s), \"\n                \"successful GetTask()s: %s (%s), successful steals: %s (%s), (total: %s)\") %\n               (total_idle_ms, fraction_idle, total_failed_get_task_ms, fraction_failed_get_task,\n                total_failed_stolen_ms, fraction_failed_stolen,\n                total_successful_get_task_ms, fraction_successful_get_task,\n                total_successful_stolen_ms, fraction_successful_stolen,\n                fraction_idle + fraction_failed_get_task + fraction_failed_stolen +\n                fraction_successful_get_task + fraction_successful_stolen))\n        print (\"Simulation ended after %s milliseconds (%s jobs started, %s tasks stolen)\" %\n               (last_time, len(self.jobs), self.tasks_stolen))\n        total_successful_cancellations = sum([x.successful_cancellations for x in self.workers])\n        print (\"%s/%s cancellations successful\" %\n               (total_successful_cancellations, self.attempted_cancellations))\n\n        tasks_stolen_file = open(\"%s_tasks_stolen\" % self.file_prefix, \"w\")\n        tasks_stolen_file.write(\"Attempts: %s, successes: %s\\n\" %\n                                (self.attempted_tasks_stolen, self.tasks_stolen))\n        tasks_stolen_file.close()\n\n        complete_jobs = [j for j in self.jobs.values() if j.completed_tasks_count == j.num_tasks]\n        print \"%s complete jobs\" % len(complete_jobs)\n        response_times = [job.end_time - job.start_time for job in complete_jobs\n                          if job.start_time > 500]\n        print \"Included %s jobs\" % len(response_times)\n        plot_cdf(response_times, \"%s_response_times.data\" % self.file_prefix)\n        print \"Average response time: \", numpy.mean(response_times)\n\n        wait_times = [j.time_all_tasks_scheduled - j.start_time for j in complete_jobs\n                      if j.start_time > 500]\n        plot_cdf(wait_times, \"%s_wait_times.data\" % self.file_prefix)\n        print \"Average wait time: \", numpy.mean(wait_times)\n\n        num_no_wait_jobs = len([w for w in wait_times if w == 2 * NETWORK_DELAY])\n        frac_no_wait_jobs = num_no_wait_jobs * 1.0 / len(complete_jobs)\n        print \"No wait jobs: %s/%s (%f)\" % (num_no_wait_jobs, len(complete_jobs),\n                                            frac_no_wait_jobs)\n\n        cancellation_time_window = [job.last_probe_reply_time - job.time_all_tasks_scheduled\n                                    for job in complete_jobs]\n        plot_cdf(cancellation_time_window, \"%s_cancellation_window.data\" % self.file_prefix)\n\n        longest_tasks = [job.longest_task for job in complete_jobs]\n        plot_cdf(longest_tasks, \"%s_ideal_response_time.data\" % self.file_prefix)\n        return response_times\n\ndef main():\n    logging.basicConfig(level=logging.ERROR)\n    sim = Simulation(5000, \"test\", 0.8, TaskDistributions.EXP_JOBS)\n    sim.run()\n\nif __name__ == \"__main__\":\n    main()\n"
  },
  {
    "path": "simulation/simulation_centralized.py",
    "content": "#\n# Copyright 2013 The Regents of The University California\n# \n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n# \n#   http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n\n\"\"\" Simulates a central scheduler with a complete cluster view. \"\"\"\n\nimport logging\nimport math\nimport numpy\nimport random\nimport Queue\nfrom util import Job, TaskDistributions\n\nMEDIAN_TASK_DURATION = 100\nNETWORK_DELAY = 0.5\nTASKS_PER_JOB = 100\nSLOTS_PER_WORKER = 4\nTOTAL_WORKERS = 10000\n\ndef get_percentile(N, percent, key=lambda x:x):\n    if not N:\n        return 0\n    k = (len(N) - 1) * percent\n    f = math.floor(k)\n    c = math.ceil(k)\n    if f == c:\n        return key(N[int(k)])\n    d0 = key(N[int(f)]) * (c-k)\n    d1 = key(N[int(c)]) * (k-f)\n    return d0 + d1\n\ndef plot_cdf(values, filename):\n    values.sort()\n    f = open(filename, \"w\")\n    for percent in range(100):\n        fraction = percent / 100.\n        f.write(\"%s\\t%s\\n\" % (fraction, get_percentile(values, fraction)))\n    f.close()\n\nclass Event(object):\n    \"\"\" Abstract class representing events. \"\"\"\n    def __init__(self):\n        raise NotImplementedError(\"Event is an abstract class and cannot be \"\n                                  \"instantiated directly\")\n\n    def run(self, current_time):\n        \"\"\" Returns any events that should be added to the queue. \"\"\"\n        raise NotImplementedError(\"The run() method must be implemented by \"\n                                  \"each class subclassing Event\")\n\nclass JobArrival(Event):\n    \"\"\" Event to signify a job arriving at a scheduler. \"\"\"\n    def __init__(self, simulation, interarrival_delay, task_distribution):\n        self.simulation = simulation\n        self.interarrival_delay = interarrival_delay\n        self.task_distribution = task_distribution\n\n    def run(self, current_time):\n        job = Job(TASKS_PER_JOB, current_time, self.task_distribution, MEDIAN_TASK_DURATION)\n        #print \"Job %s arrived at %s\" % (job.id, current_time)\n        # Schedule job.\n        new_events = self.simulation.schedule_tasks(job, current_time)\n        # Add new Job Arrival event, for the next job to arrive after this one.\n        arrival_delay = random.expovariate(1.0 / self.interarrival_delay)\n        new_events.append((current_time + arrival_delay, self))\n        #print \"Retuning %s events\" % len(new_events)\n        return new_events\n\nclass TaskEndEvent():\n    \"\"\" This event is used to signal to the scheduler that a slot is free (so should include\n    the RTT to notify the scheduler). \"\"\"\n    def __init__(self, simulation):\n        self.simulation = simulation\n\n    def run(self, current_time):\n        return self.simulation.free_slot(current_time)\n\nclass Simulation(object):\n    def __init__(self, num_jobs, file_prefix, load, task_distribution):\n        avg_used_slots = load * SLOTS_PER_WORKER * TOTAL_WORKERS\n        self.interarrival_delay = (1.0 * MEDIAN_TASK_DURATION * TASKS_PER_JOB / avg_used_slots)\n        print (\"Interarrival delay: %s (avg slots in use: %s)\" %\n               (self.interarrival_delay, avg_used_slots))\n        self.jobs = {}\n        self.remaining_jobs = num_jobs\n        self.event_queue = Queue.PriorityQueue()\n        self.num_free_slots = TOTAL_WORKERS * SLOTS_PER_WORKER\n        self.unscheduled_jobs = []\n        self.file_prefix = file_prefix\n        self.task_distribution = task_distribution\n\n    def schedule_tasks(self, job, current_time):\n        self.jobs[job.id] = job\n        self.unscheduled_jobs.append(job)\n        #print \"Job %s arrived at %s\" % (job.id, current_time)\n        return self.maybe_launch_tasks(current_time)\n\n    def maybe_launch_tasks(self, current_time):\n        task_end_events = []\n        while self.num_free_slots > 0 and len(self.unscheduled_jobs) > 0:\n            self.num_free_slots -= 1\n            job = self.unscheduled_jobs[0]\n            task_duration = job.unscheduled_tasks[0]\n            job.unscheduled_tasks = job.unscheduled_tasks[1:]\n            if len(job.unscheduled_tasks) == 0:\n                logging.info(\"Finished scheduling tasks for job %s\" % job.id)\n            #print (\"Launching task for job %s at %s (duration %s); %s remaining slots\" %\n            #       (job.id, current_time + NETWORK_DELAY, task_duration, self.num_free_slots))\n            task_end_time = current_time + task_duration + NETWORK_DELAY\n            scheduler_notify_time = task_end_time + NETWORK_DELAY\n            task_end_events.append((scheduler_notify_time, TaskEndEvent(self)))\n\n            job_complete = job.task_completed(task_end_time)\n            if job_complete:\n                #print \"Completed job %s in %s\" % (job.id, job.end_time - job.start_time)\n                self.remaining_jobs -= 1\n                self.unscheduled_jobs = self.unscheduled_jobs[1:]\n        return task_end_events\n\n    def free_slot(self, current_time):\n        self.num_free_slots += 1\n        return self.maybe_launch_tasks(current_time)\n\n    def run(self):\n        self.event_queue.put((0, JobArrival(self, self.interarrival_delay, self.task_distribution)))\n        last_time = 0\n        while self.remaining_jobs > 0:\n            current_time, event = self.event_queue.get()\n            assert current_time >= last_time\n            last_time = current_time\n            new_events = event.run(current_time)\n            for new_event in new_events:\n                self.event_queue.put(new_event)\n\n        print (\"Simulation ended after %s milliseconds (%s jobs started)\" %\n               (last_time, len(self.jobs)))\n        complete_jobs = [j for j in self.jobs.values() if j.completed_tasks_count == j.num_tasks]\n        print \"%s complete jobs\" % len(complete_jobs)\n        response_times = [job.end_time - job.start_time for job in complete_jobs\n                          if job.start_time > 500]\n        print \"Included %s jobs\" % len(response_times)\n        plot_cdf(response_times, \"%s_response_times.data\" % self.file_prefix)\n        print \"Average response time: \", numpy.mean(response_times)\n\n        longest_tasks = [job.longest_task for job in complete_jobs]\n        plot_cdf(longest_tasks, \"%s_ideal_response_time.data\" % self.file_prefix)\n        return response_times\n\ndef main():\n    logging.basicConfig(level=logging.INFO)\n    sim = Simulation(100000, \"centralized\", 0.95, TaskDistributions.CONSTANT)\n    sim.run()\n\nif __name__ == \"__main__\":\n    main()"
  },
  {
    "path": "simulation/simulation_hacked.py",
    "content": "#\n# Copyright 2013 The Regents of The University California\n# \n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n# \n#   http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n\n\"\"\" All times are in milliseconds.\n\nThe script takes several parameters specified by PARAMS.\n\nOverall layout:\n\nThere are 3 system components: jobs, front ends, and servers.  Front ends are\nresponsible for maintaining the (stale) state for servers, and placing jobs on\nservers according to some algorithm.\n\nThe Simulation class handles running the simulation.  It adds event objects to\nan event queue, and runs the simulation until all jobs have completed.  Useful\ndata is collected using a StatsManager object.\n\"\"\"\n\nimport copy\nimport logging\nimport math\nimport os\nimport Queue\nimport random\nimport sys\n\nimport stats as stats_mod\n        \n# Log levels\nLEVELS = {'debug': logging.DEBUG,\n          'info': logging.INFO,\n          'warning': logging.WARNING,\n          'error': logging.ERROR,\n          'critical': logging.CRITICAL}\n\ndef get_normalized_list(input_str):\n    \"\"\" Returns the comma-separated input string as a normalized list. \"\"\"\n    items = input_str.split(\",\")\n    total = 0.0\n    for item in items:\n        total += float(item)\n    temp_total = 0\n    for index, item in enumerate(items):\n        temp_total += float(item)\n        items[index] = temp_total / total\n    return items\n\ndef get_int_list(input_str):\n    \"\"\" Returns the comma-separated input string as a list of integers. \"\"\"\n    items = input_str.split(\",\")\n    for index, item in enumerate(items):\n        items[index] = int(item)\n    return items\n\n# Parameters\n# param name => [convert func, default value]\nPARAMS = {'num_fes': [int, 1],             # number of frontends\n          'num_servers': [int, 1000],       # number of servers\n          # Number of cores per server, which corresponds to the maximum\n          # number of tasks that can be run concurrently.\n          'cores_per_server': [int, 1],\n          'num_users': [int, 10],           # number of users\n          'total_time': [int, 1e4],   # time over which jobs are arriving\n          # task_distribution describes the distribution of the number of tasks\n          # in a job. Choices are constant (in which case all jobs have\n          # 'num_tasks' tasks) or bimodal, in which case 1/6 of the jobs have\n          # 200 tasks, and the rest have 10 tasks.\n          'task_distribution': [str, \"constant\"],\n          # tasks per job (only used for constant distribution)\n          'num_tasks': [int, 200],\n          # Ratio of number of total probes to number of tasks in each job. -1\n          # signals that all machines should be probed.\n          'probes_ratio': [float, 1.],\n          # Options are \"poisson\" or \"uniform\".\n          'job_arrival_distribution': [str, \"poisson\"],\n          'task_length': [int, 100],        # length of task\n          # Distribution of task lengths.  If set to \"constant\" or\n          # \"exponential\", tasks will be distributed accordingly, with mean\n          # task_length.  If set to \"facebook\", tasks will be distributed based\n          # on what was observed from the facebook data: 95% of tasks in a job\n          # will have length task_length, and 5% will have length\n          # task_length + x, where x is exponentially distributed with mean\n          # 0.1 * task_length.\n          'task_length_distribution': [str, \"constant\"],\n          'log_level': [str, \"info\"],\n          'network_delay': [int, 0], # Network delay\n          'job_arrival_delay': [float, 40], # Arrival delay on each frontend\n          'deterministic': [lambda x: x == \"True\", False], # Use fixed workload \n          'random_seed': [int, 1],   # Seed to use for workload generation\n          'first_time': [lambda x: x == \"True\", True], # Whether this is the\n                                                      # first in a series of\n                                                      # trials (used for\n                                                      # writing output files)\n          'file_prefix': [str, 'results'],\n          'results_dir': [str, 'raw_results'],\n          # queue_selection choices are \"greedy\", which places a single task\n          # on each of the n least loaded nodes, and \"pack\", which\n          # packs multiple tasks on each node to minimize the overall queue\n          # length.\n          'queue_selection': [str, 'greedy'],\n          # The metric to return when a server is probed for its load.  Options\n          # are 'total', which returns the total queue length, 'estimate',\n          # which returns an estimated queue length based on other probes it's\n          # received, and 'per_user_length', which returns the length of the\n          # queue for that particular user, and 'per_user_estimate', which\n          # returns an estimate of when a task for the given user will be run.\n          'load_metric': [str, 'total'],\n          # Number of machines that each task can run on. Setting this to zero\n          # is equivalent to having unconstrained tasks.\n          'choices_per_task': [int, 0],\n          # Comma separated list of relative demands for each user.  When\n          # creating tasks, they are assigned randomly to users based on these\n          # demands.  An empty list (the default) means that all users have equal demand.\n          'relative_demands': [get_normalized_list, []],\n          # comma separated list of relative weights with which to run tasks\n          # for each user.  Currently, only integers are supported.\n          'relative_weights': [get_int_list, []],\n          # Whether extra queue state should be recorded.\n          'record_queue_state': [lambda x: x == \"True\", False],\n          # Whether to record information about individual tasks, including\n          # expected load (based on the probe) and runtime.\n          'record_task_info': [lambda x: x == \"True\", False]\n         }\n\ndef get_param(key):\n    return PARAMS[key][1]\n\ndef output_params():\n    results_dirname = get_param('results_dir')\n    f = open(os.path.join(results_dirname, \n                          \"%s.params\" % get_param(\"file_prefix\")), \"w\")\n    for key, value in PARAMS.items():\n        f.write(\"%s: %s\\n\" % (key, value[1]))\n    f.close()\n\ndef set_param(key, val):\n    convert_func = PARAMS[key][0]\n    PARAMS[key][1] = convert_func(val)\n\n###############################################################################\n#                    Components: Jobs, Servers, oh my!                        #\n###############################################################################\n\nclass Job(object):\n    \"\"\" Represents a job.\n    \n    Attributes:\n        arrival_time: Time the job arrives at the front end.\n        num_tasks: Integer specifying the number of tasks needed for the job.\n        longest_task: Runtime (in ms) of the longest task.\n    \"\"\"\n    def __init__(self, user_id, arrival_time, num_tasks, \n                 task_length, stats_manager, id_str, servers):\n        self.user_id = user_id\n        self.arrival_time = arrival_time\n        self.first_task_completion = -1\n        self.completion_time = -1\n        self.num_tasks = num_tasks\n        self.task_length = task_length\n        self.stats_manager = stats_manager\n        self.id_str = str(id_str)\n        self.tasks_finished = 0\n        self.longest_task = 0\n        \n        choices_per_task = get_param(\"choices_per_task\")\n        if choices_per_task > 0:\n            self.constraints = []\n            for task in range(self.num_tasks):\n                self.constraints.append(random.sample(servers,\n                                                      choices_per_task))\n        \n        if get_param(\"record_task_info\"):\n            # Expected load (based on the probe) and actual wait time for all\n            # tasks, indexed by the task id.\n            self.probe_results = []\n            self.wait_times = []\n            while len(self.probe_results) < self.num_tasks:\n                self.probe_results.append(-1)\n                self.wait_times.append(-1)\n        \n    def get_task_length(self, task_id):\n        \"\"\" Returns the time the current task takes to execute.\n\n        This should only be called once for each task! Otherwise it is likely\n        to return inconsistent results.\n        \"\"\"\n        task_length = self.task_length\n        if get_param(\"task_length_distribution\") == \"exponential\":\n            task_length = random.expovariate(1.0 / self.task_length)\n        elif get_param(\"task_length_distribution\") == \"facebook\":\n            if random.random() > 0.95:\n                task_length += random.expovariate(10.0 / self.task_length)\n        self.longest_task = max(self.longest_task, task_length)\n        return task_length\n    \n    def record_probe_result(self, task_id, load):\n        \"\"\" Records the expected load on the machine for the given task.\n        \n        This function should only be called if the \"record_task_info\" parameter\n        is true.\n        \"\"\"\n        assert get_param(\"record_task_info\")\n        assert task_id < self.num_tasks\n        self.probe_results[task_id] = load\n        \n    def record_wait_time(self, task_id, launch_time):\n        assert get_param(\"record_task_info\")\n        assert task_id < self.num_tasks\n        self.wait_times[task_id] = launch_time - self.arrival_time\n        \n    def task_finished(self, current_time):\n        \"\"\" Should be called whenever a task completes.\n        \n        Sends stats to the stats manager.\n        \"\"\"\n        if self.tasks_finished == 0:\n            self.first_task_completion = current_time\n        self.tasks_finished += 1\n        self.stats_manager.task_finished(self.user_id, current_time)\n        if self.tasks_finished == self.num_tasks:\n            self.completion_time = current_time\n            self.stats_manager.job_finished(self)\n        \n    def response_time(self):\n        assert(self.completion_time != -1)\n        return self.completion_time - self.arrival_time\n    \n    def service_time(self):\n        assert(self.completion_time != -1)\n        assert(self.first_task_completion != -1)\n        return self.completion_time - self.first_task_completion\n    \n    def wait_time(self):\n        assert(self.first_task_completion != -1)\n        return self.first_task_completion - self.arrival_time\n        \nclass Server(object):\n    \"\"\" Represents a back end server, which runs jobs. \"\"\"\n    \n    def __init__(self, id_str, stats_manager, num_users):\n        self.num_users = num_users\n        # List of queues for each user, indexed by the user id.  Each queue\n        # contains (job, task_id) pairs.\n        self.queues = []\n        for user in range(self.num_users):\n            self.queues.append([])\n        self.num_cores = get_param(\"cores_per_server\")\n        assert self.num_cores >= 1\n        # Number of currently running tasks.\n        self.running_tasks = 0\n        self.queued_tasks = 0\n        # Index of the user whose task was most recently launched.\n        self.current_user = 0\n        # Count of tasks that have been launched in this scheduling round for\n        # self.current_user.\n        self.task_count = 0\n        self.id_str = str(id_str)        \n        self.stats_manager = stats_manager\n        # An ordered list of probes received for this machine\n        self.probes = []\n        self.logger = logging.getLogger(\"Server\")\n        \n        #if self.relative_weights == []:\n        #    for user in range(self.num_users):\n        #        self.relative_weights.append(1)\n        #assert self.num_users == len(self.relative_weights)\n        \n    def __str__(self):\n        return self.id_str\n        \n    def probe_load(self, user_id, current_time):\n        \"\"\" Returns the current load on the machine, based on 'load_metric'.\n        \"\"\"\n        if get_param(\"load_metric\") == \"estimate\":\n            probe_start = current_time - 2 * get_param(\"network_delay\")\n            start_index = 0\n            while start_index < len(self.probes) and \\\n                    self.probes[start_index] <= probe_start:\n                start_index += 1\n            self.probes = self.probes[start_index:]\n            estimated_load = (self.queued_tasks + self.running_tasks +\n                              len(self.probes))\n            self.probes.append(current_time)\n            return estimated_load\n        elif get_param(\"load_metric\") == \"per_user_length\":\n            return len(self.queues[user_id])\n        elif get_param(\"load_metric\") == \"per_user_estimate\":\n            relative_weights = get_param(\"relative_weights\")\n            # First, we compute the number of rounds needed to empty user_id's\n            # queue and run the potential new task.  Based on that number of\n            # rounds, we examine the queues for all users to determine how\n            # many tasks will run before the potential task for user_id.\n    \n            # Tasks that will be run before a task for the given user_id\n            # (including any currently running tasks, since we realistically\n            # assume that we don't know when these will complete).\n            total_tasks_before = self.running_tasks\n            # Compute the number of rounds (including the current one) needed to empty\n            # the queue and ultimately run the task for this user.  1 indicates\n            # that the task will be run as part of the current round, and so forth.\n            queue_length = len(self.queues[user_id]) + 1\n            if self.current_user == user_id:\n                queue_length += self.task_count\n            rounds = math.ceil(float(queue_length) /\n                               relative_weights[user_id])\n            # Whether the user specified by index (below) comes after user_id\n            # in the scheduling round.\n            past_user = False\n            for count in range(len(self.queues)):\n                index = (count + self.current_user) % len(self.queues)\n                if past_user:\n                    # The user specified by index comes after user_id, so\n                    # there will be one less scheduling round before\n                    # index.\n                    potential_tasks_before = ((rounds - 1) *\n                                              relative_weights[index])\n                else:\n                    potential_tasks_before = (rounds *\n                                              relative_weights[index])\n                if self.running_tasks > 0 and self.current_user == index:\n                    # Account for tasks that have already run in this round.\n                    potential_tasks_before -= self.task_count\n                tasks_before = min(len(self.queues[index]),\n                                   potential_tasks_before)\n                    \n                total_tasks_before += tasks_before\n\n                if index == user_id:\n                    past_user = True\n            return total_tasks_before\n        else:\n            return self.queued_tasks + self.running_tasks\n\n    def queue_task(self, job, task_index, current_time):\n        \"\"\" Adds the given job to the queue of tasks.\n        \n        Begins running the task, if there are no other tasks in the queue.\n        Returns a TaskCompletion event, if there are no tasks running.\n        \"\"\"\n        self.queued_tasks += 1\n        self.queues[job.user_id].append((job, task_index))\n        self.stats_manager.task_queued(job.user_id, current_time)\n        if self.running_tasks < self.num_cores:\n            # Not all cores are in use, so launch this task.\n            return [self.__launch_task(current_time)]\n        \n    def task_finished(self, user_id, current_time):\n        \"\"\" Removes the task from the queue, and begins running the next task.\n        \n        Returns a TaskCompletion for the next task, if one exists. \"\"\"\n        assert self.running_tasks > 0\n        self.running_tasks -= 1\n        if self.queued_tasks > 0:\n            # If there are queued tasks, all but the core just freed should be\n            # in use.\n            assert self.running_tasks == self.num_cores - 1\n            return [self.__launch_task(current_time)]\n        \n    def __launch_task(self, current_time):\n        \"\"\" Launches the next task in the queue on a free core.\n        \n        Returns an event for the launched task's completion.\n        \"\"\"\n        assert self.queued_tasks > 0\n        assert self.running_tasks < self.num_cores\n\n        self.queued_tasks -= 1\n        if not len(get_param(\"relative_weights\")) > self.current_user:\n            print get_param(\"relative_weights\"), self.current_user\n            assert False\n        tasks_per_round = get_param(\"relative_weights\")[self.current_user]\n        if self.task_count >= tasks_per_round:\n            # Move on to the next user.\n            self.task_count = 0\n            self.current_user = (self.current_user + 1) % self.num_users\n\n        while len(self.queues[self.current_user]) == 0:\n            self.current_user = (self.current_user + 1) % self.num_users\n            self.task_count = 0\n        # Get the first task from the queue\n        job, task_id = self.queues[self.current_user][0]\n        # Remove the task from the user's queue.\n        self.queues[self.current_user] = self.queues[self.current_user][1:]\n        self.task_count += 1\n        assert job.user_id == self.current_user\n        task_length = job.get_task_length(task_id)\n        event = (current_time + task_length, TaskCompletion(job, self))\n        self.stats_manager.task_started(self.current_user, current_time)\n        self.time_started = current_time\n        if get_param(\"record_task_info\"):\n            job.record_wait_time(task_id, current_time)\n        self.running_tasks += 1\n        return event\n    \nclass ConstraintFrontEnd(object):\n    \"\"\" A front end server that handles placing jobs that have constraints. \"\"\"\n    def __init__(self, servers, id_str, stats_manager):\n        self.servers = servers\n        self.stats_manager = stats_manager\n        self.id_str = str(id_str)\n        self.probes_per_task = int(math.ceil(get_param(\"probes_ratio\")))\n        \n    def place_job(self, job, current_time):\n        \"\"\" Begins the process of placing the job and returns the probe events.\n        \"\"\"\n        assert len(job.constraints) == job.num_tasks\n        candidates = []\n        for task_constraints in job.constraints:\n            # Machines that aren't already being probed.\n            unused = [s for s in task_constraints if s not in candidates]\n            if len(unused) < self.probes_per_task:\n                candidates.extend(unused)\n            else:\n                candidates.extend(random.sample(unused, self.probes_per_task))\n        probe_event = Probe(self, job, candidates)\n        return [(current_time + get_param(\"network_delay\"), probe_event)]\n    \n    def probe_completed(self, job, queue_lengths, current_time):\n        \"\"\" Sends the job to server(s) based on the result of the probe.\n        \n        Returns the task arrival events.\n        \"\"\"\n        events = []\n        task_arrival_time = current_time + get_param(\"network_delay\")\n        used = {}\n        all_empty_queues = True\n        for counter, task_constraints in enumerate(job.constraints):\n            servers = [s for s in queue_lengths if s[0] in task_constraints]\n            best = min(servers, key=lambda x: x[1])\n            if best[1] > 0:\n                all_empty_queues = False  \n            # Increment the load on the chosen server.  Assumes value returned\n            # is in units of one task.\n            queue_lengths.remove(best)\n            queue_lengths.append((best[0], best[1] + 1))\n            if get_param(\"record_task_info\"):\n                job.record_probe_result(counter, best[1])\n            events.append((task_arrival_time,\n                           TaskArrival(best[0], job, counter)))\n        if all_empty_queues:\n            self.stats_manager.record_job_with_all_empty_queues()\n        return events\n        \nclass FrontEnd(object):\n    \"\"\" Represents a front end server, which places jobs.\n    \"\"\"\n    def __init__(self, servers, id_str, stats_manager):\n        self.servers = servers\n        self.stats_manager = stats_manager\n        self.id_str = str(id_str)\n        self.logger = logging.getLogger(\"FrontEnd\")\n        \n    def place_job(self, job, current_time):\n        \"\"\" Begins the process of placing the job and returns the probe events.\n        \"\"\"\n        servers_copy = copy.copy(self.servers)\n        random.shuffle(servers_copy)\n        num_probes = get_param(\"num_servers\")\n        if get_param(\"probes_ratio\") >= 1:\n            num_probes = int(round(job.num_tasks * get_param(\"probes_ratio\")))\n        assert num_probes <= len(self.servers)\n        candidates = servers_copy[:num_probes]\n        \n        network_delay = get_param(\"network_delay\")\n        probe_event = Probe(self, job, candidates)\n        return [(current_time + network_delay, probe_event)]\n    \n    def probe_completed(self, job, queue_lengths, current_time):\n        \"\"\" Sends the job to server(s) based on the result of the probe.\n        \n        Returns the task arrival events.\n        \"\"\"\n        events = []\n        task_arrival_time = current_time + get_param(\"network_delay\")\n        all_empty_queues = True\n        for (counter, (server, length)) in enumerate(\n                self.get_best_n_queues(queue_lengths, job.num_tasks)):\n            if get_param(\"record_task_info\"):\n                job.record_probe_result(counter, length)\n            events.append((task_arrival_time,\n                           TaskArrival(server, job, counter)))\n            if length >= get_param(\"cores_per_server\"):\n                all_empty_queues = False\n            #self.logger.debug(\"\\t%d\\tAssigning job %s for user %d to %s\" % \n            #                  (current_time, job.id_str, job.user_id,\n            #                   server.id_str))\n        if all_empty_queues:\n            self.stats_manager.record_job_with_all_empty_queues()\n        return events\n      \n    def get_best_n_queues(self, queue_lengths, n):\n        \"\"\" Given an array of queue lengths, assign n tasks to those queues.\n\n        Returns a sublist of queue_lengths with the chosen queues.\n        \"\"\"\n        queue_lengths.sort(key = lambda k: k[1])\n\n        queue_selection = get_param(\"queue_selection\")\n        if queue_selection == \"greedy\":\n            assert len(queue_lengths) >= n\n            return queue_lengths[:n]\n        elif queue_selection == \"pack\" or queue_selection == \"reverse_pack\":\n            # Pack multiple tasks into servers to minimize the longest queue\n            # length.\n            longest_queue = 0\n            tasks_placed = 0\n            sublist = []\n            for i, (server, length) in enumerate(queue_lengths):\n                while length > longest_queue:\n                    if queue_selection == \"pack\":\n                        for prev_server, prev_length in queue_lengths[:i]:\n                            sublist.append((prev_server, longest_queue))\n                    if queue_selection == \"reverse_pack\":\n                        for prev_server, prev_length in \\\n                                reversed(queue_lengths[:i]):\n                            sublist.append((prev_server, longest_queue))\n                    longest_queue += 1\n                if len(sublist) >= n:\n                    return sublist[:n]\n            # Distribute jobs over remaining servers\n            while len(sublist) < n:\n                if queue_selection == \"pack\":\n                    for prev_server, prev_length in queue_lengths[:i]:\n                        sublist.append((prev_server, longest_queue))\n                        if len(sublist) >= n:\n                            return sublist\n                elif queue_selection == \"reverse_pack\":\n                    for prev_server, prev_length in reversed(queue_lengths[:i]):\n                        sublist.append((prev_server, longest_queue))\n                        if len(sublist) >= n:\n                            return sublist\n                longest_queue += 1\n            assert(False)\n        elif queue_selection == \"patrick\":\n            # Longest queue we'd have to place a task in, using the greedy\n            # policy.\n            longest_queue = queue_lengths[n - 1][1]\n            # This is used to store the index of the last queue with length\n            # at MOST longest_queue.\n            last_index = n - 1\n            while last_index < len(queue_lengths) and \\\n                    queue_lengths[last_index][1] <= longest_queue:\n                last_index += 1\n            return queue_lengths[last_index - n:last_index]\n\n        # default, return first n queues\n        self.logger.warn(\"Specified queue parameter, %s, is not a valid option\"\n                         % queue_selection)\n        return queue_lengths[:n]\n\n\n###############################################################################\n#                                   Events                                    #\n###############################################################################\n\nclass Event(object):\n    \"\"\" Abstract class representing events. \"\"\"\n    def __init__(self):\n        raise NotImplementedError(\"Event is an abstract class and cannot be \"\n                                  \"instantiated directly\")\n    \n    def run(self, current_time):\n        \"\"\" Returns any events that should be added to the queue. \"\"\"\n        raise NotImplementedError(\"The run() method must be implemented by \"\n                                  \"each class subclassing Event\")\n        \nclass RecordQueueState(Event):\n    \"\"\" Event to periodically record information about the worker queues. \"\"\"\n    def __init__(self, servers, stats_manager, query_interval):\n        self.servers = servers\n        self.stats_manager = stats_manager\n        self.query_interval = query_interval\n        \n    def run(self, current_time):\n        queue_lengths = []\n        for server in self.servers:\n            queue_lengths.append(server.queue_length)\n        self.stats_manager.record_queue_lengths(queue_lengths)\n        \n        return [(current_time + self.query_interval, self)]\n        \nclass JobArrival(Event):\n    \"\"\" Event to handle jobs arriving at a front end. \"\"\"\n    def __init__(self, job, front_end):\n        self.job = job\n        self.front_end = front_end\n        \n    def run(self, current_time):\n        return self.front_end.place_job(self.job, current_time)\n    \nclass TaskArrival(Event):\n    \"\"\" Event to handle a task arriving at a server. \"\"\"\n    def __init__(self, server, job, task_index):\n        self.server = server\n        self.job = job\n        self.task_index = task_index\n        \n    def run(self, current_time):\n        return self.server.queue_task(self.job, self.task_index, current_time)\n        \nclass TaskCompletion(Event):\n    \"\"\" Event to handle tasks completing. \"\"\"\n    def __init__(self, job, server):\n        self.job = job\n        self.server = server\n    \n    def run(self, current_time):\n        self.job.task_finished(current_time)\n        return self.server.task_finished(self.job.user_id, current_time)\n        \nclass Probe(Event):\n    \"\"\" Event to probe a list of servers for their current queue length.\n    \n    This event is used for both a probe and a probe reply to avoid copying\n    state to a new event.  Whether the queue_lengths variable has been\n    populated determines what type of event it's currently being used for. \"\"\"\n    def __init__(self, front_end, job, servers):\n        self.front_end = front_end\n        self.job = job\n        self.servers = servers\n        self.queue_lengths = []\n    \n    def run(self, current_time):\n        events = []\n        if len(self.queue_lengths) == 0:\n            # Need to collect state.\n            for server in self.servers:\n                self.queue_lengths.append((server,\n                                           server.probe_load(self.job.user_id,\n                                                             current_time)))\n            return [(current_time + get_param(\"network_delay\"), self)]\n        else:\n            # Already collected state; returning to front end.\n            return self.front_end.probe_completed(self.job, self.queue_lengths,\n                                                  current_time)\n\n###############################################################################\n#               Practical things needed for the simulation                    #\n###############################################################################\n\nclass StatsManager(object):\n    \"\"\" Keeps track of statistics about job latency, throughput, etc.\n    \"\"\"\n    def __init__(self):\n        self.total_enqueued_tasks = 0\n        # Total enqueued jobs per-user over time, stored as a list of\n        # (time, queue_length) tuples.\n        self.enqueued_tasks = []\n        for user in range(get_param(\"num_users\")):\n            self.enqueued_tasks.append([])\n        self.completed_jobs = []\n        \n        # Count of jobs for which all tasks were placed in an empty queue.\n        self.jobs_with_all_empty_queues = 0\n        \n        # Number of running tasks for each user (indexed by user id).\n        # Stored as a list of (time, queue_length) tuples for each user.\n        self.running_tasks = []\n        \n        self.new_running_tasks = []\n        first = []\n        for user in range(get_param(\"num_users\")):\n            first.append(0)\n        self.new_running_tasks.append((0, first))\n        # List of (time, queue_length) tuples describing the total number of\n        # running tasks in the cluster.\n        self.total_running_tasks = []\n        for user in range(get_param(\"num_users\")):\n            self.running_tasks.append([])\n\n        self.logger = logging.getLogger(\"StatsManager\")        \n        \n        # Logging for queue lengths.\n        # Length of individual queues, at fixed intervals.\n        self.queue_lengths = []\n        # Number of empty queues, at fixed intervals.\n        self.empty_queues = []\n\n        # Calculate utilization\n        avg_num_tasks = get_param(\"num_tasks\")\n        if get_param(\"task_distribution\") == \"bimodal\":\n            avg_num_tasks = (200. / 6) + (10 * 5. / 6)\n        tasks_per_milli = (float(get_param('num_fes') * avg_num_tasks) /\n                           get_param('job_arrival_delay'))\n\n        capacity_tasks_per_milli = (float(get_param('num_servers') *\n                                          get_param(\"cores_per_server\")) /\n                                    get_param('task_length'))\n        self.utilization = tasks_per_milli / capacity_tasks_per_milli\n\n        self.logger.info(\"Utilization: %s\" % self.utilization)\n\n    def record_job_with_all_empty_queues(self):\n        self.jobs_with_all_empty_queues += 1\n        \n    def record_queue_lengths(self, queue_lengths):\n        num_empty_queues = 0\n        for length in queue_lengths:\n            if length == 0:\n                num_empty_queues += 1\n            self.queue_lengths.append(length)\n        self.empty_queues.append(num_empty_queues)\n\n    def task_queued(self, user_id, current_time):\n        num_queued_tasks = 1\n        queued_tasks_history = self.enqueued_tasks[user_id]\n        if len(queued_tasks_history) > 0:\n            num_queued_tasks = queued_tasks_history[-1][1] + 1\n            assert num_queued_tasks >= 1\n        queued_tasks_history.append((current_time, num_queued_tasks))\n        self.total_enqueued_tasks += 1\n        \n    def task_started(self, user_id, current_time):\n        \"\"\" Should be called when a task begins running. \"\"\"\n        # Infer number of currently running tasks.\n        num_running_tasks = 1\n        if len(self.running_tasks[user_id]) > 0:\n            num_running_tasks = self.running_tasks[user_id][-1][1] + 1\n            assert num_running_tasks >= 1\n        self.running_tasks[user_id].append((current_time, num_running_tasks))\n        \n        # NEW\n        new_running = list(self.new_running_tasks[-1][1])\n        new_running[user_id] += 1\n        assert new_running[user_id] >= 1\n        self.new_running_tasks.append((current_time, new_running))\n        \n        total_running_tasks = 1\n        if len(self.total_running_tasks) > 0:\n            total_running_tasks = self.total_running_tasks[-1][1] + 1\n            assert total_running_tasks > 0\n        self.total_running_tasks.append((current_time, total_running_tasks))\n\n    def task_finished(self, user_id, current_time):\n        assert len(self.running_tasks[user_id]) > 0\n        num_running_tasks = self.running_tasks[user_id][-1][1] - 1\n        assert num_running_tasks >= 0\n        self.running_tasks[user_id].append((current_time, num_running_tasks))\n        \n        assert len(self.total_running_tasks) > 0\n        total_running_tasks = self.total_running_tasks[-1][1] - 1\n        assert total_running_tasks >= 0\n        self.total_running_tasks.append((current_time, total_running_tasks))\n        \n        # NEW\n        assert len(self.new_running_tasks) > 0\n        old_running = list(self.new_running_tasks[-1][1])\n        old_running[user_id] -= 1\n        self.new_running_tasks.append((current_time, old_running))\n        \n        assert self.total_enqueued_tasks > 0\n        self.total_enqueued_tasks -= 1\n        queued_tasks_history = self.enqueued_tasks[user_id]\n        assert len(queued_tasks_history) > 0\n        num_queued_tasks = queued_tasks_history[-1][1] - 1\n        assert num_queued_tasks >= 0\n        queued_tasks_history.append((current_time, num_queued_tasks))\n        \n    def job_finished(self, job):\n        self.completed_jobs.append(job)\n\n    def output_stats(self):\n        assert(self.total_enqueued_tasks == 0)\n        results_dirname = get_param('results_dir')\n        try:\n            os.mkdir(results_dirname)\n        except:\n            pass\n        \n        if get_param(\"record_task_info\"):\n            if get_param(\"load_metric\") in [\"total\", \"estimate\"]:\n                self.output_wait_time_cdf()\n            else:\n                self.output_load_versus_launch_time()\n        self.output_running_tasks()\n        self.output_bucketed_running_tasks()\n        #self.output_queue_size()\n       # self.output_queue_size_cdf()\n        #self.output_job_overhead()\n        self.output_response_times()\n        self.write_stacked_response_times()\n        \n        if get_param(\"num_users\") > 1:\n            for user_id in range(get_param(\"num_users\")):\n                self.output_response_times(user_id)\n         \n        # This can be problematic for small total runtimes, since the number\n        # of jobs with 200 tasks may be just 1 or 0.    \n        if get_param(\"task_distribution\") == \"bimodal\":\n            self.output_per_job_size_response_time()\n            \n    def output_load_versus_launch_time(self):\n        \"\"\" Outputs the predicted load and launch time for each task.\n        \n        This information is intended to help evaluate the staleness of the\n        load information from the probe.  If the information is quite stale,\n        we'd expect to see little correlation between the load and the launch\n        time of the task.\n        \"\"\"\n        results_dirname = get_param(\"results_dir\")\n        per_task_filename = os.path.join(results_dirname,\n                                         \"%s_task_load_vs_wait\" %\n                                         get_param(\"file_prefix\"))\n        per_task_file = open(per_task_filename, \"w\")\n        per_task_file.write(\"load\\twait_time\\n\")\n        \n        per_job_filename = os.path.join(results_dirname,\n                                        \"%s_job_load_vs_wait\" %\n                                        get_param(\"file_prefix\"))\n        per_job_file = open(per_job_filename, \"w\")\n        per_job_file.write(\"load\\twait_time\\n\")\n        for job in self.completed_jobs:\n            # Launch time and expected load for the last task to launch.\n            longest_task_wait = -1\n            longest_task_load = -1\n            for task_id in range(job.num_tasks):\n                load = job.probe_results[task_id]\n                wait = job.wait_times[task_id]\n                if wait > longest_task_wait:\n                    longest_task_wait = wait\n                    longest_task_load = load\n                per_task_file.write(\"%f\\t%f\\n\" % (load, wait))\n                \n            per_job_file.write(\"%f\\t%f\\n\" % (longest_task_load,\n                                             longest_task_wait))\n        per_job_file.close()\n        per_task_file.close()\n        \n    def output_wait_time_cdf(self):\n        \"\"\" Outputs a CDF of wait times for each probe response.\n        \n        This function should only be called if the load metric is total,\n        since otherwise, the probe responses will be non-integral (and there\n        will be potentially a large number of different responses), so the\n        output format used here won't make sense.\n        \n        Outputs two files, one with a CDF for all tasks, and one with\n        a CDF for the longest task in each job.\n        \"\"\"\n        results_dirname = get_param(\"results_dir\")\n        job_filename = os.path.join(results_dirname, \"%s_job_wait_cdf\" %\n                                    get_param(\"file_prefix\"))\n        job_file = open(job_filename, \"w\")\n        task_filename = os.path.join(results_dirname, \"%s_task_wait_cdf\" %\n                                     get_param(\"file_prefix\"))\n        task_file = open(task_filename, \"w\")\n        \n        # Dictionary mapping loads (as returned by probes) to a list of wait\n        # times for the corresponding tasks.\n        wait_times_per_load = {}\n        # Wait times for the last task in each job.\n        longest_wait_times_per_load = {}\n        for job in self.completed_jobs:\n            longest_task_wait = -1\n            longest_task_load = -1\n            for task_id in range(job.num_tasks):\n                load = job.probe_results[task_id]\n                wait = job.wait_times[task_id]\n                if wait > longest_task_wait:\n                    longest_task_wait = wait\n                    longest_task_load = load\n                if load not in wait_times_per_load:\n                    wait_times_per_load[load] = []\n                wait_times_per_load[load].append(wait)\n            if longest_task_load not in longest_wait_times_per_load:\n                longest_wait_times_per_load[longest_task_load] = []\n            longest_wait_times_per_load[longest_task_load].append(\n                    longest_task_wait)\n        \n        task_file.write(\"Percentile\\t\")\n        job_file.write(\"Percentile\\t\")\n        for load in sorted(wait_times_per_load.keys()):\n            wait_times_per_load[load].sort()\n            task_file.write(\"%f(%d)\\t\" %\n                            (load, len(wait_times_per_load[load])))\n        task_file.write(\"\\n\")\n        for load in sorted(longest_wait_times_per_load.keys()):\n            longest_wait_times_per_load[load].sort()\n            job_file.write(\"%f(%d)\\t\" %\n                           (load, len(longest_wait_times_per_load[load])))\n        job_file.write(\"\\n\")\n\n        percentile_granularity = 200\n        for i in range(percentile_granularity):\n            percentile = float(i) / percentile_granularity\n            job_file.write(\"%f\" % percentile)\n            task_file.write(\"%f\" % percentile)\n            for load in sorted(longest_wait_times_per_load.keys()):\n                job_file.write(\"\\t%f\" % self.percentile(\n                        longest_wait_times_per_load[load], percentile))\n            job_file.write(\"\\n\")\n            for load in sorted(wait_times_per_load.keys()):\n                task_file.write(\"\\t%f\" %\n                                self.percentile(wait_times_per_load[load],\n                                                percentile))\n            task_file.write(\"\\n\")\n        job_file.close()\n            \n    def output_bucketed_running_tasks(self):\n        \"\"\" Writes the number of running tasks for each user.\n        \n        The number of running tasks are bucketed over some interval, to give\n        a sense of fairness over time. \"\"\"\n        bucketed_running_tasks_per_user = []\n        bucket_interval = 100\n        \n        results_dirname = get_param(\"results_dir\")\n        filename = os.path.join(results_dirname,\n                                \"%s_bucketed_running_tasks\" %\n                                get_param(\"file_prefix\"))\n        file = open(filename, \"w\")\n        file.write(\"time\\t\")\n\n        for user_id in range(get_param(\"num_users\")):\n            bucketed_running_tasks = []\n            # Total number of CPU milliseconds used during this bucket.\n            cpu_millis = 0\n            current_running_tasks = 0\n            # Last time we got a measurement for the number of running tasks.\n            previous_time = 0\n            # Beginning of the current bucket.\n            bucket_start_time = 0\n            for time, running_tasks in self.running_tasks[user_id]:\n                while time > bucket_start_time + bucket_interval:\n                    # Roll over to next bucket.\n                    bucket_end_time = bucket_start_time + bucket_interval\n                    cpu_millis += (current_running_tasks *\n                                   (bucket_end_time - previous_time))\n                    bucketed_running_tasks.append(cpu_millis)\n                    cpu_millis = 0\n                    previous_time = bucket_end_time\n                    bucket_start_time = bucket_end_time\n                cpu_millis += current_running_tasks * (time - previous_time)\n                previous_time = time\n                current_running_tasks = running_tasks\n            bucketed_running_tasks_per_user.append(bucketed_running_tasks)\n            \n        file.write(\"total\\n\")\n            \n        # Write bucketed running tasks to file.\n        num_buckets = len(bucketed_running_tasks_per_user[0])\n        for bucket_index in range(num_buckets):\n            file.write(\"%d\\t\" % (bucket_index * bucket_interval))\n            total_cpu_millis = 0\n            for user_id in range(get_param(\"num_users\")):\n                running_tasks = bucketed_running_tasks_per_user[user_id]\n                if len(running_tasks) > bucket_index:\n                    cpu_millis = running_tasks[bucket_index]\n                else:\n                    cpu_millis = 0\n                total_cpu_millis += cpu_millis\n                file.write(\"%d\\t\" % cpu_millis)\n            file.write(\"%d\\n\" % total_cpu_millis)\n            \n    def output_running_tasks(self):\n        \"\"\" Output the number of tasks running over time.\n        \n        Outputs the number of tasks per user, as well as the number of running\n        tasks overall.\n        \"\"\"\n        results_dirname = get_param(\"results_dir\")\n        for user_id in range(get_param(\"num_users\")):\n            filename = os.path.join(results_dirname, \"%s_running_tasks_%d\" %\n                                    (get_param(\"file_prefix\"), user_id))\n            running_tasks_file = open(filename, \"w\")\n            self.write_running_tasks(running_tasks_file,\n                                     self.running_tasks[user_id])\n            running_tasks_file.close()\n            \n        # Output aggregate running tasks.\n        filename = os.path.join(results_dirname, \"%s_running_tasks\" %\n                                get_param(\"file_prefix\"))\n        running_tasks_file = open(filename, \"w\")\n        self.write_running_tasks(running_tasks_file, self.total_running_tasks)\n        running_tasks_file.close()    \n        \n    def write_running_tasks(self, file, tasks_list):\n        \"\"\" Writes a list of (time, num_tasks) tuples to file.\n        \n        Consolidates tuples occurring at the same time, and writes the\n        list in reverse order. \"\"\"\n        file.write(\"time\\trunning_tasks\\n\")\n        previous_time = -1\n        # Write in reverse order so that we automatically get the last event\n        # for each time.\n        for time, running_tasks in reversed(tasks_list):\n            if time != previous_time:\n                if previous_time != -1:\n                    file.write(\"%d\\t%d\\n\" % (previous_time, running_tasks))\n                file.write(\"%d\\t%d\\n\" % (time, running_tasks))\n            previous_time = time\n  \n    def output_queue_size(self):\n        \"\"\" Output the queue size over time. \"\"\"\n        results_dirname = get_param('results_dir')\n        filename = os.path.join(results_dirname,\n                                '%s_%s' % (get_param('file_prefix'),\n                                           'queued_tasks'))\n        queued_tasks_file = open(filename, 'w')\n        queued_tasks_file.write('time\\ttotal_queued_tasks\\n')\n        for time, queued_tasks in self.enqueued_tasks:\n            queued_tasks_file.write('%s\\t%s\\n' % (time, queued_tasks))\n        queued_tasks_file.close()\n        \n    def output_queue_size_cdf(self):\n        \"\"\" Output the cumulative probabilities of queue sizes. \n        \"\"\"\n        results_dirname = get_param(\"results_dir\")\n        filename = os.path.join(results_dirname,\n                                \"%s_%s\" % (get_param(\"file_prefix\"),\n                                           \"queue_cdf\"))\n        queue_cdf_file = open(filename, \"w\")\n        queue_cdf_file.write(\"%ile\\tQueueSize\\n\")\n        \n        queue_sizes = []\n        for time, queued_tasks in self.enqueued_tasks:\n            queue_sizes.append(queued_tasks)\n        queue_sizes.sort()\n        \n        stride = max(1, len(queue_sizes) / 200)\n        for index, queue_size in enumerate(queue_sizes[::stride]):\n            percentile = (index + 1) * stride * 1.0 / len(queue_sizes)\n            queue_cdf_file.write(\"%f\\t%f\\n\" % (percentile, queue_size))\n        queue_cdf_file.close()\n            \n    def output_job_overhead(self):\n        \"\"\" Write job completion time and longest task for every job to a file.\n        \"\"\"\n        results_dirname = get_param(\"results_dir\")\n        filename = os.path.join(results_dirname,\n                                \"%s_%s\" % (get_param(\"file_prefix\"),\n                                           \"overhead\"))\n        overhead_file = open(filename, \"w\")\n        overhead_file.write(\"ResponseTime\\tLongestTask\\n\")\n        for job in self.completed_jobs:\n            overhead_file.write(\"%d\\t%d\\n\" %\n                                (job.response_time(), job.longest_task))\n        overhead_file.close()\n        \n    def write_stacked_response_times(self):\n        \"\"\" Writes a list of (time, num_tasks) tuples to file.\n        \n        Consolidates tuples occurring at the same time, and writes the\n        list in reverse order. \"\"\"\n        results_dirname = get_param(\"results_dir\")\n        filename = os.path.join(results_dirname, \"%s_%s\" % (get_param(\"file_prefix\"),\n                                                            \"stacked_fairness\"))\n        file = open(filename, \"w\")\n        file.write(\"time\\trunning_tasks\\n\")\n        previous_time = -1\n        # Write in reverse order so that we automatically get the last event\n        # for each time.\n        for time, running_tasks in reversed(self.new_running_tasks):\n            if time != previous_time:\n                if previous_time != -1:\n                    file.write(\"%d\\t\" % time)\n                    for user in range(get_param(\"num_users\")):\n                        file.write(\"%d\\t\" % running_tasks[user])\n                    file.write(\"\\n\")\n            previous_time = time\n\n    def output_response_times(self, user_id=-1):\n        \"\"\" Aggregate response times, and write job info to file.\n        \n        Parameters:\n            user_id: An optional integer specifying the id of the user for\n                whom to output aggregate response time info.  If absent,\n                outputs delay summaries for all users. \"\"\"\n        results_dirname = get_param('results_dir')\n        user_id_suffix = \"\"\n        if user_id != -1:\n            user_id_suffix = \"_%d\" % user_id\n        filename = os.path.join(results_dirname,\n                                '%s_%s%s' %\n                                (get_param('file_prefix'), 'response_vs_time',\n                                 user_id_suffix))\n        response_vs_time_file = open(filename, 'w')\n        response_vs_time_file.write('arrival\\tresponse time\\n')\n        response_times = []\n        # Job overhead is defined to the the total time the job took to run,\n        # divided by the runtime of the longest task. In other words, this is\n        # the overhead of running on a shared cluster, compared to if the job\n        # ran by itself on a cluster.\n        job_overhead = 0.0\n        for job in self.completed_jobs:\n            # Doing it this way, rather than just recording the response times\n            # for all users in one go, is somewhat inefficient.\n            if user_id != -1 and job.user_id != user_id:\n                continue\n            assert(job.wait_time >= -0.00001)\n            response_vs_time_file.write('%s\\t%s\\n' % (job.arrival_time,\n                                                      job.response_time()))\n          \n            response_times.append(job.response_time())\n            # Not really fair to count network overhead in the job overhead.\n            normalized_response_time = (job.response_time() -\n                                        3 * get_param(\"network_delay\"))\n            job_overhead += normalized_response_time * 1.0 / job.longest_task\n        job_overhead = (job_overhead / len(self.completed_jobs)) - 1\n        \n        # Append avg + stdev to each results file.\n        n = get_param(\"num_tasks\")\n        probes_ratio = get_param(\"probes_ratio\")\n        filename = os.path.join(\n            results_dirname, \"%s_response_time%s\" % (get_param('file_prefix'),\n                                                     user_id_suffix))\n        if get_param('first_time'):\n            f = open(filename, 'w')\n            f.write(\"n\\tProbesRatio\\tUtil.\\tMeanRespTime\\tStdDevRespTime\\t\"\n                    \"5Pctl\\t50Pctl\\t95Pctl\\t99PctlRespTime\\t\"\n                    \"NetworkDelay\\tJobOverhead\\tNumServers\\tAvg#EmptyQueues\\t\"\n                    \"%JobsWithNoQueueing\\n\")\n            f.close()\n        f = open(filename, 'a')\n        # Currently, only the response time is written to file.\n        avg_empty_queues = -1\n        if len(self.empty_queues) > 0:\n            avg_empty_queues = stats_mod.lmean(self.empty_queues)\n        response_times.sort()\n        percentage_jobs_no_queueing = (float(self.jobs_with_all_empty_queues) /\n                                       len(self.completed_jobs))\n        f.write((\"%s\\t%s\\t%s\\t%s\\t%s\\t%s\\t%s\\t%s\\t%s\\t%s\\t%s\"\n                 \"\\t%s\\t%s\\t%s\\n\") %\n                (n, probes_ratio, self.utilization,\n                 stats_mod.lmean(response_times), \n                 stats_mod.lstdev(response_times),\n                 self.percentile(response_times, 0.05),\n                 self.percentile(response_times, 0.5),\n                 self.percentile(response_times, 0.95),\n                 self.percentile(response_times,.99),\n                 get_param(\"network_delay\"), job_overhead,\n                 get_param(\"num_servers\"), avg_empty_queues,\n                 percentage_jobs_no_queueing))\n        f.close()\n        \n        # Write CDF of response times.\n        #filename = os.path.join(results_dirname, \"%s_response_time_cdf\" %\n        #                       get_param(\"file_prefix\"))\n        #f = open(filename, \"w\")\n        #stride = max(1, len(response_times) / 200)\n        #for index, response_time in enumerate(response_times[::stride]):\n        #    percentile = (index + 1) * stride * 1.0 / len(response_times)\n        #    f.write(\"%f\\t%f\\n\" % (percentile, response_time))\n        #f.close()\n            \n    def output_per_job_size_response_time(self):\n        \"\"\" Output extra, separate files, with response times for each job size.\n        \"\"\"\n        results_dirname = get_param('results_dir')\n        num_tasks_to_response_times = {}\n        for job in self.completed_jobs:\n            if job.num_tasks not in num_tasks_to_response_times:\n                num_tasks_to_response_times[job.num_tasks] = []\n            num_tasks_to_response_times[job.num_tasks].append(\n                job.response_time())\n            \n        n = get_param(\"num_tasks\")\n        probes_ratio = get_param(\"probes_ratio\")\n        for num_tasks, response_times in num_tasks_to_response_times.items():\n            filename = os.path.join(\n                results_dirname,\n                \"%s_response_time_%s\" % (get_param(\"file_prefix\"),\n                                         num_tasks))\n            if get_param('first_time'):\n                f = open(filename, 'w')\n                f.write(\"n\\tProbesRatio\\tUtil.\\tMean\\tStdDev\\t99Pctl\\t\"\n                        \"NetworkDelay\\n\")\n                f.close()\n            f = open(filename, 'a')\n            f.write(\"%s\\t%s\\t%s\\t%s\\t%s\\t%s\\t%s\\n\" %\n                    (n, probes_ratio, self.utilization,\n                     stats_mod.lmean(response_times), \n                     stats_mod.lstdev(response_times),\n                     stats_mod.lscoreatpercentile(response_times,.99),\n                     get_param(\"network_delay\")))\n            f.close()\n        \n\n    def write_float_array(self, file_suffix, arr, sorted=False):\n      filename = os.path.join(\n          get_param('results_dir'),\n          '%s_%s' % (get_param('file_prefix'), file_suffix))\n      f = open(filename, \"w\")\n      if sorted:\n          arr.sort()\n      for i in range(len(arr)):\n          f.write(\"%d %f\\n\" % (i, arr[i]))\n      f.close()\n      \n    def percentile(self, values, percent):\n        \"\"\"Finds the percentile of a list of values.\n        \n        Copied from: http://code.activestate.com/recipes/511478-finding-the-percentile-of-the-values/.\n        \n        Arguments:\n            N: List of values. Note N MUST BE already sorted.\n            percent: Float value from 0.0 to 1.0.\n        \n        Returns:\n            Float specifying percentile of the values.\n        \"\"\"\n        if not values:\n            return None\n        k = (len(values)-1) * percent\n        f = math.floor(k)\n        c = math.ceil(k)\n        if f == c:\n            return values[int(k)]\n        d0 = values[int(f)] * (c-k)\n        d1 = values[int(c)] * (k-f)\n        return d0+d1\n\nclass Simulation(object):\n    \"\"\"\n    Attributes:\n        event_queue: A priority queue of events.  Events are added to queue as\n            (time, event) tuples.\n    \"\"\"\n    def __init__(self, num_front_ends, num_servers, num_users):\n        self.current_time_ms = 0\n        self.event_queue = Queue.PriorityQueue()\n        self.total_jobs = 0\n        self.logger = logging.getLogger(\"Simulation\")\n        self.stats_manager = StatsManager()\n        self.num_users = num_users\n\n        # Initialize servers\n        self.num_servers = num_servers\n        self.servers = []\n        while len(self.servers) < self.num_servers:\n            self.servers.append(Server(len(self.servers), self.stats_manager,\n                                       self.num_users))\n       \n        # Initialize front ends\n        self.num_front_ends = num_front_ends\n        self.front_ends = []\n        while len(self.front_ends) < self.num_front_ends:\n            if get_param(\"choices_per_task\") > 0:\n                self.front_ends.append(ConstraintFrontEnd(self.servers,\n                                                          len(self.front_ends),\n                                                          self.stats_manager))\n            else:\n                self.front_ends.append(FrontEnd(self.servers,\n                                                len(self.front_ends),\n                                                self.stats_manager))\n        \n    def create_jobs(self, total_time):\n        \"\"\" Creates num_jobs jobs on EACH front end.\n        \n        Parameters:\n            total_time: The maximum time of any possible job created. We\n                try to create jobs filling most of the allocated time.\n        \"\"\"\n        task_distribution = get_param('task_distribution')\n        num_tasks = get_param('num_tasks')\n        task_length = get_param('task_length')\n        avg_arrival_delay = get_param('job_arrival_delay')\n        job_arrival_distribution = get_param('job_arrival_distribution')\n        for front_end in self.front_ends:\n            last_job_arrival = 0\n            count = 0\n            while True:\n                if job_arrival_distribution == \"constant\":\n                    new_last = last_job_arrival + avg_arrival_delay\n                else:\n                    # If the job arrivals are a Poisson process, the time\n                    # between jobs follows an exponential distribution.  \n                    new_last = last_job_arrival + \\\n                        random.expovariate(1.0/avg_arrival_delay)\n\n                # See if we've passed the end of the experiment\n                if new_last > total_time:\n                    break\n                else: \n                    last_job_arrival = new_last\n                \n                if task_distribution == \"bimodal\":\n                    if random.random() > (1.0 / 6):\n                        # 5/6 of the jobs have 10 tasks.\n                        num_tasks = 10\n                    else:\n                        num_tasks = 200\n                relative_demands = get_param(\"relative_demands\")\n                if relative_demands == []:\n                    user_id = random.randrange(self.num_users)\n                else:\n                    r = random.random()\n                    user_id = -1\n                    for current_user in range(self.num_users):\n                        if r < get_param(\"relative_demands\")[current_user]:\n                            user_id = current_user\n                            break\n                    assert user_id != -1\n                job = Job(user_id, last_job_arrival, num_tasks, task_length,\n                          self.stats_manager, \n                          front_end.id_str + \":\" + str(count), self.servers)\n                job_arrival_event = JobArrival(job, front_end)\n                self.event_queue.put((last_job_arrival, job_arrival_event))\n                self.total_jobs += 1\n                count = count + 1\n\n    def run(self):\n        \"\"\" Runs the simulation until all jobs have completed. \"\"\"\n        counter = 0\n        counter_increment = 1000 # Reporting frequency\n\n        last_time = 0\n        \n        if get_param(\"record_queue_state\"):\n            # Add event to query queue state.\n            query_interval = 1\n            report_queue_state = RecordQueueState(self.servers,\n                                                  self.stats_manager,\n                                                  query_interval)\n            self.event_queue.put((query_interval, report_queue_state))\n        while len(self.stats_manager.completed_jobs) < self.total_jobs:\n            assert(not self.event_queue.empty())\n            current_time, event = self.event_queue.get()\n            \n            #if current_time >= 3.0 * get_param(\"total_time\") / 4.0:\n            #    set_param(\"relative_weights\", \"1,2\")\n            #elif current_time >= 1.0 * get_param(\"total_time\") / 2.0:\n            #    set_param(\"relative_weights\", \"1,4\")\n\n            assert(current_time >= last_time)\n            last_time = current_time\n\n            if current_time > counter:\n                counter = counter + counter_increment\n            new_events = event.run(current_time)\n            if new_events:\n                for new_event in new_events:\n                    self.event_queue.put(new_event)\n    \n        self.stats_manager.output_stats()\n        \n        output_params()\n\ndef main(argv):\n    if len(argv) > 0 and \"help\" in argv[0]:\n      print \"Usage: python simulation.py \" + \"\".join(\n          [\"[%s=v (%s)] \" % (k[0], k[1][1]) for k in PARAMS.items()])\n      sys.exit(0)\n\n    # Fill in any specified parameters\n    for arg in argv:\n        kv = arg.split(\"=\")\n        if len(kv) == 2 and kv[0] in PARAMS:\n            set_param(kv[0], kv[1])\n        elif kv[0] not in PARAMS:\n            logging.warn(\"Ignoring key %s\" % kv[0])\n\n    # Sanity check\n    if get_param(\"probes_ratio\") < 1.0 and get_param(\"probes_ratio\") != -1:\n        print (\"Given value, %f, is not a valid probes_ratio\" %\n               get_param(\"probes_ratio\"))\n        sys.exit(0)\n    relative_demands = get_param(\"relative_demands\")\n    if (relative_demands != [] and \\\n        len(relative_demands) != get_param(\"num_users\")):\n        print (\"The length of relative demands does not match the \"\n               \"given number of users\")\n        sys.exit(0)\n    \n    relative_weights = get_param(\"relative_weights\")\n    if (relative_weights != [] and \\\n        len(relative_weights) != get_param(\"num_users\")):\n        print (\"The length of relative weights does not match the \"\n               \"given number of users\")\n        sys.exit(0)\n\n    logging.basicConfig(level=LEVELS.get(get_param('log_level')))\n\n    if get_param(\"deterministic\") is True:\n        random.seed(get_param(\"random_seed\"))\n\n            \n    print get_param(\"relative_weights\")\n    sim = Simulation(get_param(\"num_fes\"), get_param(\"num_servers\"),\n                     get_param(\"num_users\"))\n    sim.create_jobs(get_param(\"total_time\"))\n    sim.run()\n    \nif __name__ == '__main__':\n    main(sys.argv[1:])\n"
  },
  {
    "path": "simulation/simulation_multi.py",
    "content": "#\n# Copyright 2013 The Regents of The University California\n# \n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n# \n#   http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n\n\"\"\" Simulation, changed to asked for multiple tasks in getTask() request. \"\"\"\n\nimport logging\nimport math\nimport numpy\nimport random\nimport Queue\nfrom util import Job, TaskDistributions\n\nMEDIAN_TASK_DURATION = 100\nNETWORK_DELAY = 0.5\nTASKS_PER_JOB = 100\nSLOTS_PER_WORKER = 4\nTOTAL_WORKERS = 10000\nPROBE_RATIO = 2\n\ndef get_percentile(N, percent, key=lambda x:x):\n    if not N:\n        return 0\n    k = (len(N) - 1) * percent\n    f = math.floor(k)\n    c = math.ceil(k)\n    if f == c:\n        return key(N[int(k)])\n    d0 = key(N[int(f)]) * (c-k)\n    d1 = key(N[int(c)]) * (k-f)\n    return d0 + d1\n\ndef plot_cdf(values, filename):\n    values.sort()\n    f = open(filename, \"w\")\n    for percent in range(100):\n        fraction = percent / 100.\n        f.write(\"%s\\t%s\\n\" % (fraction, get_percentile(values, fraction)))\n    f.close()\n\nclass Event(object):\n    \"\"\" Abstract class representing events. \"\"\"\n    def __init__(self):\n        raise NotImplementedError(\"Event is an abstract class and cannot be \"\n                                  \"instantiated directly\")\n\n    def run(self, current_time):\n        \"\"\" Returns any events that should be added to the queue. \"\"\"\n        raise NotImplementedError(\"The run() method must be implemented by \"\n                                  \"each class subclassing Event\")\n\nclass JobArrival(Event):\n    \"\"\" Event to signify a job arriving at a scheduler. \"\"\"\n    def __init__(self, simulation, interarrival_delay, task_distribution):\n        self.simulation = simulation\n        self.interarrival_delay = interarrival_delay\n        self.task_distribution = task_distribution\n\n    def run(self, current_time):\n        job = Job(TASKS_PER_JOB, current_time, self.task_distribution, MEDIAN_TASK_DURATION)\n        logging.getLogger(\"sim\").debug(\"Job %s arrived at %s\" % (job.id, current_time))\n        # Schedule job.\n        new_events = self.simulation.send_probes(job, current_time)\n        # Add new Job Arrival event, for the next job to arrive after this one.\n        arrival_delay = random.expovariate(1.0 / self.interarrival_delay)\n        new_events.append((current_time + arrival_delay, self))\n        logging.getLogger(\"sim\").debug(\"Retuning %s events\" % len(new_events))\n        return new_events\n\nclass ProbeEvent(Event):\n    \"\"\" Event to signify a probe arriving at a worker. \"\"\"\n    def __init__(self, worker, job_id):\n        self.worker = worker\n        self.job_id = job_id\n\n    def run(self, current_time):\n        #print (\"Probe for job %s arrived at worker %s at %s\" %\n        #       (self.job_id, self.worker.id, current_time))\n        return self.worker.add_probe(self.job_id, current_time)\n\nclass NoopGetTaskResponseEvent(Event):\n    \"\"\" Signifies when a getTask() RPC response arrives at a worker, with a noop response. \"\"\"\n    def __init__(self, worker, num_tasks):\n        self.worker = worker\n        # The number of tasks requested from the scheduler.\n        self.num_tasks = num_tasks\n\n    def run(self, current_time):\n        logging.getLogger(\"sim\").debug(\"getTask() request for worker %s returned no task at %s\" %\n               (self.worker.id, current_time))\n        return self.worker.free_slots(current_time, self.num_tasks)\n\n\nclass TaskEndEvent():\n    def __init__(self, worker):\n        self.worker = worker\n\n    def run(self, current_time):\n        return self.worker.free_slots(current_time, 1)\n\nclass Worker(object):\n    def __init__(self, simulation, num_slots, id):\n        self.simulation = simulation\n        self.num_free_slots = num_slots\n        # Just a list of job ids!\n        self.queued_probes = Queue.Queue()\n        self.id = id\n        self.probes_replied_to_immediately = 0\n\n    def add_probe(self, job_id, current_time):\n        self.queued_probes.put(job_id)\n        new_events = self.maybe_get_tasks(current_time)\n        self.probes_replied_to_immediately += len(new_events)\n        logging.getLogger(\"sim\").debug(\"Worker %s: %s\" %\n                                       (self.id, self.probes_replied_to_immediately))\n        return new_events\n\n    def free_slots(self, current_time, num_slots):\n        \"\"\" Frees a slot on the worker and attempts to launch another task in that slot. \"\"\"\n        self.num_free_slots += num_slots\n        get_task_events = self.maybe_get_tasks(current_time)\n        return get_task_events\n\n    def maybe_get_tasks(self, current_time):\n        events = []\n        while not self.queued_probes.empty() and self.num_free_slots > 0:\n            # Account for \"running\" task\n            self.num_free_slots -= 1\n            job_id = self.queued_probes.get()\n\n            #if not self.queued_probes.empty():\n            #    assert self.num_free_slots == 0\n\n            # Try to get more than one task, if this worker is sitting mostly idle.\n            num_tasks_to_get = 1\n            if self.num_free_slots > 0 and self.queued_probes.empty():\n                # TODO: should ignore other queued ones at this point??\n                # Go to the extreme: try to use all of the free slots.\n                num_tasks_to_get += self.num_free_slots\n                self.num_free_slots = 0\n\n            logging.getLogger(\"sim\").debug(\"Num tasks to get: %s\" % num_tasks_to_get)\n\n            task_durations = self.simulation.get_tasks(job_id, num_tasks_to_get)\n            probe_response_time = current_time + 2*NETWORK_DELAY\n            events = []\n            for task_duration in task_durations:\n                task_end_time = probe_response_time + task_duration\n                logging.getLogger(\"sim\").debug((\"Task for job %s running on worker %s (get task at: %s, duration: %s, \"\n                        \"end: %s)\") %\n                       (job_id, self.id, current_time, task_duration, task_end_time))\n                self.simulation.add_task_completion_time(job_id, task_end_time)\n                events.append((task_end_time, TaskEndEvent(self)))\n\n            if len(events) < num_tasks_to_get:\n                # Need to free some slots\n                unfilled_slots = num_tasks_to_get - len(events)\n                logging.getLogger(\"sim\").debug(\"Noop returning on worker %s at %s\" %\n                                               (self.id, probe_response_time))\n                events.append((probe_response_time,\n                               NoopGetTaskResponseEvent(self, unfilled_slots)))\n        return events\n\nclass Simulation(object):\n    def __init__(self, num_jobs, file_prefix, load, task_distribution):\n        avg_used_slots = load * SLOTS_PER_WORKER * TOTAL_WORKERS\n        self.interarrival_delay = (1.0 * MEDIAN_TASK_DURATION * TASKS_PER_JOB / avg_used_slots)\n        print (\"Interarrival delay: %s (avg slots in use: %s)\" %\n               (self.interarrival_delay, avg_used_slots))\n        self.jobs = {}\n        self.remaining_jobs = num_jobs\n        self.event_queue = Queue.PriorityQueue()\n        self.workers = []\n        self.file_prefix = file_prefix\n        while len(self.workers) < TOTAL_WORKERS:\n            self.workers.append(Worker(self, SLOTS_PER_WORKER, len(self.workers)))\n        self.worker_indices = range(TOTAL_WORKERS)\n        self.task_distribution = task_distribution\n\n    def send_probes(self, job, current_time):\n        \"\"\" Send probes to acquire load information, in order to schedule a job. \"\"\"\n        self.jobs[job.id] = job\n\n        random.shuffle(self.worker_indices)\n        probe_events = []\n        num_probes = PROBE_RATIO * len(job.unscheduled_tasks)\n        for worker_index in self.worker_indices[:num_probes]:\n            probe_events.append((current_time + NETWORK_DELAY,\n                                 ProbeEvent(self.workers[worker_index], job.id)))\n        return probe_events\n\n    def get_tasks(self, job_id, num_tasks):\n        job = self.jobs[job_id]\n        remaining_tasks = num_tasks\n        # Durations of tasks to launch.\n        task_durations = []\n        while len(job.unscheduled_tasks) > 0 and remaining_tasks > 0:\n            task_durations.append(job.unscheduled_tasks[0])\n            job.unscheduled_tasks = job.unscheduled_tasks[1:]\n            remaining_tasks -= 1\n        assert len(task_durations) + remaining_tasks == num_tasks\n        return task_durations\n\n    def add_task_completion_time(self, job_id, completion_time):\n        job_complete = self.jobs[job_id].task_completed(completion_time)\n        if job_complete:\n            self.remaining_jobs -= 1\n            logging.getLogger(\"sim\").debug(\"Job %s completed in %s\" %\n                   (job_id, self.jobs[job_id].end_time - self.jobs[job_id].start_time))\n\n    def run(self):\n        half_jobs = self.remaining_jobs / 2\n        self.event_queue.put((0, JobArrival(self, self.interarrival_delay, self.task_distribution)))\n        last_time = 0\n        output_worker_loads = False\n        while self.remaining_jobs > 0:\n            # At a point in the middle of the experiment, get the distribution of tasks\n            # on each worker.\n            if not output_worker_loads and self.remaining_jobs == half_jobs:\n                worker_loads = [w.num_free_slots for w in self.workers]\n                plot_cdf(worker_loads, \"%s_worker_loads.data\" % self.file_prefix)\n                output_worker_loads = True\n            current_time, event = self.event_queue.get()\n            assert current_time >= last_time\n            last_time = current_time\n            new_events = event.run(current_time)\n            for new_event in new_events:\n                self.event_queue.put(new_event)\n\n        print (\"Simulation ended after %s milliseconds (%s jobs started)\" %\n               (last_time, len(self.jobs)))\n        complete_jobs = [j for j in self.jobs.values() if j.completed_tasks_count == j.num_tasks]\n        print \"%s complete jobs\" % len(complete_jobs)\n        response_times = [job.end_time - job.start_time for job in complete_jobs\n                          if job.start_time > 0]\n        print \"Included %s jobs\" % len(response_times)\n        plot_cdf(response_times, \"%s_response_times.data\" % self.file_prefix)\n        print \"Average response time: \", numpy.mean(response_times)\n\n        longest_tasks = [job.longest_task for job in complete_jobs]\n        plot_cdf(longest_tasks, \"%s_ideal_response_time.data\" % self.file_prefix)\n\n        tasks_replied_to_immediately = sum([w.probes_replied_to_immediately for w in self.workers])\n        print \"Tasks replied to immeiately: \", tasks_replied_to_immediately\n        return response_times\n\ndef main():\n    random.seed(1)\n    logging.basicConfig(level=logging.INFO)\n    sim = Simulation(1000, \"multiget\", 0.95, TaskDistributions.CONSTANT)\n    sim.run()\n\nif __name__ == \"__main__\":\n    main()"
  },
  {
    "path": "simulation/simulation_random.py",
    "content": "#\n# Copyright 2013 The Regents of The University California\n# \n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n# \n#   http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n\n\"\"\" Simulations a random assignment of tasks to workers. \"\"\"\n\nimport math\nimport numpy\nimport random\nimport Queue\nfrom util import Job, TaskDistributions\n\nMEDIAN_TASK_DURATION = 100\nNETWORK_DELAY = 0.5\nTASKS_PER_JOB = 100\nSLOTS_PER_WORKER = 4\nTOTAL_WORKERS = 10000\n\ndef get_percentile(N, percent, key=lambda x:x):\n    if not N:\n        return 0\n    k = (len(N) - 1) * percent\n    f = math.floor(k)\n    c = math.ceil(k)\n    if f == c:\n        return key(N[int(k)])\n    d0 = key(N[int(f)]) * (c-k)\n    d1 = key(N[int(c)]) * (k-f)\n    return d0 + d1\n\ndef plot_cdf(values, filename):\n    values.sort()\n    f = open(filename, \"w\")\n    for percent in range(100):\n        fraction = percent / 100.\n        f.write(\"%s\\t%s\\n\" % (fraction, get_percentile(values, fraction)))\n    f.close()\n\nclass Event(object):\n    \"\"\" Abstract class representing events. \"\"\"\n    def __init__(self):\n        raise NotImplementedError(\"Event is an abstract class and cannot be \"\n                                  \"instantiated directly\")\n\n    def run(self, current_time):\n        \"\"\" Returns any events that should be added to the queue. \"\"\"\n        raise NotImplementedError(\"The run() method must be implemented by \"\n                                  \"each class subclassing Event\")\n\nclass JobArrival(Event):\n    \"\"\" Event to signify a job arriving at a scheduler. \"\"\"\n    def __init__(self, simulation, interarrival_delay, task_distribution):\n        self.simulation = simulation\n        self.interarrival_delay = interarrival_delay\n        self.task_distribution = task_distribution\n\n    def run(self, current_time):\n        job = Job(TASKS_PER_JOB, current_time, self.task_distribution, MEDIAN_TASK_DURATION)\n        #print \"Job %s arrived at %s\" % (job.id, current_time)\n        # Schedule job.\n        new_events = self.simulation.send_tasks(job, current_time)\n        # Add new Job Arrival event, for the next job to arrive after this one.\n        arrival_delay = random.expovariate(1.0 / self.interarrival_delay)\n        new_events.append((current_time + arrival_delay, self))\n        #print \"Retuning %s events\" % len(new_events)\n        return new_events\n\nclass TaskArrival(Event):\n    \"\"\" Event to signify a task arriving at a worker. \"\"\"\n    def __init__(self, worker, task_duration, job_id):\n        self.worker = worker\n        self.task_duration = task_duration\n        self.job_id = job_id\n\n    def run(self, current_time):\n        return self.worker.add_task(current_time, self.task_duration, self.job_id)\n\nclass TaskEndEvent():\n    def __init__(self, worker):\n        self.worker = worker\n\n    def run(self, current_time):\n        return self.worker.free_slot(current_time)\n\nclass Worker(object):\n    def __init__(self, simulation, num_slots, id):\n        self.simulation = simulation\n        self.free_slots = num_slots\n        # Just a list of (task duration, job id) pairs.\n        self.queued_tasks = Queue.Queue()\n        self.id = id\n\n    def add_task(self, current_time, task_duration, job_id):\n        #print \"Task for job %s arrived at worker %s\" % (job_id, self.id)\n        self.queued_tasks.put((task_duration, job_id))\n        return self.maybe_start_task(current_time)\n\n    def free_slot(self, current_time):\n        \"\"\" Frees a slot on the worker and attempts to launch another task in that slot. \"\"\"\n        self.free_slots += 1\n        get_task_events = self.maybe_start_task(current_time)\n        return get_task_events\n\n    def maybe_start_task(self, current_time):\n        if not self.queued_tasks.empty() and self.free_slots > 0:\n            # Account for \"running\" task\n            self.free_slots -= 1\n            task_duration, job_id = self.queued_tasks.get()\n            #print \"Launching task for job %s on worker %s\" % (job_id, self.id)\n            task_end_time = current_time + task_duration\n            #print (\"Task for job %s on worker %s launched at %s; will complete at %s\" %\n            #(job_id, self.id, current_time, task_end_time))\n            self.simulation.add_task_completion_time(job_id, task_end_time)\n            return [(task_end_time, TaskEndEvent(self))]\n        return []\n\nclass Simulation(object):\n    def __init__(self, num_jobs, file_prefix, load, task_distribution):\n        avg_used_slots = load * SLOTS_PER_WORKER * TOTAL_WORKERS\n        self.interarrival_delay = (1.0 * MEDIAN_TASK_DURATION * TASKS_PER_JOB / avg_used_slots)\n        print (\"Interarrival delay: %s (avg slots in use: %s)\" %\n               (self.interarrival_delay, avg_used_slots))\n        self.jobs = {}\n        self.remaining_jobs = num_jobs\n        self.event_queue = Queue.PriorityQueue()\n        self.workers = []\n        self.file_prefix = file_prefix\n        while len(self.workers) < TOTAL_WORKERS:\n            self.workers.append(Worker(self, SLOTS_PER_WORKER, len(self.workers)))\n        self.worker_indices = range(TOTAL_WORKERS)\n        self.task_distribution = task_distribution\n\n    def send_tasks(self, job, current_time):\n        \"\"\" Randomly assigns tasks to machines. \"\"\"\n        self.jobs[job.id] = job\n\n        random.shuffle(self.worker_indices)\n        task_arrival_events = []\n        for i, worker_index in enumerate(self.worker_indices[:len(job.unscheduled_tasks)]):\n            #print \"Assigning task %s to worker %s\" % (i, worker_index)\n            task_arrival_events.append(\n                    (current_time + NETWORK_DELAY,\n                     TaskArrival(self.workers[worker_index], job.unscheduled_tasks[i], job.id)))\n        return task_arrival_events\n\n    def add_task_completion_time(self, job_id, completion_time):\n        job_complete = self.jobs[job_id].task_completed(completion_time)\n        if job_complete:\n            self.remaining_jobs -= 1\n\n    def run(self):\n        self.event_queue.put((0, JobArrival(self, self.interarrival_delay, self.task_distribution)))\n        last_time = 0\n        while self.remaining_jobs > 0:\n            current_time, event = self.event_queue.get()\n            assert current_time >= last_time\n            last_time = current_time\n            new_events = event.run(current_time)\n            for new_event in new_events:\n                self.event_queue.put(new_event)\n\n        print (\"Simulation ended after %s milliseconds (%s jobs started)\" %\n               (last_time, len(self.jobs)))\n        complete_jobs = [j for j in self.jobs.values() if j.completed_tasks_count == j.num_tasks]\n        print \"%s complete jobs\" % len(complete_jobs)\n        response_times = [job.end_time - job.start_time for job in complete_jobs\n                          if job.start_time > 500]\n        print \"Included %s jobs\" % len(response_times)\n        plot_cdf(response_times, \"%s_response_times.data\" % self.file_prefix)\n        print \"Average response time: \", numpy.mean(response_times)\n\n        longest_tasks = [job.longest_task for job in complete_jobs]\n        plot_cdf(longest_tasks, \"%s_ideal_response_time.data\" % self.file_prefix)\n        return response_times\n\ndef main():\n    sim = Simulation(10000, \"\", 0.9, TaskDistributions.CONSTANT)\n    sim.run()\n\nif __name__ == \"__main__\":\n    main()"
  },
  {
    "path": "simulation/test_simulation_cancellation.py",
    "content": "#\n# Copyright 2013 The Regents of The University California\n# \n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n# \n#   http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n\nimport unittest\n\nimport simulation_cancellation\nimport util\n\nclass TestMultiGetSimulation(unittest.TestCase):\n    def setUp(self):\n        simulation_cancellation.CANCELLATION = True\n        self.simulation = simulation_cancellation.Simulation(5, \"\", 0.9,\n                                                             util.TaskDistributions.CONSTANT)\n\n    def test_workers_tracked_correctly(self):\n        job_id = 13\n        job_start = 10\n        num_tasks = 2\n        job = util.Job(num_tasks, job_start, util.TaskDistributions.CONSTANT, 100)\n        self.assertEqual(job.num_tasks, num_tasks)\n        self.assertEqual(len(job.unscheduled_tasks), num_tasks)\n\n        probe_events = self.simulation.send_probes(job, job_start)\n        self.assertEqual(len(job.probed_workers), 2*num_tasks)\n\n        # Run the first probe event.\n        time, first_probe = probe_events[0]\n        # All workers are idle, so should get a task end event back.\n        events = first_probe.run(time)\n        self.assertEquals(len(events), 1)\n        self.assertEquals(len(job.probed_workers), 2*num_tasks - 1)\n\n        time, second_probe = probe_events[1]\n        events = second_probe.run(time)\n        # This time, should get cancellation events back (in addition to task end event).\n        self.assertEquals(len(events), 1 + num_tasks)\n        self.assertEquals(len(job.probed_workers), num_tasks)\n\n        # Make sure everything works fine if a worker replies to a probe before realizing it was\n        # cancelled.\n        time, third_probe = probe_events[2]\n        events = third_probe.run(time)\n        # Should just get a no-op event back.\n        self.assertEquals(len(events), 1)\n\nif __name__ == '__main__':\n    unittest.main()"
  },
  {
    "path": "simulation/test_simulation_multi.py",
    "content": "#\n# Copyright 2013 The Regents of The University California\n# \n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n# \n#   http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n\nimport unittest\n\nimport simulation_multi\n\nclass TestMultiGetSimulation(unittest.TestCase):\n    def setUp(self):\n        simulation_multi.TOTAL_WORKERS = 10\n        self.simulation = simulation_multi.Simulation(5, \"\", 0.9)\n\n    def test_basic(self):\n        TASKS_PER_JOB = 3\n\n        # ADd a job.\n        JOB_ID = 8\n        JOB_START = 10\n        job = simulation_multi.Job(TASKS_PER_JOB, JOB_START)\n        self.simulation.jobs[JOB_ID] = job\n        self.assertEqual(job.num_tasks, TASKS_PER_JOB)\n        self.assertEqual(len(job.unscheduled_tasks), TASKS_PER_JOB)\n\n        # At this point, all workers are idle.\n        worker = self.simulation.workers[0]\n\n        # Add a probe for job 0 at 10 millis in.\n        events = worker.add_probe(JOB_ID, JOB_START)\n        # Should return 4 events: one task ending event for each slot and one no-op.\n        self.assertEqual(len(events), 4)\n        self.assertEqual(worker.num_free_slots, 0)\n        # Run the nop-op event.\n        events[-1][1].run(JOB_START + 2)\n        self.assertEqual(worker.num_free_slots, 1)\n\n        JOB_ID_2 = 15\n        JOB_START_2 = 15\n        job2 = simulation_multi.Job(TASKS_PER_JOB, JOB_START_2)\n        self.simulation.jobs[JOB_ID_2] = job2\n\n        events = worker.add_probe(JOB_ID_2, JOB_START_2)\n        self.assertEqual(worker.num_free_slots, 0)\n        # One job start event\n        self.assertEqual(len(events), 1)\n\n        # Fake the completion of the first task some time later;\n        # should launch the second one.\n        new_events = events[0][1].run(JOB_START_2 + 5)\n        # Don't keep the job around at this point.\n        self.assertEqual(len(new_events), 0)\n\n    def test_multiple_slots_released(self):\n        \"\"\"Ensures that multiple slots are released when a noop comes back.\"\"\"\n        JOB_ID = 20\n        JOB_START= 50\n        job = simulation_multi.Job(2, JOB_START)\n        self.simulation.jobs[JOB_ID] = job\n\n        worker = self.simulation.workers[1]\n        self.assertEqual(worker.num_free_slots, 4)\n        events = worker.add_probe(JOB_ID, JOB_START)\n        self.assertEqual(worker.num_free_slots, 0)\n        # The events shoudl include 2 task end events and 1 noop.\n        self.assertEqual(len(events), 3)\n        # Run the noop event.\n        events[-1][1].run(events[-1][0])\n        self.assertEqual(worker.num_free_slots, 2)\n\nif __name__ == '__main__':\n    unittest.main()"
  },
  {
    "path": "simulation/util.py",
    "content": "#\n# Copyright 2013 The Regents of The University California\n# \n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n# \n#   http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n\nimport random\n\nclass TaskDistributions:\n    EXP_TASKS, EXP_JOBS, CONSTANT = range(3)\n\nclass Job(object):\n    job_count = 0\n    def __init__(self, num_tasks, start_time, task_distribution, median_task_duration, scheduler=0):\n        self.id = Job.job_count\n        Job.job_count += 1\n        self.num_tasks = num_tasks\n        self.completed_tasks_count = 0\n        self.start_time = start_time\n        self.end_time = start_time\n        self.unscheduled_tasks = []\n        # TODO: This won't be correctly populated when tasks are stolen.\n        self.time_all_tasks_scheduled = 0\n        self.last_probe_reply_time= 0\n        # Change this line to change to distribution of task durations.\n        if task_distribution == TaskDistributions.EXP_TASKS:\n            self.exponentially_distributed_tasks(median_task_duration)\n        elif task_distribution == TaskDistributions.EXP_JOBS:\n            self.exponentially_distributed_jobs(median_task_duration)\n        elif task_distribution == TaskDistributions.CONSTANT:\n            self.constant_distributed_tasks(median_task_duration)\n        self.longest_task = max(self.unscheduled_tasks)\n\n        self.scheduler = scheduler\n        self.probed_workers = set()\n\n    def add_probe_response(self, worker, current_time):\n        self.probed_workers.remove(worker.id)\n        assert current_time >= self.last_probe_reply_time\n        self.last_probe_reply_time = current_time\n        if len(self.unscheduled_tasks) > 0:\n            assert current_time >= self.time_all_tasks_scheduled\n            self.time_all_tasks_scheduled = current_time\n\n    def task_completed(self, completion_time):\n        \"\"\" Returns true if the job has completed, and false otherwise. \"\"\"\n        self.completed_tasks_count += 1\n        self.end_time = max(completion_time, self.end_time)\n        assert self.completed_tasks_count <= self.num_tasks\n        return self.num_tasks == self.completed_tasks_count\n\n    def exponentially_distributed_tasks(self, median_task_duration):\n        while len(self.unscheduled_tasks) < self.num_tasks:\n            # Exponentially distributed task durations.\n            self.unscheduled_tasks.append(random.expovariate(1.0 / median_task_duration))\n\n    def exponentially_distributed_jobs(self, median_task_duration):\n        # Choose one exponentially-distributed task duration for all tasks in the job.\n        task_duration = random.expovariate(1.0 / median_task_duration)\n        while len(self.unscheduled_tasks) < self.num_tasks:\n            self.unscheduled_tasks.append(task_duration)\n\n    def constant_distributed_tasks(self, median_task_duration):\n        while len(self.unscheduled_tasks) < self.num_tasks:\n            self.unscheduled_tasks.append(median_task_duration)\n"
  },
  {
    "path": "src/main/gen-java/edu/berkeley/sparrow/thrift/BackendService.java",
    "content": "/**\n * Autogenerated by Thrift Compiler (0.8.0)\n *\n * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING\n *  @generated\n */\npackage edu.berkeley.sparrow.thrift;\n\nimport org.apache.thrift.scheme.IScheme;\nimport org.apache.thrift.scheme.SchemeFactory;\nimport org.apache.thrift.scheme.StandardScheme;\n\nimport org.apache.thrift.scheme.TupleScheme;\nimport org.apache.thrift.protocol.TTupleProtocol;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.util.HashMap;\nimport java.util.EnumMap;\nimport java.util.Set;\nimport java.util.HashSet;\nimport java.util.EnumSet;\nimport java.util.Collections;\nimport java.util.BitSet;\nimport java.nio.ByteBuffer;\nimport java.util.Arrays;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\npublic class BackendService {\n\n  public interface Iface {\n\n    public void launchTask(ByteBuffer message, edu.berkeley.sparrow.thrift.TFullTaskId taskId, edu.berkeley.sparrow.thrift.TUserGroupInfo user) throws org.apache.thrift.TException;\n\n  }\n\n  public interface AsyncIface {\n\n    public void launchTask(ByteBuffer message, edu.berkeley.sparrow.thrift.TFullTaskId taskId, edu.berkeley.sparrow.thrift.TUserGroupInfo user, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.launchTask_call> resultHandler) throws org.apache.thrift.TException;\n\n  }\n\n  public static class Client extends org.apache.thrift.TServiceClient implements Iface {\n    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {\n      public Factory() {}\n      public Client getClient(org.apache.thrift.protocol.TProtocol prot) {\n        return new Client(prot);\n      }\n      public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {\n        return new Client(iprot, oprot);\n      }\n    }\n\n    public Client(org.apache.thrift.protocol.TProtocol prot)\n    {\n      super(prot, prot);\n    }\n\n    public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {\n      super(iprot, oprot);\n    }\n\n    public void launchTask(ByteBuffer message, edu.berkeley.sparrow.thrift.TFullTaskId taskId, edu.berkeley.sparrow.thrift.TUserGroupInfo user) throws org.apache.thrift.TException\n    {\n      send_launchTask(message, taskId, user);\n      recv_launchTask();\n    }\n\n    public void send_launchTask(ByteBuffer message, edu.berkeley.sparrow.thrift.TFullTaskId taskId, edu.berkeley.sparrow.thrift.TUserGroupInfo user) throws org.apache.thrift.TException\n    {\n      launchTask_args args = new launchTask_args();\n      args.setMessage(message);\n      args.setTaskId(taskId);\n      args.setUser(user);\n      sendBase(\"launchTask\", args);\n    }\n\n    public void recv_launchTask() throws org.apache.thrift.TException\n    {\n      launchTask_result result = new launchTask_result();\n      receiveBase(result, \"launchTask\");\n      return;\n    }\n\n  }\n  public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface {\n    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {\n      private org.apache.thrift.async.TAsyncClientManager clientManager;\n      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;\n      public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {\n        this.clientManager = clientManager;\n        this.protocolFactory = protocolFactory;\n      }\n      public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {\n        return new AsyncClient(protocolFactory, clientManager, transport);\n      }\n    }\n\n    public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {\n      super(protocolFactory, clientManager, transport);\n    }\n\n    public void launchTask(ByteBuffer message, edu.berkeley.sparrow.thrift.TFullTaskId taskId, edu.berkeley.sparrow.thrift.TUserGroupInfo user, org.apache.thrift.async.AsyncMethodCallback<launchTask_call> resultHandler) throws org.apache.thrift.TException {\n      checkReady();\n      launchTask_call method_call = new launchTask_call(message, taskId, user, resultHandler, this, ___protocolFactory, ___transport);\n      this.___currentMethod = method_call;\n      ___manager.call(method_call);\n    }\n\n    public static class launchTask_call extends org.apache.thrift.async.TAsyncMethodCall {\n      private ByteBuffer message;\n      private edu.berkeley.sparrow.thrift.TFullTaskId taskId;\n      private edu.berkeley.sparrow.thrift.TUserGroupInfo user;\n      public launchTask_call(ByteBuffer message, edu.berkeley.sparrow.thrift.TFullTaskId taskId, edu.berkeley.sparrow.thrift.TUserGroupInfo user, org.apache.thrift.async.AsyncMethodCallback<launchTask_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {\n        super(client, protocolFactory, transport, resultHandler, false);\n        this.message = message;\n        this.taskId = taskId;\n        this.user = user;\n      }\n\n      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {\n        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage(\"launchTask\", org.apache.thrift.protocol.TMessageType.CALL, 0));\n        launchTask_args args = new launchTask_args();\n        args.setMessage(message);\n        args.setTaskId(taskId);\n        args.setUser(user);\n        args.write(prot);\n        prot.writeMessageEnd();\n      }\n\n      public void getResult() throws org.apache.thrift.TException {\n        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {\n          throw new IllegalStateException(\"Method call not finished!\");\n        }\n        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());\n        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);\n        (new Client(prot)).recv_launchTask();\n      }\n    }\n\n  }\n\n  public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor {\n    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());\n    public Processor(I iface) {\n      super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));\n    }\n\n    protected Processor(I iface, Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {\n      super(iface, getProcessMap(processMap));\n    }\n\n    private static <I extends Iface> Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> getProcessMap(Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {\n      processMap.put(\"launchTask\", new launchTask());\n      return processMap;\n    }\n\n    private static class launchTask<I extends Iface> extends org.apache.thrift.ProcessFunction<I, launchTask_args> {\n      public launchTask() {\n        super(\"launchTask\");\n      }\n\n      protected launchTask_args getEmptyArgsInstance() {\n        return new launchTask_args();\n      }\n\n      protected launchTask_result getResult(I iface, launchTask_args args) throws org.apache.thrift.TException {\n        launchTask_result result = new launchTask_result();\n        iface.launchTask(args.message, args.taskId, args.user);\n        return result;\n      }\n    }\n\n  }\n\n  public static class launchTask_args implements org.apache.thrift.TBase<launchTask_args, launchTask_args._Fields>, java.io.Serializable, Cloneable   {\n    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct(\"launchTask_args\");\n\n    private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField(\"message\", org.apache.thrift.protocol.TType.STRING, (short)1);\n    private static final org.apache.thrift.protocol.TField TASK_ID_FIELD_DESC = new org.apache.thrift.protocol.TField(\"taskId\", org.apache.thrift.protocol.TType.STRUCT, (short)2);\n    private static final org.apache.thrift.protocol.TField USER_FIELD_DESC = new org.apache.thrift.protocol.TField(\"user\", org.apache.thrift.protocol.TType.STRUCT, (short)3);\n\n    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();\n    static {\n      schemes.put(StandardScheme.class, new launchTask_argsStandardSchemeFactory());\n      schemes.put(TupleScheme.class, new launchTask_argsTupleSchemeFactory());\n    }\n\n    public ByteBuffer message; // required\n    public edu.berkeley.sparrow.thrift.TFullTaskId taskId; // required\n    public edu.berkeley.sparrow.thrift.TUserGroupInfo user; // required\n\n    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */\n    public enum _Fields implements org.apache.thrift.TFieldIdEnum {\n      MESSAGE((short)1, \"message\"),\n      TASK_ID((short)2, \"taskId\"),\n      USER((short)3, \"user\");\n\n      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();\n\n      static {\n        for (_Fields field : EnumSet.allOf(_Fields.class)) {\n          byName.put(field.getFieldName(), field);\n        }\n      }\n\n      /**\n       * Find the _Fields constant that matches fieldId, or null if its not found.\n       */\n      public static _Fields findByThriftId(int fieldId) {\n        switch(fieldId) {\n          case 1: // MESSAGE\n            return MESSAGE;\n          case 2: // TASK_ID\n            return TASK_ID;\n          case 3: // USER\n            return USER;\n          default:\n            return null;\n        }\n      }\n\n      /**\n       * Find the _Fields constant that matches fieldId, throwing an exception\n       * if it is not found.\n       */\n      public static _Fields findByThriftIdOrThrow(int fieldId) {\n        _Fields fields = findByThriftId(fieldId);\n        if (fields == null) throw new IllegalArgumentException(\"Field \" + fieldId + \" doesn't exist!\");\n        return fields;\n      }\n\n      /**\n       * Find the _Fields constant that matches name, or null if its not found.\n       */\n      public static _Fields findByName(String name) {\n        return byName.get(name);\n      }\n\n      private final short _thriftId;\n      private final String _fieldName;\n\n      _Fields(short thriftId, String fieldName) {\n        _thriftId = thriftId;\n        _fieldName = fieldName;\n      }\n\n      public short getThriftFieldId() {\n        return _thriftId;\n      }\n\n      public String getFieldName() {\n        return _fieldName;\n      }\n    }\n\n    // isset id assignments\n    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;\n    static {\n      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);\n      tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData(\"message\", org.apache.thrift.TFieldRequirementType.DEFAULT, \n          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING          , true)));\n      tmpMap.put(_Fields.TASK_ID, new org.apache.thrift.meta_data.FieldMetaData(\"taskId\", org.apache.thrift.TFieldRequirementType.DEFAULT, \n          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, edu.berkeley.sparrow.thrift.TFullTaskId.class)));\n      tmpMap.put(_Fields.USER, new org.apache.thrift.meta_data.FieldMetaData(\"user\", org.apache.thrift.TFieldRequirementType.DEFAULT, \n          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, edu.berkeley.sparrow.thrift.TUserGroupInfo.class)));\n      metaDataMap = Collections.unmodifiableMap(tmpMap);\n      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(launchTask_args.class, metaDataMap);\n    }\n\n    public launchTask_args() {\n    }\n\n    public launchTask_args(\n      ByteBuffer message,\n      edu.berkeley.sparrow.thrift.TFullTaskId taskId,\n      edu.berkeley.sparrow.thrift.TUserGroupInfo user)\n    {\n      this();\n      this.message = message;\n      this.taskId = taskId;\n      this.user = user;\n    }\n\n    /**\n     * Performs a deep copy on <i>other</i>.\n     */\n    public launchTask_args(launchTask_args other) {\n      if (other.isSetMessage()) {\n        this.message = org.apache.thrift.TBaseHelper.copyBinary(other.message);\n;\n      }\n      if (other.isSetTaskId()) {\n        this.taskId = new edu.berkeley.sparrow.thrift.TFullTaskId(other.taskId);\n      }\n      if (other.isSetUser()) {\n        this.user = new edu.berkeley.sparrow.thrift.TUserGroupInfo(other.user);\n      }\n    }\n\n    public launchTask_args deepCopy() {\n      return new launchTask_args(this);\n    }\n\n    public void clear() {\n      this.message = null;\n      this.taskId = null;\n      this.user = null;\n    }\n\n    public byte[] getMessage() {\n      setMessage(org.apache.thrift.TBaseHelper.rightSize(message));\n      return message == null ? null : message.array();\n    }\n\n    public ByteBuffer bufferForMessage() {\n      return message;\n    }\n\n    public launchTask_args setMessage(byte[] message) {\n      setMessage(message == null ? (ByteBuffer)null : ByteBuffer.wrap(message));\n      return this;\n    }\n\n    public launchTask_args setMessage(ByteBuffer message) {\n      this.message = message;\n      return this;\n    }\n\n    public void unsetMessage() {\n      this.message = null;\n    }\n\n    /** Returns true if field message is set (has been assigned a value) and false otherwise */\n    public boolean isSetMessage() {\n      return this.message != null;\n    }\n\n    public void setMessageIsSet(boolean value) {\n      if (!value) {\n        this.message = null;\n      }\n    }\n\n    public edu.berkeley.sparrow.thrift.TFullTaskId getTaskId() {\n      return this.taskId;\n    }\n\n    public launchTask_args setTaskId(edu.berkeley.sparrow.thrift.TFullTaskId taskId) {\n      this.taskId = taskId;\n      return this;\n    }\n\n    public void unsetTaskId() {\n      this.taskId = null;\n    }\n\n    /** Returns true if field taskId is set (has been assigned a value) and false otherwise */\n    public boolean isSetTaskId() {\n      return this.taskId != null;\n    }\n\n    public void setTaskIdIsSet(boolean value) {\n      if (!value) {\n        this.taskId = null;\n      }\n    }\n\n    public edu.berkeley.sparrow.thrift.TUserGroupInfo getUser() {\n      return this.user;\n    }\n\n    public launchTask_args setUser(edu.berkeley.sparrow.thrift.TUserGroupInfo user) {\n      this.user = user;\n      return this;\n    }\n\n    public void unsetUser() {\n      this.user = null;\n    }\n\n    /** Returns true if field user is set (has been assigned a value) and false otherwise */\n    public boolean isSetUser() {\n      return this.user != null;\n    }\n\n    public void setUserIsSet(boolean value) {\n      if (!value) {\n        this.user = null;\n      }\n    }\n\n    public void setFieldValue(_Fields field, Object value) {\n      switch (field) {\n      case MESSAGE:\n        if (value == null) {\n          unsetMessage();\n        } else {\n          setMessage((ByteBuffer)value);\n        }\n        break;\n\n      case TASK_ID:\n        if (value == null) {\n          unsetTaskId();\n        } else {\n          setTaskId((edu.berkeley.sparrow.thrift.TFullTaskId)value);\n        }\n        break;\n\n      case USER:\n        if (value == null) {\n          unsetUser();\n        } else {\n          setUser((edu.berkeley.sparrow.thrift.TUserGroupInfo)value);\n        }\n        break;\n\n      }\n    }\n\n    public Object getFieldValue(_Fields field) {\n      switch (field) {\n      case MESSAGE:\n        return getMessage();\n\n      case TASK_ID:\n        return getTaskId();\n\n      case USER:\n        return getUser();\n\n      }\n      throw new IllegalStateException();\n    }\n\n    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */\n    public boolean isSet(_Fields field) {\n      if (field == null) {\n        throw new IllegalArgumentException();\n      }\n\n      switch (field) {\n      case MESSAGE:\n        return isSetMessage();\n      case TASK_ID:\n        return isSetTaskId();\n      case USER:\n        return isSetUser();\n      }\n      throw new IllegalStateException();\n    }\n\n    @Override\n    public boolean equals(Object that) {\n      if (that == null)\n        return false;\n      if (that instanceof launchTask_args)\n        return this.equals((launchTask_args)that);\n      return false;\n    }\n\n    public boolean equals(launchTask_args that) {\n      if (that == null)\n        return false;\n\n      boolean this_present_message = true && this.isSetMessage();\n      boolean that_present_message = true && that.isSetMessage();\n      if (this_present_message || that_present_message) {\n        if (!(this_present_message && that_present_message))\n          return false;\n        if (!this.message.equals(that.message))\n          return false;\n      }\n\n      boolean this_present_taskId = true && this.isSetTaskId();\n      boolean that_present_taskId = true && that.isSetTaskId();\n      if (this_present_taskId || that_present_taskId) {\n        if (!(this_present_taskId && that_present_taskId))\n          return false;\n        if (!this.taskId.equals(that.taskId))\n          return false;\n      }\n\n      boolean this_present_user = true && this.isSetUser();\n      boolean that_present_user = true && that.isSetUser();\n      if (this_present_user || that_present_user) {\n        if (!(this_present_user && that_present_user))\n          return false;\n        if (!this.user.equals(that.user))\n          return false;\n      }\n\n      return true;\n    }\n\n    @Override\n    public int hashCode() {\n      return 0;\n    }\n\n    public int compareTo(launchTask_args other) {\n      if (!getClass().equals(other.getClass())) {\n        return getClass().getName().compareTo(other.getClass().getName());\n      }\n\n      int lastComparison = 0;\n      launchTask_args typedOther = (launchTask_args)other;\n\n      lastComparison = Boolean.valueOf(isSetMessage()).compareTo(typedOther.isSetMessage());\n      if (lastComparison != 0) {\n        return lastComparison;\n      }\n      if (isSetMessage()) {\n        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, typedOther.message);\n        if (lastComparison != 0) {\n          return lastComparison;\n        }\n      }\n      lastComparison = Boolean.valueOf(isSetTaskId()).compareTo(typedOther.isSetTaskId());\n      if (lastComparison != 0) {\n        return lastComparison;\n      }\n      if (isSetTaskId()) {\n        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.taskId, typedOther.taskId);\n        if (lastComparison != 0) {\n          return lastComparison;\n        }\n      }\n      lastComparison = Boolean.valueOf(isSetUser()).compareTo(typedOther.isSetUser());\n      if (lastComparison != 0) {\n        return lastComparison;\n      }\n      if (isSetUser()) {\n        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.user, typedOther.user);\n        if (lastComparison != 0) {\n          return lastComparison;\n        }\n      }\n      return 0;\n    }\n\n    public _Fields fieldForId(int fieldId) {\n      return _Fields.findByThriftId(fieldId);\n    }\n\n    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {\n      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);\n    }\n\n    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {\n      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);\n    }\n\n    @Override\n    public String toString() {\n      StringBuilder sb = new StringBuilder(\"launchTask_args(\");\n      boolean first = true;\n\n      sb.append(\"message:\");\n      if (this.message == null) {\n        sb.append(\"null\");\n      } else {\n        org.apache.thrift.TBaseHelper.toString(this.message, sb);\n      }\n      first = false;\n      if (!first) sb.append(\", \");\n      sb.append(\"taskId:\");\n      if (this.taskId == null) {\n        sb.append(\"null\");\n      } else {\n        sb.append(this.taskId);\n      }\n      first = false;\n      if (!first) sb.append(\", \");\n      sb.append(\"user:\");\n      if (this.user == null) {\n        sb.append(\"null\");\n      } else {\n        sb.append(this.user);\n      }\n      first = false;\n      sb.append(\")\");\n      return sb.toString();\n    }\n\n    public void validate() throws org.apache.thrift.TException {\n      // check for required fields\n    }\n\n    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {\n      try {\n        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));\n      } catch (org.apache.thrift.TException te) {\n        throw new java.io.IOException(te.getMessage());\n      }\n    }\n\n    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {\n      try {\n        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));\n      } catch (org.apache.thrift.TException te) {\n        throw new java.io.IOException(te.getMessage());\n      }\n    }\n\n    private static class launchTask_argsStandardSchemeFactory implements SchemeFactory {\n      public launchTask_argsStandardScheme getScheme() {\n        return new launchTask_argsStandardScheme();\n      }\n    }\n\n    private static class launchTask_argsStandardScheme extends StandardScheme<launchTask_args> {\n\n      public void read(org.apache.thrift.protocol.TProtocol iprot, launchTask_args struct) throws org.apache.thrift.TException {\n        org.apache.thrift.protocol.TField schemeField;\n        iprot.readStructBegin();\n        while (true)\n        {\n          schemeField = iprot.readFieldBegin();\n          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { \n            break;\n          }\n          switch (schemeField.id) {\n            case 1: // MESSAGE\n              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {\n                struct.message = iprot.readBinary();\n                struct.setMessageIsSet(true);\n              } else { \n                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n              }\n              break;\n            case 2: // TASK_ID\n              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {\n                struct.taskId = new edu.berkeley.sparrow.thrift.TFullTaskId();\n                struct.taskId.read(iprot);\n                struct.setTaskIdIsSet(true);\n              } else { \n                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n              }\n              break;\n            case 3: // USER\n              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {\n                struct.user = new edu.berkeley.sparrow.thrift.TUserGroupInfo();\n                struct.user.read(iprot);\n                struct.setUserIsSet(true);\n              } else { \n                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n              }\n              break;\n            default:\n              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n          }\n          iprot.readFieldEnd();\n        }\n        iprot.readStructEnd();\n\n        // check for required fields of primitive type, which can't be checked in the validate method\n        struct.validate();\n      }\n\n      public void write(org.apache.thrift.protocol.TProtocol oprot, launchTask_args struct) throws org.apache.thrift.TException {\n        struct.validate();\n\n        oprot.writeStructBegin(STRUCT_DESC);\n        if (struct.message != null) {\n          oprot.writeFieldBegin(MESSAGE_FIELD_DESC);\n          oprot.writeBinary(struct.message);\n          oprot.writeFieldEnd();\n        }\n        if (struct.taskId != null) {\n          oprot.writeFieldBegin(TASK_ID_FIELD_DESC);\n          struct.taskId.write(oprot);\n          oprot.writeFieldEnd();\n        }\n        if (struct.user != null) {\n          oprot.writeFieldBegin(USER_FIELD_DESC);\n          struct.user.write(oprot);\n          oprot.writeFieldEnd();\n        }\n        oprot.writeFieldStop();\n        oprot.writeStructEnd();\n      }\n\n    }\n\n    private static class launchTask_argsTupleSchemeFactory implements SchemeFactory {\n      public launchTask_argsTupleScheme getScheme() {\n        return new launchTask_argsTupleScheme();\n      }\n    }\n\n    private static class launchTask_argsTupleScheme extends TupleScheme<launchTask_args> {\n\n      @Override\n      public void write(org.apache.thrift.protocol.TProtocol prot, launchTask_args struct) throws org.apache.thrift.TException {\n        TTupleProtocol oprot = (TTupleProtocol) prot;\n        BitSet optionals = new BitSet();\n        if (struct.isSetMessage()) {\n          optionals.set(0);\n        }\n        if (struct.isSetTaskId()) {\n          optionals.set(1);\n        }\n        if (struct.isSetUser()) {\n          optionals.set(2);\n        }\n        oprot.writeBitSet(optionals, 3);\n        if (struct.isSetMessage()) {\n          oprot.writeBinary(struct.message);\n        }\n        if (struct.isSetTaskId()) {\n          struct.taskId.write(oprot);\n        }\n        if (struct.isSetUser()) {\n          struct.user.write(oprot);\n        }\n      }\n\n      @Override\n      public void read(org.apache.thrift.protocol.TProtocol prot, launchTask_args struct) throws org.apache.thrift.TException {\n        TTupleProtocol iprot = (TTupleProtocol) prot;\n        BitSet incoming = iprot.readBitSet(3);\n        if (incoming.get(0)) {\n          struct.message = iprot.readBinary();\n          struct.setMessageIsSet(true);\n        }\n        if (incoming.get(1)) {\n          struct.taskId = new edu.berkeley.sparrow.thrift.TFullTaskId();\n          struct.taskId.read(iprot);\n          struct.setTaskIdIsSet(true);\n        }\n        if (incoming.get(2)) {\n          struct.user = new edu.berkeley.sparrow.thrift.TUserGroupInfo();\n          struct.user.read(iprot);\n          struct.setUserIsSet(true);\n        }\n      }\n    }\n\n  }\n\n  public static class launchTask_result implements org.apache.thrift.TBase<launchTask_result, launchTask_result._Fields>, java.io.Serializable, Cloneable   {\n    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct(\"launchTask_result\");\n\n\n    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();\n    static {\n      schemes.put(StandardScheme.class, new launchTask_resultStandardSchemeFactory());\n      schemes.put(TupleScheme.class, new launchTask_resultTupleSchemeFactory());\n    }\n\n\n    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */\n    public enum _Fields implements org.apache.thrift.TFieldIdEnum {\n;\n\n      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();\n\n      static {\n        for (_Fields field : EnumSet.allOf(_Fields.class)) {\n          byName.put(field.getFieldName(), field);\n        }\n      }\n\n      /**\n       * Find the _Fields constant that matches fieldId, or null if its not found.\n       */\n      public static _Fields findByThriftId(int fieldId) {\n        switch(fieldId) {\n          default:\n            return null;\n        }\n      }\n\n      /**\n       * Find the _Fields constant that matches fieldId, throwing an exception\n       * if it is not found.\n       */\n      public static _Fields findByThriftIdOrThrow(int fieldId) {\n        _Fields fields = findByThriftId(fieldId);\n        if (fields == null) throw new IllegalArgumentException(\"Field \" + fieldId + \" doesn't exist!\");\n        return fields;\n      }\n\n      /**\n       * Find the _Fields constant that matches name, or null if its not found.\n       */\n      public static _Fields findByName(String name) {\n        return byName.get(name);\n      }\n\n      private final short _thriftId;\n      private final String _fieldName;\n\n      _Fields(short thriftId, String fieldName) {\n        _thriftId = thriftId;\n        _fieldName = fieldName;\n      }\n\n      public short getThriftFieldId() {\n        return _thriftId;\n      }\n\n      public String getFieldName() {\n        return _fieldName;\n      }\n    }\n    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;\n    static {\n      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);\n      metaDataMap = Collections.unmodifiableMap(tmpMap);\n      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(launchTask_result.class, metaDataMap);\n    }\n\n    public launchTask_result() {\n    }\n\n    /**\n     * Performs a deep copy on <i>other</i>.\n     */\n    public launchTask_result(launchTask_result other) {\n    }\n\n    public launchTask_result deepCopy() {\n      return new launchTask_result(this);\n    }\n\n    public void clear() {\n    }\n\n    public void setFieldValue(_Fields field, Object value) {\n      switch (field) {\n      }\n    }\n\n    public Object getFieldValue(_Fields field) {\n      switch (field) {\n      }\n      throw new IllegalStateException();\n    }\n\n    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */\n    public boolean isSet(_Fields field) {\n      if (field == null) {\n        throw new IllegalArgumentException();\n      }\n\n      switch (field) {\n      }\n      throw new IllegalStateException();\n    }\n\n    @Override\n    public boolean equals(Object that) {\n      if (that == null)\n        return false;\n      if (that instanceof launchTask_result)\n        return this.equals((launchTask_result)that);\n      return false;\n    }\n\n    public boolean equals(launchTask_result that) {\n      if (that == null)\n        return false;\n\n      return true;\n    }\n\n    @Override\n    public int hashCode() {\n      return 0;\n    }\n\n    public int compareTo(launchTask_result other) {\n      if (!getClass().equals(other.getClass())) {\n        return getClass().getName().compareTo(other.getClass().getName());\n      }\n\n      int lastComparison = 0;\n      launchTask_result typedOther = (launchTask_result)other;\n\n      return 0;\n    }\n\n    public _Fields fieldForId(int fieldId) {\n      return _Fields.findByThriftId(fieldId);\n    }\n\n    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {\n      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);\n    }\n\n    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {\n      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);\n      }\n\n    @Override\n    public String toString() {\n      StringBuilder sb = new StringBuilder(\"launchTask_result(\");\n      boolean first = true;\n\n      sb.append(\")\");\n      return sb.toString();\n    }\n\n    public void validate() throws org.apache.thrift.TException {\n      // check for required fields\n    }\n\n    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {\n      try {\n        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));\n      } catch (org.apache.thrift.TException te) {\n        throw new java.io.IOException(te.getMessage());\n      }\n    }\n\n    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {\n      try {\n        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));\n      } catch (org.apache.thrift.TException te) {\n        throw new java.io.IOException(te.getMessage());\n      }\n    }\n\n    private static class launchTask_resultStandardSchemeFactory implements SchemeFactory {\n      public launchTask_resultStandardScheme getScheme() {\n        return new launchTask_resultStandardScheme();\n      }\n    }\n\n    private static class launchTask_resultStandardScheme extends StandardScheme<launchTask_result> {\n\n      public void read(org.apache.thrift.protocol.TProtocol iprot, launchTask_result struct) throws org.apache.thrift.TException {\n        org.apache.thrift.protocol.TField schemeField;\n        iprot.readStructBegin();\n        while (true)\n        {\n          schemeField = iprot.readFieldBegin();\n          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { \n            break;\n          }\n          switch (schemeField.id) {\n            default:\n              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n          }\n          iprot.readFieldEnd();\n        }\n        iprot.readStructEnd();\n\n        // check for required fields of primitive type, which can't be checked in the validate method\n        struct.validate();\n      }\n\n      public void write(org.apache.thrift.protocol.TProtocol oprot, launchTask_result struct) throws org.apache.thrift.TException {\n        struct.validate();\n\n        oprot.writeStructBegin(STRUCT_DESC);\n        oprot.writeFieldStop();\n        oprot.writeStructEnd();\n      }\n\n    }\n\n    private static class launchTask_resultTupleSchemeFactory implements SchemeFactory {\n      public launchTask_resultTupleScheme getScheme() {\n        return new launchTask_resultTupleScheme();\n      }\n    }\n\n    private static class launchTask_resultTupleScheme extends TupleScheme<launchTask_result> {\n\n      @Override\n      public void write(org.apache.thrift.protocol.TProtocol prot, launchTask_result struct) throws org.apache.thrift.TException {\n        TTupleProtocol oprot = (TTupleProtocol) prot;\n      }\n\n      @Override\n      public void read(org.apache.thrift.protocol.TProtocol prot, launchTask_result struct) throws org.apache.thrift.TException {\n        TTupleProtocol iprot = (TTupleProtocol) prot;\n      }\n    }\n\n  }\n\n}\n"
  },
  {
    "path": "src/main/gen-java/edu/berkeley/sparrow/thrift/FrontendService.java",
    "content": "/**\n * Autogenerated by Thrift Compiler (0.8.0)\n *\n * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING\n *  @generated\n */\npackage edu.berkeley.sparrow.thrift;\n\nimport org.apache.thrift.scheme.IScheme;\nimport org.apache.thrift.scheme.SchemeFactory;\nimport org.apache.thrift.scheme.StandardScheme;\n\nimport org.apache.thrift.scheme.TupleScheme;\nimport org.apache.thrift.protocol.TTupleProtocol;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.util.HashMap;\nimport java.util.EnumMap;\nimport java.util.Set;\nimport java.util.HashSet;\nimport java.util.EnumSet;\nimport java.util.Collections;\nimport java.util.BitSet;\nimport java.nio.ByteBuffer;\nimport java.util.Arrays;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\npublic class FrontendService {\n\n  public interface Iface {\n\n    public void frontendMessage(edu.berkeley.sparrow.thrift.TFullTaskId taskId, int status, ByteBuffer message) throws org.apache.thrift.TException;\n\n  }\n\n  public interface AsyncIface {\n\n    public void frontendMessage(edu.berkeley.sparrow.thrift.TFullTaskId taskId, int status, ByteBuffer message, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.frontendMessage_call> resultHandler) throws org.apache.thrift.TException;\n\n  }\n\n  public static class Client extends org.apache.thrift.TServiceClient implements Iface {\n    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {\n      public Factory() {}\n      public Client getClient(org.apache.thrift.protocol.TProtocol prot) {\n        return new Client(prot);\n      }\n      public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {\n        return new Client(iprot, oprot);\n      }\n    }\n\n    public Client(org.apache.thrift.protocol.TProtocol prot)\n    {\n      super(prot, prot);\n    }\n\n    public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {\n      super(iprot, oprot);\n    }\n\n    public void frontendMessage(edu.berkeley.sparrow.thrift.TFullTaskId taskId, int status, ByteBuffer message) throws org.apache.thrift.TException\n    {\n      send_frontendMessage(taskId, status, message);\n      recv_frontendMessage();\n    }\n\n    public void send_frontendMessage(edu.berkeley.sparrow.thrift.TFullTaskId taskId, int status, ByteBuffer message) throws org.apache.thrift.TException\n    {\n      frontendMessage_args args = new frontendMessage_args();\n      args.setTaskId(taskId);\n      args.setStatus(status);\n      args.setMessage(message);\n      sendBase(\"frontendMessage\", args);\n    }\n\n    public void recv_frontendMessage() throws org.apache.thrift.TException\n    {\n      frontendMessage_result result = new frontendMessage_result();\n      receiveBase(result, \"frontendMessage\");\n      return;\n    }\n\n  }\n  public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface {\n    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {\n      private org.apache.thrift.async.TAsyncClientManager clientManager;\n      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;\n      public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {\n        this.clientManager = clientManager;\n        this.protocolFactory = protocolFactory;\n      }\n      public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {\n        return new AsyncClient(protocolFactory, clientManager, transport);\n      }\n    }\n\n    public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {\n      super(protocolFactory, clientManager, transport);\n    }\n\n    public void frontendMessage(edu.berkeley.sparrow.thrift.TFullTaskId taskId, int status, ByteBuffer message, org.apache.thrift.async.AsyncMethodCallback<frontendMessage_call> resultHandler) throws org.apache.thrift.TException {\n      checkReady();\n      frontendMessage_call method_call = new frontendMessage_call(taskId, status, message, resultHandler, this, ___protocolFactory, ___transport);\n      this.___currentMethod = method_call;\n      ___manager.call(method_call);\n    }\n\n    public static class frontendMessage_call extends org.apache.thrift.async.TAsyncMethodCall {\n      private edu.berkeley.sparrow.thrift.TFullTaskId taskId;\n      private int status;\n      private ByteBuffer message;\n      public frontendMessage_call(edu.berkeley.sparrow.thrift.TFullTaskId taskId, int status, ByteBuffer message, org.apache.thrift.async.AsyncMethodCallback<frontendMessage_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {\n        super(client, protocolFactory, transport, resultHandler, false);\n        this.taskId = taskId;\n        this.status = status;\n        this.message = message;\n      }\n\n      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {\n        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage(\"frontendMessage\", org.apache.thrift.protocol.TMessageType.CALL, 0));\n        frontendMessage_args args = new frontendMessage_args();\n        args.setTaskId(taskId);\n        args.setStatus(status);\n        args.setMessage(message);\n        args.write(prot);\n        prot.writeMessageEnd();\n      }\n\n      public void getResult() throws org.apache.thrift.TException {\n        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {\n          throw new IllegalStateException(\"Method call not finished!\");\n        }\n        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());\n        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);\n        (new Client(prot)).recv_frontendMessage();\n      }\n    }\n\n  }\n\n  public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor {\n    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());\n    public Processor(I iface) {\n      super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));\n    }\n\n    protected Processor(I iface, Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {\n      super(iface, getProcessMap(processMap));\n    }\n\n    private static <I extends Iface> Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> getProcessMap(Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {\n      processMap.put(\"frontendMessage\", new frontendMessage());\n      return processMap;\n    }\n\n    private static class frontendMessage<I extends Iface> extends org.apache.thrift.ProcessFunction<I, frontendMessage_args> {\n      public frontendMessage() {\n        super(\"frontendMessage\");\n      }\n\n      protected frontendMessage_args getEmptyArgsInstance() {\n        return new frontendMessage_args();\n      }\n\n      protected frontendMessage_result getResult(I iface, frontendMessage_args args) throws org.apache.thrift.TException {\n        frontendMessage_result result = new frontendMessage_result();\n        iface.frontendMessage(args.taskId, args.status, args.message);\n        return result;\n      }\n    }\n\n  }\n\n  public static class frontendMessage_args implements org.apache.thrift.TBase<frontendMessage_args, frontendMessage_args._Fields>, java.io.Serializable, Cloneable   {\n    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct(\"frontendMessage_args\");\n\n    private static final org.apache.thrift.protocol.TField TASK_ID_FIELD_DESC = new org.apache.thrift.protocol.TField(\"taskId\", org.apache.thrift.protocol.TType.STRUCT, (short)1);\n    private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField(\"status\", org.apache.thrift.protocol.TType.I32, (short)2);\n    private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField(\"message\", org.apache.thrift.protocol.TType.STRING, (short)3);\n\n    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();\n    static {\n      schemes.put(StandardScheme.class, new frontendMessage_argsStandardSchemeFactory());\n      schemes.put(TupleScheme.class, new frontendMessage_argsTupleSchemeFactory());\n    }\n\n    public edu.berkeley.sparrow.thrift.TFullTaskId taskId; // required\n    public int status; // required\n    public ByteBuffer message; // required\n\n    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */\n    public enum _Fields implements org.apache.thrift.TFieldIdEnum {\n      TASK_ID((short)1, \"taskId\"),\n      STATUS((short)2, \"status\"),\n      MESSAGE((short)3, \"message\");\n\n      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();\n\n      static {\n        for (_Fields field : EnumSet.allOf(_Fields.class)) {\n          byName.put(field.getFieldName(), field);\n        }\n      }\n\n      /**\n       * Find the _Fields constant that matches fieldId, or null if its not found.\n       */\n      public static _Fields findByThriftId(int fieldId) {\n        switch(fieldId) {\n          case 1: // TASK_ID\n            return TASK_ID;\n          case 2: // STATUS\n            return STATUS;\n          case 3: // MESSAGE\n            return MESSAGE;\n          default:\n            return null;\n        }\n      }\n\n      /**\n       * Find the _Fields constant that matches fieldId, throwing an exception\n       * if it is not found.\n       */\n      public static _Fields findByThriftIdOrThrow(int fieldId) {\n        _Fields fields = findByThriftId(fieldId);\n        if (fields == null) throw new IllegalArgumentException(\"Field \" + fieldId + \" doesn't exist!\");\n        return fields;\n      }\n\n      /**\n       * Find the _Fields constant that matches name, or null if its not found.\n       */\n      public static _Fields findByName(String name) {\n        return byName.get(name);\n      }\n\n      private final short _thriftId;\n      private final String _fieldName;\n\n      _Fields(short thriftId, String fieldName) {\n        _thriftId = thriftId;\n        _fieldName = fieldName;\n      }\n\n      public short getThriftFieldId() {\n        return _thriftId;\n      }\n\n      public String getFieldName() {\n        return _fieldName;\n      }\n    }\n\n    // isset id assignments\n    private static final int __STATUS_ISSET_ID = 0;\n    private BitSet __isset_bit_vector = new BitSet(1);\n    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;\n    static {\n      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);\n      tmpMap.put(_Fields.TASK_ID, new org.apache.thrift.meta_data.FieldMetaData(\"taskId\", org.apache.thrift.TFieldRequirementType.DEFAULT, \n          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, edu.berkeley.sparrow.thrift.TFullTaskId.class)));\n      tmpMap.put(_Fields.STATUS, new org.apache.thrift.meta_data.FieldMetaData(\"status\", org.apache.thrift.TFieldRequirementType.DEFAULT, \n          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));\n      tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData(\"message\", org.apache.thrift.TFieldRequirementType.DEFAULT, \n          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING          , true)));\n      metaDataMap = Collections.unmodifiableMap(tmpMap);\n      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(frontendMessage_args.class, metaDataMap);\n    }\n\n    public frontendMessage_args() {\n    }\n\n    public frontendMessage_args(\n      edu.berkeley.sparrow.thrift.TFullTaskId taskId,\n      int status,\n      ByteBuffer message)\n    {\n      this();\n      this.taskId = taskId;\n      this.status = status;\n      setStatusIsSet(true);\n      this.message = message;\n    }\n\n    /**\n     * Performs a deep copy on <i>other</i>.\n     */\n    public frontendMessage_args(frontendMessage_args other) {\n      __isset_bit_vector.clear();\n      __isset_bit_vector.or(other.__isset_bit_vector);\n      if (other.isSetTaskId()) {\n        this.taskId = new edu.berkeley.sparrow.thrift.TFullTaskId(other.taskId);\n      }\n      this.status = other.status;\n      if (other.isSetMessage()) {\n        this.message = org.apache.thrift.TBaseHelper.copyBinary(other.message);\n;\n      }\n    }\n\n    public frontendMessage_args deepCopy() {\n      return new frontendMessage_args(this);\n    }\n\n    public void clear() {\n      this.taskId = null;\n      setStatusIsSet(false);\n      this.status = 0;\n      this.message = null;\n    }\n\n    public edu.berkeley.sparrow.thrift.TFullTaskId getTaskId() {\n      return this.taskId;\n    }\n\n    public frontendMessage_args setTaskId(edu.berkeley.sparrow.thrift.TFullTaskId taskId) {\n      this.taskId = taskId;\n      return this;\n    }\n\n    public void unsetTaskId() {\n      this.taskId = null;\n    }\n\n    /** Returns true if field taskId is set (has been assigned a value) and false otherwise */\n    public boolean isSetTaskId() {\n      return this.taskId != null;\n    }\n\n    public void setTaskIdIsSet(boolean value) {\n      if (!value) {\n        this.taskId = null;\n      }\n    }\n\n    public int getStatus() {\n      return this.status;\n    }\n\n    public frontendMessage_args setStatus(int status) {\n      this.status = status;\n      setStatusIsSet(true);\n      return this;\n    }\n\n    public void unsetStatus() {\n      __isset_bit_vector.clear(__STATUS_ISSET_ID);\n    }\n\n    /** Returns true if field status is set (has been assigned a value) and false otherwise */\n    public boolean isSetStatus() {\n      return __isset_bit_vector.get(__STATUS_ISSET_ID);\n    }\n\n    public void setStatusIsSet(boolean value) {\n      __isset_bit_vector.set(__STATUS_ISSET_ID, value);\n    }\n\n    public byte[] getMessage() {\n      setMessage(org.apache.thrift.TBaseHelper.rightSize(message));\n      return message == null ? null : message.array();\n    }\n\n    public ByteBuffer bufferForMessage() {\n      return message;\n    }\n\n    public frontendMessage_args setMessage(byte[] message) {\n      setMessage(message == null ? (ByteBuffer)null : ByteBuffer.wrap(message));\n      return this;\n    }\n\n    public frontendMessage_args setMessage(ByteBuffer message) {\n      this.message = message;\n      return this;\n    }\n\n    public void unsetMessage() {\n      this.message = null;\n    }\n\n    /** Returns true if field message is set (has been assigned a value) and false otherwise */\n    public boolean isSetMessage() {\n      return this.message != null;\n    }\n\n    public void setMessageIsSet(boolean value) {\n      if (!value) {\n        this.message = null;\n      }\n    }\n\n    public void setFieldValue(_Fields field, Object value) {\n      switch (field) {\n      case TASK_ID:\n        if (value == null) {\n          unsetTaskId();\n        } else {\n          setTaskId((edu.berkeley.sparrow.thrift.TFullTaskId)value);\n        }\n        break;\n\n      case STATUS:\n        if (value == null) {\n          unsetStatus();\n        } else {\n          setStatus((Integer)value);\n        }\n        break;\n\n      case MESSAGE:\n        if (value == null) {\n          unsetMessage();\n        } else {\n          setMessage((ByteBuffer)value);\n        }\n        break;\n\n      }\n    }\n\n    public Object getFieldValue(_Fields field) {\n      switch (field) {\n      case TASK_ID:\n        return getTaskId();\n\n      case STATUS:\n        return Integer.valueOf(getStatus());\n\n      case MESSAGE:\n        return getMessage();\n\n      }\n      throw new IllegalStateException();\n    }\n\n    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */\n    public boolean isSet(_Fields field) {\n      if (field == null) {\n        throw new IllegalArgumentException();\n      }\n\n      switch (field) {\n      case TASK_ID:\n        return isSetTaskId();\n      case STATUS:\n        return isSetStatus();\n      case MESSAGE:\n        return isSetMessage();\n      }\n      throw new IllegalStateException();\n    }\n\n    @Override\n    public boolean equals(Object that) {\n      if (that == null)\n        return false;\n      if (that instanceof frontendMessage_args)\n        return this.equals((frontendMessage_args)that);\n      return false;\n    }\n\n    public boolean equals(frontendMessage_args that) {\n      if (that == null)\n        return false;\n\n      boolean this_present_taskId = true && this.isSetTaskId();\n      boolean that_present_taskId = true && that.isSetTaskId();\n      if (this_present_taskId || that_present_taskId) {\n        if (!(this_present_taskId && that_present_taskId))\n          return false;\n        if (!this.taskId.equals(that.taskId))\n          return false;\n      }\n\n      boolean this_present_status = true;\n      boolean that_present_status = true;\n      if (this_present_status || that_present_status) {\n        if (!(this_present_status && that_present_status))\n          return false;\n        if (this.status != that.status)\n          return false;\n      }\n\n      boolean this_present_message = true && this.isSetMessage();\n      boolean that_present_message = true && that.isSetMessage();\n      if (this_present_message || that_present_message) {\n        if (!(this_present_message && that_present_message))\n          return false;\n        if (!this.message.equals(that.message))\n          return false;\n      }\n\n      return true;\n    }\n\n    @Override\n    public int hashCode() {\n      return 0;\n    }\n\n    public int compareTo(frontendMessage_args other) {\n      if (!getClass().equals(other.getClass())) {\n        return getClass().getName().compareTo(other.getClass().getName());\n      }\n\n      int lastComparison = 0;\n      frontendMessage_args typedOther = (frontendMessage_args)other;\n\n      lastComparison = Boolean.valueOf(isSetTaskId()).compareTo(typedOther.isSetTaskId());\n      if (lastComparison != 0) {\n        return lastComparison;\n      }\n      if (isSetTaskId()) {\n        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.taskId, typedOther.taskId);\n        if (lastComparison != 0) {\n          return lastComparison;\n        }\n      }\n      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus());\n      if (lastComparison != 0) {\n        return lastComparison;\n      }\n      if (isSetStatus()) {\n        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status);\n        if (lastComparison != 0) {\n          return lastComparison;\n        }\n      }\n      lastComparison = Boolean.valueOf(isSetMessage()).compareTo(typedOther.isSetMessage());\n      if (lastComparison != 0) {\n        return lastComparison;\n      }\n      if (isSetMessage()) {\n        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, typedOther.message);\n        if (lastComparison != 0) {\n          return lastComparison;\n        }\n      }\n      return 0;\n    }\n\n    public _Fields fieldForId(int fieldId) {\n      return _Fields.findByThriftId(fieldId);\n    }\n\n    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {\n      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);\n    }\n\n    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {\n      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);\n    }\n\n    @Override\n    public String toString() {\n      StringBuilder sb = new StringBuilder(\"frontendMessage_args(\");\n      boolean first = true;\n\n      sb.append(\"taskId:\");\n      if (this.taskId == null) {\n        sb.append(\"null\");\n      } else {\n        sb.append(this.taskId);\n      }\n      first = false;\n      if (!first) sb.append(\", \");\n      sb.append(\"status:\");\n      sb.append(this.status);\n      first = false;\n      if (!first) sb.append(\", \");\n      sb.append(\"message:\");\n      if (this.message == null) {\n        sb.append(\"null\");\n      } else {\n        org.apache.thrift.TBaseHelper.toString(this.message, sb);\n      }\n      first = false;\n      sb.append(\")\");\n      return sb.toString();\n    }\n\n    public void validate() throws org.apache.thrift.TException {\n      // check for required fields\n    }\n\n    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {\n      try {\n        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));\n      } catch (org.apache.thrift.TException te) {\n        throw new java.io.IOException(te.getMessage());\n      }\n    }\n\n    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {\n      try {\n        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.\n        __isset_bit_vector = new BitSet(1);\n        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));\n      } catch (org.apache.thrift.TException te) {\n        throw new java.io.IOException(te.getMessage());\n      }\n    }\n\n    private static class frontendMessage_argsStandardSchemeFactory implements SchemeFactory {\n      public frontendMessage_argsStandardScheme getScheme() {\n        return new frontendMessage_argsStandardScheme();\n      }\n    }\n\n    private static class frontendMessage_argsStandardScheme extends StandardScheme<frontendMessage_args> {\n\n      public void read(org.apache.thrift.protocol.TProtocol iprot, frontendMessage_args struct) throws org.apache.thrift.TException {\n        org.apache.thrift.protocol.TField schemeField;\n        iprot.readStructBegin();\n        while (true)\n        {\n          schemeField = iprot.readFieldBegin();\n          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { \n            break;\n          }\n          switch (schemeField.id) {\n            case 1: // TASK_ID\n              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {\n                struct.taskId = new edu.berkeley.sparrow.thrift.TFullTaskId();\n                struct.taskId.read(iprot);\n                struct.setTaskIdIsSet(true);\n              } else { \n                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n              }\n              break;\n            case 2: // STATUS\n              if (schemeField.type == org.apache.thrift.protocol.TType.I32) {\n                struct.status = iprot.readI32();\n                struct.setStatusIsSet(true);\n              } else { \n                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n              }\n              break;\n            case 3: // MESSAGE\n              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {\n                struct.message = iprot.readBinary();\n                struct.setMessageIsSet(true);\n              } else { \n                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n              }\n              break;\n            default:\n              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n          }\n          iprot.readFieldEnd();\n        }\n        iprot.readStructEnd();\n\n        // check for required fields of primitive type, which can't be checked in the validate method\n        struct.validate();\n      }\n\n      public void write(org.apache.thrift.protocol.TProtocol oprot, frontendMessage_args struct) throws org.apache.thrift.TException {\n        struct.validate();\n\n        oprot.writeStructBegin(STRUCT_DESC);\n        if (struct.taskId != null) {\n          oprot.writeFieldBegin(TASK_ID_FIELD_DESC);\n          struct.taskId.write(oprot);\n          oprot.writeFieldEnd();\n        }\n        oprot.writeFieldBegin(STATUS_FIELD_DESC);\n        oprot.writeI32(struct.status);\n        oprot.writeFieldEnd();\n        if (struct.message != null) {\n          oprot.writeFieldBegin(MESSAGE_FIELD_DESC);\n          oprot.writeBinary(struct.message);\n          oprot.writeFieldEnd();\n        }\n        oprot.writeFieldStop();\n        oprot.writeStructEnd();\n      }\n\n    }\n\n    private static class frontendMessage_argsTupleSchemeFactory implements SchemeFactory {\n      public frontendMessage_argsTupleScheme getScheme() {\n        return new frontendMessage_argsTupleScheme();\n      }\n    }\n\n    private static class frontendMessage_argsTupleScheme extends TupleScheme<frontendMessage_args> {\n\n      @Override\n      public void write(org.apache.thrift.protocol.TProtocol prot, frontendMessage_args struct) throws org.apache.thrift.TException {\n        TTupleProtocol oprot = (TTupleProtocol) prot;\n        BitSet optionals = new BitSet();\n        if (struct.isSetTaskId()) {\n          optionals.set(0);\n        }\n        if (struct.isSetStatus()) {\n          optionals.set(1);\n        }\n        if (struct.isSetMessage()) {\n          optionals.set(2);\n        }\n        oprot.writeBitSet(optionals, 3);\n        if (struct.isSetTaskId()) {\n          struct.taskId.write(oprot);\n        }\n        if (struct.isSetStatus()) {\n          oprot.writeI32(struct.status);\n        }\n        if (struct.isSetMessage()) {\n          oprot.writeBinary(struct.message);\n        }\n      }\n\n      @Override\n      public void read(org.apache.thrift.protocol.TProtocol prot, frontendMessage_args struct) throws org.apache.thrift.TException {\n        TTupleProtocol iprot = (TTupleProtocol) prot;\n        BitSet incoming = iprot.readBitSet(3);\n        if (incoming.get(0)) {\n          struct.taskId = new edu.berkeley.sparrow.thrift.TFullTaskId();\n          struct.taskId.read(iprot);\n          struct.setTaskIdIsSet(true);\n        }\n        if (incoming.get(1)) {\n          struct.status = iprot.readI32();\n          struct.setStatusIsSet(true);\n        }\n        if (incoming.get(2)) {\n          struct.message = iprot.readBinary();\n          struct.setMessageIsSet(true);\n        }\n      }\n    }\n\n  }\n\n  public static class frontendMessage_result implements org.apache.thrift.TBase<frontendMessage_result, frontendMessage_result._Fields>, java.io.Serializable, Cloneable   {\n    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct(\"frontendMessage_result\");\n\n\n    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();\n    static {\n      schemes.put(StandardScheme.class, new frontendMessage_resultStandardSchemeFactory());\n      schemes.put(TupleScheme.class, new frontendMessage_resultTupleSchemeFactory());\n    }\n\n\n    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */\n    public enum _Fields implements org.apache.thrift.TFieldIdEnum {\n;\n\n      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();\n\n      static {\n        for (_Fields field : EnumSet.allOf(_Fields.class)) {\n          byName.put(field.getFieldName(), field);\n        }\n      }\n\n      /**\n       * Find the _Fields constant that matches fieldId, or null if its not found.\n       */\n      public static _Fields findByThriftId(int fieldId) {\n        switch(fieldId) {\n          default:\n            return null;\n        }\n      }\n\n      /**\n       * Find the _Fields constant that matches fieldId, throwing an exception\n       * if it is not found.\n       */\n      public static _Fields findByThriftIdOrThrow(int fieldId) {\n        _Fields fields = findByThriftId(fieldId);\n        if (fields == null) throw new IllegalArgumentException(\"Field \" + fieldId + \" doesn't exist!\");\n        return fields;\n      }\n\n      /**\n       * Find the _Fields constant that matches name, or null if its not found.\n       */\n      public static _Fields findByName(String name) {\n        return byName.get(name);\n      }\n\n      private final short _thriftId;\n      private final String _fieldName;\n\n      _Fields(short thriftId, String fieldName) {\n        _thriftId = thriftId;\n        _fieldName = fieldName;\n      }\n\n      public short getThriftFieldId() {\n        return _thriftId;\n      }\n\n      public String getFieldName() {\n        return _fieldName;\n      }\n    }\n    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;\n    static {\n      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);\n      metaDataMap = Collections.unmodifiableMap(tmpMap);\n      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(frontendMessage_result.class, metaDataMap);\n    }\n\n    public frontendMessage_result() {\n    }\n\n    /**\n     * Performs a deep copy on <i>other</i>.\n     */\n    public frontendMessage_result(frontendMessage_result other) {\n    }\n\n    public frontendMessage_result deepCopy() {\n      return new frontendMessage_result(this);\n    }\n\n    public void clear() {\n    }\n\n    public void setFieldValue(_Fields field, Object value) {\n      switch (field) {\n      }\n    }\n\n    public Object getFieldValue(_Fields field) {\n      switch (field) {\n      }\n      throw new IllegalStateException();\n    }\n\n    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */\n    public boolean isSet(_Fields field) {\n      if (field == null) {\n        throw new IllegalArgumentException();\n      }\n\n      switch (field) {\n      }\n      throw new IllegalStateException();\n    }\n\n    @Override\n    public boolean equals(Object that) {\n      if (that == null)\n        return false;\n      if (that instanceof frontendMessage_result)\n        return this.equals((frontendMessage_result)that);\n      return false;\n    }\n\n    public boolean equals(frontendMessage_result that) {\n      if (that == null)\n        return false;\n\n      return true;\n    }\n\n    @Override\n    public int hashCode() {\n      return 0;\n    }\n\n    public int compareTo(frontendMessage_result other) {\n      if (!getClass().equals(other.getClass())) {\n        return getClass().getName().compareTo(other.getClass().getName());\n      }\n\n      int lastComparison = 0;\n      frontendMessage_result typedOther = (frontendMessage_result)other;\n\n      return 0;\n    }\n\n    public _Fields fieldForId(int fieldId) {\n      return _Fields.findByThriftId(fieldId);\n    }\n\n    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {\n      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);\n    }\n\n    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {\n      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);\n      }\n\n    @Override\n    public String toString() {\n      StringBuilder sb = new StringBuilder(\"frontendMessage_result(\");\n      boolean first = true;\n\n      sb.append(\")\");\n      return sb.toString();\n    }\n\n    public void validate() throws org.apache.thrift.TException {\n      // check for required fields\n    }\n\n    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {\n      try {\n        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));\n      } catch (org.apache.thrift.TException te) {\n        throw new java.io.IOException(te.getMessage());\n      }\n    }\n\n    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {\n      try {\n        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));\n      } catch (org.apache.thrift.TException te) {\n        throw new java.io.IOException(te.getMessage());\n      }\n    }\n\n    private static class frontendMessage_resultStandardSchemeFactory implements SchemeFactory {\n      public frontendMessage_resultStandardScheme getScheme() {\n        return new frontendMessage_resultStandardScheme();\n      }\n    }\n\n    private static class frontendMessage_resultStandardScheme extends StandardScheme<frontendMessage_result> {\n\n      public void read(org.apache.thrift.protocol.TProtocol iprot, frontendMessage_result struct) throws org.apache.thrift.TException {\n        org.apache.thrift.protocol.TField schemeField;\n        iprot.readStructBegin();\n        while (true)\n        {\n          schemeField = iprot.readFieldBegin();\n          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { \n            break;\n          }\n          switch (schemeField.id) {\n            default:\n              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n          }\n          iprot.readFieldEnd();\n        }\n        iprot.readStructEnd();\n\n        // check for required fields of primitive type, which can't be checked in the validate method\n        struct.validate();\n      }\n\n      public void write(org.apache.thrift.protocol.TProtocol oprot, frontendMessage_result struct) throws org.apache.thrift.TException {\n        struct.validate();\n\n        oprot.writeStructBegin(STRUCT_DESC);\n        oprot.writeFieldStop();\n        oprot.writeStructEnd();\n      }\n\n    }\n\n    private static class frontendMessage_resultTupleSchemeFactory implements SchemeFactory {\n      public frontendMessage_resultTupleScheme getScheme() {\n        return new frontendMessage_resultTupleScheme();\n      }\n    }\n\n    private static class frontendMessage_resultTupleScheme extends TupleScheme<frontendMessage_result> {\n\n      @Override\n      public void write(org.apache.thrift.protocol.TProtocol prot, frontendMessage_result struct) throws org.apache.thrift.TException {\n        TTupleProtocol oprot = (TTupleProtocol) prot;\n      }\n\n      @Override\n      public void read(org.apache.thrift.protocol.TProtocol prot, frontendMessage_result struct) throws org.apache.thrift.TException {\n        TTupleProtocol iprot = (TTupleProtocol) prot;\n      }\n    }\n\n  }\n\n}\n"
  },
  {
    "path": "src/main/gen-java/edu/berkeley/sparrow/thrift/GetTaskService.java",
    "content": "/**\n * Autogenerated by Thrift Compiler (0.8.0)\n *\n * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING\n *  @generated\n */\npackage edu.berkeley.sparrow.thrift;\n\nimport org.apache.thrift.scheme.IScheme;\nimport org.apache.thrift.scheme.SchemeFactory;\nimport org.apache.thrift.scheme.StandardScheme;\n\nimport org.apache.thrift.scheme.TupleScheme;\nimport org.apache.thrift.protocol.TTupleProtocol;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.util.HashMap;\nimport java.util.EnumMap;\nimport java.util.Set;\nimport java.util.HashSet;\nimport java.util.EnumSet;\nimport java.util.Collections;\nimport java.util.BitSet;\nimport java.nio.ByteBuffer;\nimport java.util.Arrays;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\npublic class GetTaskService {\n\n  public interface Iface {\n\n    public List<edu.berkeley.sparrow.thrift.TTaskLaunchSpec> getTask(String requestId, edu.berkeley.sparrow.thrift.THostPort nodeMonitorAddress) throws org.apache.thrift.TException;\n\n  }\n\n  public interface AsyncIface {\n\n    public void getTask(String requestId, edu.berkeley.sparrow.thrift.THostPort nodeMonitorAddress, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getTask_call> resultHandler) throws org.apache.thrift.TException;\n\n  }\n\n  public static class Client extends org.apache.thrift.TServiceClient implements Iface {\n    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {\n      public Factory() {}\n      public Client getClient(org.apache.thrift.protocol.TProtocol prot) {\n        return new Client(prot);\n      }\n      public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {\n        return new Client(iprot, oprot);\n      }\n    }\n\n    public Client(org.apache.thrift.protocol.TProtocol prot)\n    {\n      super(prot, prot);\n    }\n\n    public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {\n      super(iprot, oprot);\n    }\n\n    public List<edu.berkeley.sparrow.thrift.TTaskLaunchSpec> getTask(String requestId, edu.berkeley.sparrow.thrift.THostPort nodeMonitorAddress) throws org.apache.thrift.TException\n    {\n      send_getTask(requestId, nodeMonitorAddress);\n      return recv_getTask();\n    }\n\n    public void send_getTask(String requestId, edu.berkeley.sparrow.thrift.THostPort nodeMonitorAddress) throws org.apache.thrift.TException\n    {\n      getTask_args args = new getTask_args();\n      args.setRequestId(requestId);\n      args.setNodeMonitorAddress(nodeMonitorAddress);\n      sendBase(\"getTask\", args);\n    }\n\n    public List<edu.berkeley.sparrow.thrift.TTaskLaunchSpec> recv_getTask() throws org.apache.thrift.TException\n    {\n      getTask_result result = new getTask_result();\n      receiveBase(result, \"getTask\");\n      if (result.isSetSuccess()) {\n        return result.success;\n      }\n      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, \"getTask failed: unknown result\");\n    }\n\n  }\n  public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface {\n    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {\n      private org.apache.thrift.async.TAsyncClientManager clientManager;\n      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;\n      public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {\n        this.clientManager = clientManager;\n        this.protocolFactory = protocolFactory;\n      }\n      public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {\n        return new AsyncClient(protocolFactory, clientManager, transport);\n      }\n    }\n\n    public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {\n      super(protocolFactory, clientManager, transport);\n    }\n\n    public void getTask(String requestId, edu.berkeley.sparrow.thrift.THostPort nodeMonitorAddress, org.apache.thrift.async.AsyncMethodCallback<getTask_call> resultHandler) throws org.apache.thrift.TException {\n      checkReady();\n      getTask_call method_call = new getTask_call(requestId, nodeMonitorAddress, resultHandler, this, ___protocolFactory, ___transport);\n      this.___currentMethod = method_call;\n      ___manager.call(method_call);\n    }\n\n    public static class getTask_call extends org.apache.thrift.async.TAsyncMethodCall {\n      private String requestId;\n      private edu.berkeley.sparrow.thrift.THostPort nodeMonitorAddress;\n      public getTask_call(String requestId, edu.berkeley.sparrow.thrift.THostPort nodeMonitorAddress, org.apache.thrift.async.AsyncMethodCallback<getTask_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {\n        super(client, protocolFactory, transport, resultHandler, false);\n        this.requestId = requestId;\n        this.nodeMonitorAddress = nodeMonitorAddress;\n      }\n\n      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {\n        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage(\"getTask\", org.apache.thrift.protocol.TMessageType.CALL, 0));\n        getTask_args args = new getTask_args();\n        args.setRequestId(requestId);\n        args.setNodeMonitorAddress(nodeMonitorAddress);\n        args.write(prot);\n        prot.writeMessageEnd();\n      }\n\n      public List<edu.berkeley.sparrow.thrift.TTaskLaunchSpec> getResult() throws org.apache.thrift.TException {\n        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {\n          throw new IllegalStateException(\"Method call not finished!\");\n        }\n        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());\n        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);\n        return (new Client(prot)).recv_getTask();\n      }\n    }\n\n  }\n\n  public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor {\n    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());\n    public Processor(I iface) {\n      super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));\n    }\n\n    protected Processor(I iface, Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {\n      super(iface, getProcessMap(processMap));\n    }\n\n    private static <I extends Iface> Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> getProcessMap(Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {\n      processMap.put(\"getTask\", new getTask());\n      return processMap;\n    }\n\n    private static class getTask<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getTask_args> {\n      public getTask() {\n        super(\"getTask\");\n      }\n\n      protected getTask_args getEmptyArgsInstance() {\n        return new getTask_args();\n      }\n\n      protected getTask_result getResult(I iface, getTask_args args) throws org.apache.thrift.TException {\n        getTask_result result = new getTask_result();\n        result.success = iface.getTask(args.requestId, args.nodeMonitorAddress);\n        return result;\n      }\n    }\n\n  }\n\n  public static class getTask_args implements org.apache.thrift.TBase<getTask_args, getTask_args._Fields>, java.io.Serializable, Cloneable   {\n    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct(\"getTask_args\");\n\n    private static final org.apache.thrift.protocol.TField REQUEST_ID_FIELD_DESC = new org.apache.thrift.protocol.TField(\"requestId\", org.apache.thrift.protocol.TType.STRING, (short)1);\n    private static final org.apache.thrift.protocol.TField NODE_MONITOR_ADDRESS_FIELD_DESC = new org.apache.thrift.protocol.TField(\"nodeMonitorAddress\", org.apache.thrift.protocol.TType.STRUCT, (short)2);\n\n    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();\n    static {\n      schemes.put(StandardScheme.class, new getTask_argsStandardSchemeFactory());\n      schemes.put(TupleScheme.class, new getTask_argsTupleSchemeFactory());\n    }\n\n    public String requestId; // required\n    public edu.berkeley.sparrow.thrift.THostPort nodeMonitorAddress; // required\n\n    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */\n    public enum _Fields implements org.apache.thrift.TFieldIdEnum {\n      REQUEST_ID((short)1, \"requestId\"),\n      NODE_MONITOR_ADDRESS((short)2, \"nodeMonitorAddress\");\n\n      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();\n\n      static {\n        for (_Fields field : EnumSet.allOf(_Fields.class)) {\n          byName.put(field.getFieldName(), field);\n        }\n      }\n\n      /**\n       * Find the _Fields constant that matches fieldId, or null if its not found.\n       */\n      public static _Fields findByThriftId(int fieldId) {\n        switch(fieldId) {\n          case 1: // REQUEST_ID\n            return REQUEST_ID;\n          case 2: // NODE_MONITOR_ADDRESS\n            return NODE_MONITOR_ADDRESS;\n          default:\n            return null;\n        }\n      }\n\n      /**\n       * Find the _Fields constant that matches fieldId, throwing an exception\n       * if it is not found.\n       */\n      public static _Fields findByThriftIdOrThrow(int fieldId) {\n        _Fields fields = findByThriftId(fieldId);\n        if (fields == null) throw new IllegalArgumentException(\"Field \" + fieldId + \" doesn't exist!\");\n        return fields;\n      }\n\n      /**\n       * Find the _Fields constant that matches name, or null if its not found.\n       */\n      public static _Fields findByName(String name) {\n        return byName.get(name);\n      }\n\n      private final short _thriftId;\n      private final String _fieldName;\n\n      _Fields(short thriftId, String fieldName) {\n        _thriftId = thriftId;\n        _fieldName = fieldName;\n      }\n\n      public short getThriftFieldId() {\n        return _thriftId;\n      }\n\n      public String getFieldName() {\n        return _fieldName;\n      }\n    }\n\n    // isset id assignments\n    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;\n    static {\n      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);\n      tmpMap.put(_Fields.REQUEST_ID, new org.apache.thrift.meta_data.FieldMetaData(\"requestId\", org.apache.thrift.TFieldRequirementType.DEFAULT, \n          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));\n      tmpMap.put(_Fields.NODE_MONITOR_ADDRESS, new org.apache.thrift.meta_data.FieldMetaData(\"nodeMonitorAddress\", org.apache.thrift.TFieldRequirementType.DEFAULT, \n          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, edu.berkeley.sparrow.thrift.THostPort.class)));\n      metaDataMap = Collections.unmodifiableMap(tmpMap);\n      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getTask_args.class, metaDataMap);\n    }\n\n    public getTask_args() {\n    }\n\n    public getTask_args(\n      String requestId,\n      edu.berkeley.sparrow.thrift.THostPort nodeMonitorAddress)\n    {\n      this();\n      this.requestId = requestId;\n      this.nodeMonitorAddress = nodeMonitorAddress;\n    }\n\n    /**\n     * Performs a deep copy on <i>other</i>.\n     */\n    public getTask_args(getTask_args other) {\n      if (other.isSetRequestId()) {\n        this.requestId = other.requestId;\n      }\n      if (other.isSetNodeMonitorAddress()) {\n        this.nodeMonitorAddress = new edu.berkeley.sparrow.thrift.THostPort(other.nodeMonitorAddress);\n      }\n    }\n\n    public getTask_args deepCopy() {\n      return new getTask_args(this);\n    }\n\n    public void clear() {\n      this.requestId = null;\n      this.nodeMonitorAddress = null;\n    }\n\n    public String getRequestId() {\n      return this.requestId;\n    }\n\n    public getTask_args setRequestId(String requestId) {\n      this.requestId = requestId;\n      return this;\n    }\n\n    public void unsetRequestId() {\n      this.requestId = null;\n    }\n\n    /** Returns true if field requestId is set (has been assigned a value) and false otherwise */\n    public boolean isSetRequestId() {\n      return this.requestId != null;\n    }\n\n    public void setRequestIdIsSet(boolean value) {\n      if (!value) {\n        this.requestId = null;\n      }\n    }\n\n    public edu.berkeley.sparrow.thrift.THostPort getNodeMonitorAddress() {\n      return this.nodeMonitorAddress;\n    }\n\n    public getTask_args setNodeMonitorAddress(edu.berkeley.sparrow.thrift.THostPort nodeMonitorAddress) {\n      this.nodeMonitorAddress = nodeMonitorAddress;\n      return this;\n    }\n\n    public void unsetNodeMonitorAddress() {\n      this.nodeMonitorAddress = null;\n    }\n\n    /** Returns true if field nodeMonitorAddress is set (has been assigned a value) and false otherwise */\n    public boolean isSetNodeMonitorAddress() {\n      return this.nodeMonitorAddress != null;\n    }\n\n    public void setNodeMonitorAddressIsSet(boolean value) {\n      if (!value) {\n        this.nodeMonitorAddress = null;\n      }\n    }\n\n    public void setFieldValue(_Fields field, Object value) {\n      switch (field) {\n      case REQUEST_ID:\n        if (value == null) {\n          unsetRequestId();\n        } else {\n          setRequestId((String)value);\n        }\n        break;\n\n      case NODE_MONITOR_ADDRESS:\n        if (value == null) {\n          unsetNodeMonitorAddress();\n        } else {\n          setNodeMonitorAddress((edu.berkeley.sparrow.thrift.THostPort)value);\n        }\n        break;\n\n      }\n    }\n\n    public Object getFieldValue(_Fields field) {\n      switch (field) {\n      case REQUEST_ID:\n        return getRequestId();\n\n      case NODE_MONITOR_ADDRESS:\n        return getNodeMonitorAddress();\n\n      }\n      throw new IllegalStateException();\n    }\n\n    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */\n    public boolean isSet(_Fields field) {\n      if (field == null) {\n        throw new IllegalArgumentException();\n      }\n\n      switch (field) {\n      case REQUEST_ID:\n        return isSetRequestId();\n      case NODE_MONITOR_ADDRESS:\n        return isSetNodeMonitorAddress();\n      }\n      throw new IllegalStateException();\n    }\n\n    @Override\n    public boolean equals(Object that) {\n      if (that == null)\n        return false;\n      if (that instanceof getTask_args)\n        return this.equals((getTask_args)that);\n      return false;\n    }\n\n    public boolean equals(getTask_args that) {\n      if (that == null)\n        return false;\n\n      boolean this_present_requestId = true && this.isSetRequestId();\n      boolean that_present_requestId = true && that.isSetRequestId();\n      if (this_present_requestId || that_present_requestId) {\n        if (!(this_present_requestId && that_present_requestId))\n          return false;\n        if (!this.requestId.equals(that.requestId))\n          return false;\n      }\n\n      boolean this_present_nodeMonitorAddress = true && this.isSetNodeMonitorAddress();\n      boolean that_present_nodeMonitorAddress = true && that.isSetNodeMonitorAddress();\n      if (this_present_nodeMonitorAddress || that_present_nodeMonitorAddress) {\n        if (!(this_present_nodeMonitorAddress && that_present_nodeMonitorAddress))\n          return false;\n        if (!this.nodeMonitorAddress.equals(that.nodeMonitorAddress))\n          return false;\n      }\n\n      return true;\n    }\n\n    @Override\n    public int hashCode() {\n      return 0;\n    }\n\n    public int compareTo(getTask_args other) {\n      if (!getClass().equals(other.getClass())) {\n        return getClass().getName().compareTo(other.getClass().getName());\n      }\n\n      int lastComparison = 0;\n      getTask_args typedOther = (getTask_args)other;\n\n      lastComparison = Boolean.valueOf(isSetRequestId()).compareTo(typedOther.isSetRequestId());\n      if (lastComparison != 0) {\n        return lastComparison;\n      }\n      if (isSetRequestId()) {\n        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.requestId, typedOther.requestId);\n        if (lastComparison != 0) {\n          return lastComparison;\n        }\n      }\n      lastComparison = Boolean.valueOf(isSetNodeMonitorAddress()).compareTo(typedOther.isSetNodeMonitorAddress());\n      if (lastComparison != 0) {\n        return lastComparison;\n      }\n      if (isSetNodeMonitorAddress()) {\n        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nodeMonitorAddress, typedOther.nodeMonitorAddress);\n        if (lastComparison != 0) {\n          return lastComparison;\n        }\n      }\n      return 0;\n    }\n\n    public _Fields fieldForId(int fieldId) {\n      return _Fields.findByThriftId(fieldId);\n    }\n\n    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {\n      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);\n    }\n\n    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {\n      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);\n    }\n\n    @Override\n    public String toString() {\n      StringBuilder sb = new StringBuilder(\"getTask_args(\");\n      boolean first = true;\n\n      sb.append(\"requestId:\");\n      if (this.requestId == null) {\n        sb.append(\"null\");\n      } else {\n        sb.append(this.requestId);\n      }\n      first = false;\n      if (!first) sb.append(\", \");\n      sb.append(\"nodeMonitorAddress:\");\n      if (this.nodeMonitorAddress == null) {\n        sb.append(\"null\");\n      } else {\n        sb.append(this.nodeMonitorAddress);\n      }\n      first = false;\n      sb.append(\")\");\n      return sb.toString();\n    }\n\n    public void validate() throws org.apache.thrift.TException {\n      // check for required fields\n    }\n\n    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {\n      try {\n        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));\n      } catch (org.apache.thrift.TException te) {\n        throw new java.io.IOException(te.getMessage());\n      }\n    }\n\n    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {\n      try {\n        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));\n      } catch (org.apache.thrift.TException te) {\n        throw new java.io.IOException(te.getMessage());\n      }\n    }\n\n    private static class getTask_argsStandardSchemeFactory implements SchemeFactory {\n      public getTask_argsStandardScheme getScheme() {\n        return new getTask_argsStandardScheme();\n      }\n    }\n\n    private static class getTask_argsStandardScheme extends StandardScheme<getTask_args> {\n\n      public void read(org.apache.thrift.protocol.TProtocol iprot, getTask_args struct) throws org.apache.thrift.TException {\n        org.apache.thrift.protocol.TField schemeField;\n        iprot.readStructBegin();\n        while (true)\n        {\n          schemeField = iprot.readFieldBegin();\n          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { \n            break;\n          }\n          switch (schemeField.id) {\n            case 1: // REQUEST_ID\n              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {\n                struct.requestId = iprot.readString();\n                struct.setRequestIdIsSet(true);\n              } else { \n                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n              }\n              break;\n            case 2: // NODE_MONITOR_ADDRESS\n              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {\n                struct.nodeMonitorAddress = new edu.berkeley.sparrow.thrift.THostPort();\n                struct.nodeMonitorAddress.read(iprot);\n                struct.setNodeMonitorAddressIsSet(true);\n              } else { \n                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n              }\n              break;\n            default:\n              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n          }\n          iprot.readFieldEnd();\n        }\n        iprot.readStructEnd();\n\n        // check for required fields of primitive type, which can't be checked in the validate method\n        struct.validate();\n      }\n\n      public void write(org.apache.thrift.protocol.TProtocol oprot, getTask_args struct) throws org.apache.thrift.TException {\n        struct.validate();\n\n        oprot.writeStructBegin(STRUCT_DESC);\n        if (struct.requestId != null) {\n          oprot.writeFieldBegin(REQUEST_ID_FIELD_DESC);\n          oprot.writeString(struct.requestId);\n          oprot.writeFieldEnd();\n        }\n        if (struct.nodeMonitorAddress != null) {\n          oprot.writeFieldBegin(NODE_MONITOR_ADDRESS_FIELD_DESC);\n          struct.nodeMonitorAddress.write(oprot);\n          oprot.writeFieldEnd();\n        }\n        oprot.writeFieldStop();\n        oprot.writeStructEnd();\n      }\n\n    }\n\n    private static class getTask_argsTupleSchemeFactory implements SchemeFactory {\n      public getTask_argsTupleScheme getScheme() {\n        return new getTask_argsTupleScheme();\n      }\n    }\n\n    private static class getTask_argsTupleScheme extends TupleScheme<getTask_args> {\n\n      @Override\n      public void write(org.apache.thrift.protocol.TProtocol prot, getTask_args struct) throws org.apache.thrift.TException {\n        TTupleProtocol oprot = (TTupleProtocol) prot;\n        BitSet optionals = new BitSet();\n        if (struct.isSetRequestId()) {\n          optionals.set(0);\n        }\n        if (struct.isSetNodeMonitorAddress()) {\n          optionals.set(1);\n        }\n        oprot.writeBitSet(optionals, 2);\n        if (struct.isSetRequestId()) {\n          oprot.writeString(struct.requestId);\n        }\n        if (struct.isSetNodeMonitorAddress()) {\n          struct.nodeMonitorAddress.write(oprot);\n        }\n      }\n\n      @Override\n      public void read(org.apache.thrift.protocol.TProtocol prot, getTask_args struct) throws org.apache.thrift.TException {\n        TTupleProtocol iprot = (TTupleProtocol) prot;\n        BitSet incoming = iprot.readBitSet(2);\n        if (incoming.get(0)) {\n          struct.requestId = iprot.readString();\n          struct.setRequestIdIsSet(true);\n        }\n        if (incoming.get(1)) {\n          struct.nodeMonitorAddress = new edu.berkeley.sparrow.thrift.THostPort();\n          struct.nodeMonitorAddress.read(iprot);\n          struct.setNodeMonitorAddressIsSet(true);\n        }\n      }\n    }\n\n  }\n\n  public static class getTask_result implements org.apache.thrift.TBase<getTask_result, getTask_result._Fields>, java.io.Serializable, Cloneable   {\n    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct(\"getTask_result\");\n\n    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField(\"success\", org.apache.thrift.protocol.TType.LIST, (short)0);\n\n    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();\n    static {\n      schemes.put(StandardScheme.class, new getTask_resultStandardSchemeFactory());\n      schemes.put(TupleScheme.class, new getTask_resultTupleSchemeFactory());\n    }\n\n    public List<edu.berkeley.sparrow.thrift.TTaskLaunchSpec> success; // required\n\n    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */\n    public enum _Fields implements org.apache.thrift.TFieldIdEnum {\n      SUCCESS((short)0, \"success\");\n\n      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();\n\n      static {\n        for (_Fields field : EnumSet.allOf(_Fields.class)) {\n          byName.put(field.getFieldName(), field);\n        }\n      }\n\n      /**\n       * Find the _Fields constant that matches fieldId, or null if its not found.\n       */\n      public static _Fields findByThriftId(int fieldId) {\n        switch(fieldId) {\n          case 0: // SUCCESS\n            return SUCCESS;\n          default:\n            return null;\n        }\n      }\n\n      /**\n       * Find the _Fields constant that matches fieldId, throwing an exception\n       * if it is not found.\n       */\n      public static _Fields findByThriftIdOrThrow(int fieldId) {\n        _Fields fields = findByThriftId(fieldId);\n        if (fields == null) throw new IllegalArgumentException(\"Field \" + fieldId + \" doesn't exist!\");\n        return fields;\n      }\n\n      /**\n       * Find the _Fields constant that matches name, or null if its not found.\n       */\n      public static _Fields findByName(String name) {\n        return byName.get(name);\n      }\n\n      private final short _thriftId;\n      private final String _fieldName;\n\n      _Fields(short thriftId, String fieldName) {\n        _thriftId = thriftId;\n        _fieldName = fieldName;\n      }\n\n      public short getThriftFieldId() {\n        return _thriftId;\n      }\n\n      public String getFieldName() {\n        return _fieldName;\n      }\n    }\n\n    // isset id assignments\n    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;\n    static {\n      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);\n      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData(\"success\", org.apache.thrift.TFieldRequirementType.DEFAULT, \n          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, \n              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, edu.berkeley.sparrow.thrift.TTaskLaunchSpec.class))));\n      metaDataMap = Collections.unmodifiableMap(tmpMap);\n      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getTask_result.class, metaDataMap);\n    }\n\n    public getTask_result() {\n    }\n\n    public getTask_result(\n      List<edu.berkeley.sparrow.thrift.TTaskLaunchSpec> success)\n    {\n      this();\n      this.success = success;\n    }\n\n    /**\n     * Performs a deep copy on <i>other</i>.\n     */\n    public getTask_result(getTask_result other) {\n      if (other.isSetSuccess()) {\n        List<edu.berkeley.sparrow.thrift.TTaskLaunchSpec> __this__success = new ArrayList<edu.berkeley.sparrow.thrift.TTaskLaunchSpec>();\n        for (edu.berkeley.sparrow.thrift.TTaskLaunchSpec other_element : other.success) {\n          __this__success.add(new edu.berkeley.sparrow.thrift.TTaskLaunchSpec(other_element));\n        }\n        this.success = __this__success;\n      }\n    }\n\n    public getTask_result deepCopy() {\n      return new getTask_result(this);\n    }\n\n    public void clear() {\n      this.success = null;\n    }\n\n    public int getSuccessSize() {\n      return (this.success == null) ? 0 : this.success.size();\n    }\n\n    public java.util.Iterator<edu.berkeley.sparrow.thrift.TTaskLaunchSpec> getSuccessIterator() {\n      return (this.success == null) ? null : this.success.iterator();\n    }\n\n    public void addToSuccess(edu.berkeley.sparrow.thrift.TTaskLaunchSpec elem) {\n      if (this.success == null) {\n        this.success = new ArrayList<edu.berkeley.sparrow.thrift.TTaskLaunchSpec>();\n      }\n      this.success.add(elem);\n    }\n\n    public List<edu.berkeley.sparrow.thrift.TTaskLaunchSpec> getSuccess() {\n      return this.success;\n    }\n\n    public getTask_result setSuccess(List<edu.berkeley.sparrow.thrift.TTaskLaunchSpec> success) {\n      this.success = success;\n      return this;\n    }\n\n    public void unsetSuccess() {\n      this.success = null;\n    }\n\n    /** Returns true if field success is set (has been assigned a value) and false otherwise */\n    public boolean isSetSuccess() {\n      return this.success != null;\n    }\n\n    public void setSuccessIsSet(boolean value) {\n      if (!value) {\n        this.success = null;\n      }\n    }\n\n    public void setFieldValue(_Fields field, Object value) {\n      switch (field) {\n      case SUCCESS:\n        if (value == null) {\n          unsetSuccess();\n        } else {\n          setSuccess((List<edu.berkeley.sparrow.thrift.TTaskLaunchSpec>)value);\n        }\n        break;\n\n      }\n    }\n\n    public Object getFieldValue(_Fields field) {\n      switch (field) {\n      case SUCCESS:\n        return getSuccess();\n\n      }\n      throw new IllegalStateException();\n    }\n\n    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */\n    public boolean isSet(_Fields field) {\n      if (field == null) {\n        throw new IllegalArgumentException();\n      }\n\n      switch (field) {\n      case SUCCESS:\n        return isSetSuccess();\n      }\n      throw new IllegalStateException();\n    }\n\n    @Override\n    public boolean equals(Object that) {\n      if (that == null)\n        return false;\n      if (that instanceof getTask_result)\n        return this.equals((getTask_result)that);\n      return false;\n    }\n\n    public boolean equals(getTask_result that) {\n      if (that == null)\n        return false;\n\n      boolean this_present_success = true && this.isSetSuccess();\n      boolean that_present_success = true && that.isSetSuccess();\n      if (this_present_success || that_present_success) {\n        if (!(this_present_success && that_present_success))\n          return false;\n        if (!this.success.equals(that.success))\n          return false;\n      }\n\n      return true;\n    }\n\n    @Override\n    public int hashCode() {\n      return 0;\n    }\n\n    public int compareTo(getTask_result other) {\n      if (!getClass().equals(other.getClass())) {\n        return getClass().getName().compareTo(other.getClass().getName());\n      }\n\n      int lastComparison = 0;\n      getTask_result typedOther = (getTask_result)other;\n\n      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());\n      if (lastComparison != 0) {\n        return lastComparison;\n      }\n      if (isSetSuccess()) {\n        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);\n        if (lastComparison != 0) {\n          return lastComparison;\n        }\n      }\n      return 0;\n    }\n\n    public _Fields fieldForId(int fieldId) {\n      return _Fields.findByThriftId(fieldId);\n    }\n\n    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {\n      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);\n    }\n\n    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {\n      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);\n      }\n\n    @Override\n    public String toString() {\n      StringBuilder sb = new StringBuilder(\"getTask_result(\");\n      boolean first = true;\n\n      sb.append(\"success:\");\n      if (this.success == null) {\n        sb.append(\"null\");\n      } else {\n        sb.append(this.success);\n      }\n      first = false;\n      sb.append(\")\");\n      return sb.toString();\n    }\n\n    public void validate() throws org.apache.thrift.TException {\n      // check for required fields\n    }\n\n    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {\n      try {\n        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));\n      } catch (org.apache.thrift.TException te) {\n        throw new java.io.IOException(te.getMessage());\n      }\n    }\n\n    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {\n      try {\n        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));\n      } catch (org.apache.thrift.TException te) {\n        throw new java.io.IOException(te.getMessage());\n      }\n    }\n\n    private static class getTask_resultStandardSchemeFactory implements SchemeFactory {\n      public getTask_resultStandardScheme getScheme() {\n        return new getTask_resultStandardScheme();\n      }\n    }\n\n    private static class getTask_resultStandardScheme extends StandardScheme<getTask_result> {\n\n      public void read(org.apache.thrift.protocol.TProtocol iprot, getTask_result struct) throws org.apache.thrift.TException {\n        org.apache.thrift.protocol.TField schemeField;\n        iprot.readStructBegin();\n        while (true)\n        {\n          schemeField = iprot.readFieldBegin();\n          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { \n            break;\n          }\n          switch (schemeField.id) {\n            case 0: // SUCCESS\n              if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {\n                {\n                  org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();\n                  struct.success = new ArrayList<edu.berkeley.sparrow.thrift.TTaskLaunchSpec>(_list0.size);\n                  for (int _i1 = 0; _i1 < _list0.size; ++_i1)\n                  {\n                    edu.berkeley.sparrow.thrift.TTaskLaunchSpec _elem2; // required\n                    _elem2 = new edu.berkeley.sparrow.thrift.TTaskLaunchSpec();\n                    _elem2.read(iprot);\n                    struct.success.add(_elem2);\n                  }\n                  iprot.readListEnd();\n                }\n                struct.setSuccessIsSet(true);\n              } else { \n                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n              }\n              break;\n            default:\n              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n          }\n          iprot.readFieldEnd();\n        }\n        iprot.readStructEnd();\n\n        // check for required fields of primitive type, which can't be checked in the validate method\n        struct.validate();\n      }\n\n      public void write(org.apache.thrift.protocol.TProtocol oprot, getTask_result struct) throws org.apache.thrift.TException {\n        struct.validate();\n\n        oprot.writeStructBegin(STRUCT_DESC);\n        if (struct.success != null) {\n          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);\n          {\n            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));\n            for (edu.berkeley.sparrow.thrift.TTaskLaunchSpec _iter3 : struct.success)\n            {\n              _iter3.write(oprot);\n            }\n            oprot.writeListEnd();\n          }\n          oprot.writeFieldEnd();\n        }\n        oprot.writeFieldStop();\n        oprot.writeStructEnd();\n      }\n\n    }\n\n    private static class getTask_resultTupleSchemeFactory implements SchemeFactory {\n      public getTask_resultTupleScheme getScheme() {\n        return new getTask_resultTupleScheme();\n      }\n    }\n\n    private static class getTask_resultTupleScheme extends TupleScheme<getTask_result> {\n\n      @Override\n      public void write(org.apache.thrift.protocol.TProtocol prot, getTask_result struct) throws org.apache.thrift.TException {\n        TTupleProtocol oprot = (TTupleProtocol) prot;\n        BitSet optionals = new BitSet();\n        if (struct.isSetSuccess()) {\n          optionals.set(0);\n        }\n        oprot.writeBitSet(optionals, 1);\n        if (struct.isSetSuccess()) {\n          {\n            oprot.writeI32(struct.success.size());\n            for (edu.berkeley.sparrow.thrift.TTaskLaunchSpec _iter4 : struct.success)\n            {\n              _iter4.write(oprot);\n            }\n          }\n        }\n      }\n\n      @Override\n      public void read(org.apache.thrift.protocol.TProtocol prot, getTask_result struct) throws org.apache.thrift.TException {\n        TTupleProtocol iprot = (TTupleProtocol) prot;\n        BitSet incoming = iprot.readBitSet(1);\n        if (incoming.get(0)) {\n          {\n            org.apache.thrift.protocol.TList _list5 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());\n            struct.success = new ArrayList<edu.berkeley.sparrow.thrift.TTaskLaunchSpec>(_list5.size);\n            for (int _i6 = 0; _i6 < _list5.size; ++_i6)\n            {\n              edu.berkeley.sparrow.thrift.TTaskLaunchSpec _elem7; // required\n              _elem7 = new edu.berkeley.sparrow.thrift.TTaskLaunchSpec();\n              _elem7.read(iprot);\n              struct.success.add(_elem7);\n            }\n          }\n          struct.setSuccessIsSet(true);\n        }\n      }\n    }\n\n  }\n\n}\n"
  },
  {
    "path": "src/main/gen-java/edu/berkeley/sparrow/thrift/IncompleteRequestException.java",
    "content": "/**\n * Autogenerated by Thrift Compiler (0.8.0)\n *\n * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING\n *  @generated\n */\npackage edu.berkeley.sparrow.thrift;\n\nimport org.apache.thrift.scheme.IScheme;\nimport org.apache.thrift.scheme.SchemeFactory;\nimport org.apache.thrift.scheme.StandardScheme;\n\nimport org.apache.thrift.scheme.TupleScheme;\nimport org.apache.thrift.protocol.TTupleProtocol;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.util.HashMap;\nimport java.util.EnumMap;\nimport java.util.Set;\nimport java.util.HashSet;\nimport java.util.EnumSet;\nimport java.util.Collections;\nimport java.util.BitSet;\nimport java.nio.ByteBuffer;\nimport java.util.Arrays;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\npublic class IncompleteRequestException extends Exception implements org.apache.thrift.TBase<IncompleteRequestException, IncompleteRequestException._Fields>, java.io.Serializable, Cloneable {\n  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct(\"IncompleteRequestException\");\n\n  private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField(\"message\", org.apache.thrift.protocol.TType.STRING, (short)1);\n\n  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();\n  static {\n    schemes.put(StandardScheme.class, new IncompleteRequestExceptionStandardSchemeFactory());\n    schemes.put(TupleScheme.class, new IncompleteRequestExceptionTupleSchemeFactory());\n  }\n\n  public String message; // required\n\n  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */\n  public enum _Fields implements org.apache.thrift.TFieldIdEnum {\n    MESSAGE((short)1, \"message\");\n\n    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();\n\n    static {\n      for (_Fields field : EnumSet.allOf(_Fields.class)) {\n        byName.put(field.getFieldName(), field);\n      }\n    }\n\n    /**\n     * Find the _Fields constant that matches fieldId, or null if its not found.\n     */\n    public static _Fields findByThriftId(int fieldId) {\n      switch(fieldId) {\n        case 1: // MESSAGE\n          return MESSAGE;\n        default:\n          return null;\n      }\n    }\n\n    /**\n     * Find the _Fields constant that matches fieldId, throwing an exception\n     * if it is not found.\n     */\n    public static _Fields findByThriftIdOrThrow(int fieldId) {\n      _Fields fields = findByThriftId(fieldId);\n      if (fields == null) throw new IllegalArgumentException(\"Field \" + fieldId + \" doesn't exist!\");\n      return fields;\n    }\n\n    /**\n     * Find the _Fields constant that matches name, or null if its not found.\n     */\n    public static _Fields findByName(String name) {\n      return byName.get(name);\n    }\n\n    private final short _thriftId;\n    private final String _fieldName;\n\n    _Fields(short thriftId, String fieldName) {\n      _thriftId = thriftId;\n      _fieldName = fieldName;\n    }\n\n    public short getThriftFieldId() {\n      return _thriftId;\n    }\n\n    public String getFieldName() {\n      return _fieldName;\n    }\n  }\n\n  // isset id assignments\n  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;\n  static {\n    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);\n    tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData(\"message\", org.apache.thrift.TFieldRequirementType.DEFAULT, \n        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));\n    metaDataMap = Collections.unmodifiableMap(tmpMap);\n    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(IncompleteRequestException.class, metaDataMap);\n  }\n\n  public IncompleteRequestException() {\n  }\n\n  public IncompleteRequestException(\n    String message)\n  {\n    this();\n    this.message = message;\n  }\n\n  /**\n   * Performs a deep copy on <i>other</i>.\n   */\n  public IncompleteRequestException(IncompleteRequestException other) {\n    if (other.isSetMessage()) {\n      this.message = other.message;\n    }\n  }\n\n  public IncompleteRequestException deepCopy() {\n    return new IncompleteRequestException(this);\n  }\n\n  public void clear() {\n    this.message = null;\n  }\n\n  public String getMessage() {\n    return this.message;\n  }\n\n  public IncompleteRequestException setMessage(String message) {\n    this.message = message;\n    return this;\n  }\n\n  public void unsetMessage() {\n    this.message = null;\n  }\n\n  /** Returns true if field message is set (has been assigned a value) and false otherwise */\n  public boolean isSetMessage() {\n    return this.message != null;\n  }\n\n  public void setMessageIsSet(boolean value) {\n    if (!value) {\n      this.message = null;\n    }\n  }\n\n  public void setFieldValue(_Fields field, Object value) {\n    switch (field) {\n    case MESSAGE:\n      if (value == null) {\n        unsetMessage();\n      } else {\n        setMessage((String)value);\n      }\n      break;\n\n    }\n  }\n\n  public Object getFieldValue(_Fields field) {\n    switch (field) {\n    case MESSAGE:\n      return getMessage();\n\n    }\n    throw new IllegalStateException();\n  }\n\n  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */\n  public boolean isSet(_Fields field) {\n    if (field == null) {\n      throw new IllegalArgumentException();\n    }\n\n    switch (field) {\n    case MESSAGE:\n      return isSetMessage();\n    }\n    throw new IllegalStateException();\n  }\n\n  @Override\n  public boolean equals(Object that) {\n    if (that == null)\n      return false;\n    if (that instanceof IncompleteRequestException)\n      return this.equals((IncompleteRequestException)that);\n    return false;\n  }\n\n  public boolean equals(IncompleteRequestException that) {\n    if (that == null)\n      return false;\n\n    boolean this_present_message = true && this.isSetMessage();\n    boolean that_present_message = true && that.isSetMessage();\n    if (this_present_message || that_present_message) {\n      if (!(this_present_message && that_present_message))\n        return false;\n      if (!this.message.equals(that.message))\n        return false;\n    }\n\n    return true;\n  }\n\n  @Override\n  public int hashCode() {\n    return 0;\n  }\n\n  public int compareTo(IncompleteRequestException other) {\n    if (!getClass().equals(other.getClass())) {\n      return getClass().getName().compareTo(other.getClass().getName());\n    }\n\n    int lastComparison = 0;\n    IncompleteRequestException typedOther = (IncompleteRequestException)other;\n\n    lastComparison = Boolean.valueOf(isSetMessage()).compareTo(typedOther.isSetMessage());\n    if (lastComparison != 0) {\n      return lastComparison;\n    }\n    if (isSetMessage()) {\n      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, typedOther.message);\n      if (lastComparison != 0) {\n        return lastComparison;\n      }\n    }\n    return 0;\n  }\n\n  public _Fields fieldForId(int fieldId) {\n    return _Fields.findByThriftId(fieldId);\n  }\n\n  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {\n    schemes.get(iprot.getScheme()).getScheme().read(iprot, this);\n  }\n\n  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {\n    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);\n  }\n\n  @Override\n  public String toString() {\n    StringBuilder sb = new StringBuilder(\"IncompleteRequestException(\");\n    boolean first = true;\n\n    sb.append(\"message:\");\n    if (this.message == null) {\n      sb.append(\"null\");\n    } else {\n      sb.append(this.message);\n    }\n    first = false;\n    sb.append(\")\");\n    return sb.toString();\n  }\n\n  public void validate() throws org.apache.thrift.TException {\n    // check for required fields\n  }\n\n  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {\n    try {\n      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));\n    } catch (org.apache.thrift.TException te) {\n      throw new java.io.IOException(te.getMessage());\n    }\n  }\n\n  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {\n    try {\n      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));\n    } catch (org.apache.thrift.TException te) {\n      throw new java.io.IOException(te.getMessage());\n    }\n  }\n\n  private static class IncompleteRequestExceptionStandardSchemeFactory implements SchemeFactory {\n    public IncompleteRequestExceptionStandardScheme getScheme() {\n      return new IncompleteRequestExceptionStandardScheme();\n    }\n  }\n\n  private static class IncompleteRequestExceptionStandardScheme extends StandardScheme<IncompleteRequestException> {\n\n    public void read(org.apache.thrift.protocol.TProtocol iprot, IncompleteRequestException struct) throws org.apache.thrift.TException {\n      org.apache.thrift.protocol.TField schemeField;\n      iprot.readStructBegin();\n      while (true)\n      {\n        schemeField = iprot.readFieldBegin();\n        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { \n          break;\n        }\n        switch (schemeField.id) {\n          case 1: // MESSAGE\n            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {\n              struct.message = iprot.readString();\n              struct.setMessageIsSet(true);\n            } else { \n              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n            }\n            break;\n          default:\n            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n        }\n        iprot.readFieldEnd();\n      }\n      iprot.readStructEnd();\n\n      // check for required fields of primitive type, which can't be checked in the validate method\n      struct.validate();\n    }\n\n    public void write(org.apache.thrift.protocol.TProtocol oprot, IncompleteRequestException struct) throws org.apache.thrift.TException {\n      struct.validate();\n\n      oprot.writeStructBegin(STRUCT_DESC);\n      if (struct.message != null) {\n        oprot.writeFieldBegin(MESSAGE_FIELD_DESC);\n        oprot.writeString(struct.message);\n        oprot.writeFieldEnd();\n      }\n      oprot.writeFieldStop();\n      oprot.writeStructEnd();\n    }\n\n  }\n\n  private static class IncompleteRequestExceptionTupleSchemeFactory implements SchemeFactory {\n    public IncompleteRequestExceptionTupleScheme getScheme() {\n      return new IncompleteRequestExceptionTupleScheme();\n    }\n  }\n\n  private static class IncompleteRequestExceptionTupleScheme extends TupleScheme<IncompleteRequestException> {\n\n    @Override\n    public void write(org.apache.thrift.protocol.TProtocol prot, IncompleteRequestException struct) throws org.apache.thrift.TException {\n      TTupleProtocol oprot = (TTupleProtocol) prot;\n      BitSet optionals = new BitSet();\n      if (struct.isSetMessage()) {\n        optionals.set(0);\n      }\n      oprot.writeBitSet(optionals, 1);\n      if (struct.isSetMessage()) {\n        oprot.writeString(struct.message);\n      }\n    }\n\n    @Override\n    public void read(org.apache.thrift.protocol.TProtocol prot, IncompleteRequestException struct) throws org.apache.thrift.TException {\n      TTupleProtocol iprot = (TTupleProtocol) prot;\n      BitSet incoming = iprot.readBitSet(1);\n      if (incoming.get(0)) {\n        struct.message = iprot.readString();\n        struct.setMessageIsSet(true);\n      }\n    }\n  }\n\n}\n\n"
  },
  {
    "path": "src/main/gen-java/edu/berkeley/sparrow/thrift/InternalService.java",
    "content": "/**\n * Autogenerated by Thrift Compiler (0.8.0)\n *\n * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING\n *  @generated\n */\npackage edu.berkeley.sparrow.thrift;\n\nimport org.apache.thrift.scheme.IScheme;\nimport org.apache.thrift.scheme.SchemeFactory;\nimport org.apache.thrift.scheme.StandardScheme;\n\nimport org.apache.thrift.scheme.TupleScheme;\nimport org.apache.thrift.protocol.TTupleProtocol;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.util.HashMap;\nimport java.util.EnumMap;\nimport java.util.Set;\nimport java.util.HashSet;\nimport java.util.EnumSet;\nimport java.util.Collections;\nimport java.util.BitSet;\nimport java.nio.ByteBuffer;\nimport java.util.Arrays;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\npublic class InternalService {\n\n  public interface Iface {\n\n    public boolean enqueueTaskReservations(edu.berkeley.sparrow.thrift.TEnqueueTaskReservationsRequest request) throws org.apache.thrift.TException;\n\n    public void cancelTaskReservations(edu.berkeley.sparrow.thrift.TCancelTaskReservationsRequest request) throws org.apache.thrift.TException;\n\n  }\n\n  public interface AsyncIface {\n\n    public void enqueueTaskReservations(edu.berkeley.sparrow.thrift.TEnqueueTaskReservationsRequest request, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.enqueueTaskReservations_call> resultHandler) throws org.apache.thrift.TException;\n\n    public void cancelTaskReservations(edu.berkeley.sparrow.thrift.TCancelTaskReservationsRequest request, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.cancelTaskReservations_call> resultHandler) throws org.apache.thrift.TException;\n\n  }\n\n  public static class Client extends org.apache.thrift.TServiceClient implements Iface {\n    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {\n      public Factory() {}\n      public Client getClient(org.apache.thrift.protocol.TProtocol prot) {\n        return new Client(prot);\n      }\n      public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {\n        return new Client(iprot, oprot);\n      }\n    }\n\n    public Client(org.apache.thrift.protocol.TProtocol prot)\n    {\n      super(prot, prot);\n    }\n\n    public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {\n      super(iprot, oprot);\n    }\n\n    public boolean enqueueTaskReservations(edu.berkeley.sparrow.thrift.TEnqueueTaskReservationsRequest request) throws org.apache.thrift.TException\n    {\n      send_enqueueTaskReservations(request);\n      return recv_enqueueTaskReservations();\n    }\n\n    public void send_enqueueTaskReservations(edu.berkeley.sparrow.thrift.TEnqueueTaskReservationsRequest request) throws org.apache.thrift.TException\n    {\n      enqueueTaskReservations_args args = new enqueueTaskReservations_args();\n      args.setRequest(request);\n      sendBase(\"enqueueTaskReservations\", args);\n    }\n\n    public boolean recv_enqueueTaskReservations() throws org.apache.thrift.TException\n    {\n      enqueueTaskReservations_result result = new enqueueTaskReservations_result();\n      receiveBase(result, \"enqueueTaskReservations\");\n      if (result.isSetSuccess()) {\n        return result.success;\n      }\n      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, \"enqueueTaskReservations failed: unknown result\");\n    }\n\n    public void cancelTaskReservations(edu.berkeley.sparrow.thrift.TCancelTaskReservationsRequest request) throws org.apache.thrift.TException\n    {\n      send_cancelTaskReservations(request);\n      recv_cancelTaskReservations();\n    }\n\n    public void send_cancelTaskReservations(edu.berkeley.sparrow.thrift.TCancelTaskReservationsRequest request) throws org.apache.thrift.TException\n    {\n      cancelTaskReservations_args args = new cancelTaskReservations_args();\n      args.setRequest(request);\n      sendBase(\"cancelTaskReservations\", args);\n    }\n\n    public void recv_cancelTaskReservations() throws org.apache.thrift.TException\n    {\n      cancelTaskReservations_result result = new cancelTaskReservations_result();\n      receiveBase(result, \"cancelTaskReservations\");\n      return;\n    }\n\n  }\n  public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface {\n    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {\n      private org.apache.thrift.async.TAsyncClientManager clientManager;\n      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;\n      public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {\n        this.clientManager = clientManager;\n        this.protocolFactory = protocolFactory;\n      }\n      public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {\n        return new AsyncClient(protocolFactory, clientManager, transport);\n      }\n    }\n\n    public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {\n      super(protocolFactory, clientManager, transport);\n    }\n\n    public void enqueueTaskReservations(edu.berkeley.sparrow.thrift.TEnqueueTaskReservationsRequest request, org.apache.thrift.async.AsyncMethodCallback<enqueueTaskReservations_call> resultHandler) throws org.apache.thrift.TException {\n      checkReady();\n      enqueueTaskReservations_call method_call = new enqueueTaskReservations_call(request, resultHandler, this, ___protocolFactory, ___transport);\n      this.___currentMethod = method_call;\n      ___manager.call(method_call);\n    }\n\n    public static class enqueueTaskReservations_call extends org.apache.thrift.async.TAsyncMethodCall {\n      private edu.berkeley.sparrow.thrift.TEnqueueTaskReservationsRequest request;\n      public enqueueTaskReservations_call(edu.berkeley.sparrow.thrift.TEnqueueTaskReservationsRequest request, org.apache.thrift.async.AsyncMethodCallback<enqueueTaskReservations_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {\n        super(client, protocolFactory, transport, resultHandler, false);\n        this.request = request;\n      }\n\n      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {\n        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage(\"enqueueTaskReservations\", org.apache.thrift.protocol.TMessageType.CALL, 0));\n        enqueueTaskReservations_args args = new enqueueTaskReservations_args();\n        args.setRequest(request);\n        args.write(prot);\n        prot.writeMessageEnd();\n      }\n\n      public boolean getResult() throws org.apache.thrift.TException {\n        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {\n          throw new IllegalStateException(\"Method call not finished!\");\n        }\n        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());\n        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);\n        return (new Client(prot)).recv_enqueueTaskReservations();\n      }\n    }\n\n    public void cancelTaskReservations(edu.berkeley.sparrow.thrift.TCancelTaskReservationsRequest request, org.apache.thrift.async.AsyncMethodCallback<cancelTaskReservations_call> resultHandler) throws org.apache.thrift.TException {\n      checkReady();\n      cancelTaskReservations_call method_call = new cancelTaskReservations_call(request, resultHandler, this, ___protocolFactory, ___transport);\n      this.___currentMethod = method_call;\n      ___manager.call(method_call);\n    }\n\n    public static class cancelTaskReservations_call extends org.apache.thrift.async.TAsyncMethodCall {\n      private edu.berkeley.sparrow.thrift.TCancelTaskReservationsRequest request;\n      public cancelTaskReservations_call(edu.berkeley.sparrow.thrift.TCancelTaskReservationsRequest request, org.apache.thrift.async.AsyncMethodCallback<cancelTaskReservations_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {\n        super(client, protocolFactory, transport, resultHandler, false);\n        this.request = request;\n      }\n\n      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {\n        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage(\"cancelTaskReservations\", org.apache.thrift.protocol.TMessageType.CALL, 0));\n        cancelTaskReservations_args args = new cancelTaskReservations_args();\n        args.setRequest(request);\n        args.write(prot);\n        prot.writeMessageEnd();\n      }\n\n      public void getResult() throws org.apache.thrift.TException {\n        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {\n          throw new IllegalStateException(\"Method call not finished!\");\n        }\n        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());\n        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);\n        (new Client(prot)).recv_cancelTaskReservations();\n      }\n    }\n\n  }\n\n  public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor {\n    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());\n    public Processor(I iface) {\n      super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));\n    }\n\n    protected Processor(I iface, Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {\n      super(iface, getProcessMap(processMap));\n    }\n\n    private static <I extends Iface> Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> getProcessMap(Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {\n      processMap.put(\"enqueueTaskReservations\", new enqueueTaskReservations());\n      processMap.put(\"cancelTaskReservations\", new cancelTaskReservations());\n      return processMap;\n    }\n\n    private static class enqueueTaskReservations<I extends Iface> extends org.apache.thrift.ProcessFunction<I, enqueueTaskReservations_args> {\n      public enqueueTaskReservations() {\n        super(\"enqueueTaskReservations\");\n      }\n\n      protected enqueueTaskReservations_args getEmptyArgsInstance() {\n        return new enqueueTaskReservations_args();\n      }\n\n      protected enqueueTaskReservations_result getResult(I iface, enqueueTaskReservations_args args) throws org.apache.thrift.TException {\n        enqueueTaskReservations_result result = new enqueueTaskReservations_result();\n        result.success = iface.enqueueTaskReservations(args.request);\n        result.setSuccessIsSet(true);\n        return result;\n      }\n    }\n\n    private static class cancelTaskReservations<I extends Iface> extends org.apache.thrift.ProcessFunction<I, cancelTaskReservations_args> {\n      public cancelTaskReservations() {\n        super(\"cancelTaskReservations\");\n      }\n\n      protected cancelTaskReservations_args getEmptyArgsInstance() {\n        return new cancelTaskReservations_args();\n      }\n\n      protected cancelTaskReservations_result getResult(I iface, cancelTaskReservations_args args) throws org.apache.thrift.TException {\n        cancelTaskReservations_result result = new cancelTaskReservations_result();\n        iface.cancelTaskReservations(args.request);\n        return result;\n      }\n    }\n\n  }\n\n  public static class enqueueTaskReservations_args implements org.apache.thrift.TBase<enqueueTaskReservations_args, enqueueTaskReservations_args._Fields>, java.io.Serializable, Cloneable   {\n    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct(\"enqueueTaskReservations_args\");\n\n    private static final org.apache.thrift.protocol.TField REQUEST_FIELD_DESC = new org.apache.thrift.protocol.TField(\"request\", org.apache.thrift.protocol.TType.STRUCT, (short)1);\n\n    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();\n    static {\n      schemes.put(StandardScheme.class, new enqueueTaskReservations_argsStandardSchemeFactory());\n      schemes.put(TupleScheme.class, new enqueueTaskReservations_argsTupleSchemeFactory());\n    }\n\n    public edu.berkeley.sparrow.thrift.TEnqueueTaskReservationsRequest request; // required\n\n    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */\n    public enum _Fields implements org.apache.thrift.TFieldIdEnum {\n      REQUEST((short)1, \"request\");\n\n      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();\n\n      static {\n        for (_Fields field : EnumSet.allOf(_Fields.class)) {\n          byName.put(field.getFieldName(), field);\n        }\n      }\n\n      /**\n       * Find the _Fields constant that matches fieldId, or null if its not found.\n       */\n      public static _Fields findByThriftId(int fieldId) {\n        switch(fieldId) {\n          case 1: // REQUEST\n            return REQUEST;\n          default:\n            return null;\n        }\n      }\n\n      /**\n       * Find the _Fields constant that matches fieldId, throwing an exception\n       * if it is not found.\n       */\n      public static _Fields findByThriftIdOrThrow(int fieldId) {\n        _Fields fields = findByThriftId(fieldId);\n        if (fields == null) throw new IllegalArgumentException(\"Field \" + fieldId + \" doesn't exist!\");\n        return fields;\n      }\n\n      /**\n       * Find the _Fields constant that matches name, or null if its not found.\n       */\n      public static _Fields findByName(String name) {\n        return byName.get(name);\n      }\n\n      private final short _thriftId;\n      private final String _fieldName;\n\n      _Fields(short thriftId, String fieldName) {\n        _thriftId = thriftId;\n        _fieldName = fieldName;\n      }\n\n      public short getThriftFieldId() {\n        return _thriftId;\n      }\n\n      public String getFieldName() {\n        return _fieldName;\n      }\n    }\n\n    // isset id assignments\n    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;\n    static {\n      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);\n      tmpMap.put(_Fields.REQUEST, new org.apache.thrift.meta_data.FieldMetaData(\"request\", org.apache.thrift.TFieldRequirementType.DEFAULT, \n          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, edu.berkeley.sparrow.thrift.TEnqueueTaskReservationsRequest.class)));\n      metaDataMap = Collections.unmodifiableMap(tmpMap);\n      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(enqueueTaskReservations_args.class, metaDataMap);\n    }\n\n    public enqueueTaskReservations_args() {\n    }\n\n    public enqueueTaskReservations_args(\n      edu.berkeley.sparrow.thrift.TEnqueueTaskReservationsRequest request)\n    {\n      this();\n      this.request = request;\n    }\n\n    /**\n     * Performs a deep copy on <i>other</i>.\n     */\n    public enqueueTaskReservations_args(enqueueTaskReservations_args other) {\n      if (other.isSetRequest()) {\n        this.request = new edu.berkeley.sparrow.thrift.TEnqueueTaskReservationsRequest(other.request);\n      }\n    }\n\n    public enqueueTaskReservations_args deepCopy() {\n      return new enqueueTaskReservations_args(this);\n    }\n\n    public void clear() {\n      this.request = null;\n    }\n\n    public edu.berkeley.sparrow.thrift.TEnqueueTaskReservationsRequest getRequest() {\n      return this.request;\n    }\n\n    public enqueueTaskReservations_args setRequest(edu.berkeley.sparrow.thrift.TEnqueueTaskReservationsRequest request) {\n      this.request = request;\n      return this;\n    }\n\n    public void unsetRequest() {\n      this.request = null;\n    }\n\n    /** Returns true if field request is set (has been assigned a value) and false otherwise */\n    public boolean isSetRequest() {\n      return this.request != null;\n    }\n\n    public void setRequestIsSet(boolean value) {\n      if (!value) {\n        this.request = null;\n      }\n    }\n\n    public void setFieldValue(_Fields field, Object value) {\n      switch (field) {\n      case REQUEST:\n        if (value == null) {\n          unsetRequest();\n        } else {\n          setRequest((edu.berkeley.sparrow.thrift.TEnqueueTaskReservationsRequest)value);\n        }\n        break;\n\n      }\n    }\n\n    public Object getFieldValue(_Fields field) {\n      switch (field) {\n      case REQUEST:\n        return getRequest();\n\n      }\n      throw new IllegalStateException();\n    }\n\n    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */\n    public boolean isSet(_Fields field) {\n      if (field == null) {\n        throw new IllegalArgumentException();\n      }\n\n      switch (field) {\n      case REQUEST:\n        return isSetRequest();\n      }\n      throw new IllegalStateException();\n    }\n\n    @Override\n    public boolean equals(Object that) {\n      if (that == null)\n        return false;\n      if (that instanceof enqueueTaskReservations_args)\n        return this.equals((enqueueTaskReservations_args)that);\n      return false;\n    }\n\n    public boolean equals(enqueueTaskReservations_args that) {\n      if (that == null)\n        return false;\n\n      boolean this_present_request = true && this.isSetRequest();\n      boolean that_present_request = true && that.isSetRequest();\n      if (this_present_request || that_present_request) {\n        if (!(this_present_request && that_present_request))\n          return false;\n        if (!this.request.equals(that.request))\n          return false;\n      }\n\n      return true;\n    }\n\n    @Override\n    public int hashCode() {\n      return 0;\n    }\n\n    public int compareTo(enqueueTaskReservations_args other) {\n      if (!getClass().equals(other.getClass())) {\n        return getClass().getName().compareTo(other.getClass().getName());\n      }\n\n      int lastComparison = 0;\n      enqueueTaskReservations_args typedOther = (enqueueTaskReservations_args)other;\n\n      lastComparison = Boolean.valueOf(isSetRequest()).compareTo(typedOther.isSetRequest());\n      if (lastComparison != 0) {\n        return lastComparison;\n      }\n      if (isSetRequest()) {\n        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, typedOther.request);\n        if (lastComparison != 0) {\n          return lastComparison;\n        }\n      }\n      return 0;\n    }\n\n    public _Fields fieldForId(int fieldId) {\n      return _Fields.findByThriftId(fieldId);\n    }\n\n    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {\n      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);\n    }\n\n    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {\n      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);\n    }\n\n    @Override\n    public String toString() {\n      StringBuilder sb = new StringBuilder(\"enqueueTaskReservations_args(\");\n      boolean first = true;\n\n      sb.append(\"request:\");\n      if (this.request == null) {\n        sb.append(\"null\");\n      } else {\n        sb.append(this.request);\n      }\n      first = false;\n      sb.append(\")\");\n      return sb.toString();\n    }\n\n    public void validate() throws org.apache.thrift.TException {\n      // check for required fields\n    }\n\n    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {\n      try {\n        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));\n      } catch (org.apache.thrift.TException te) {\n        throw new java.io.IOException(te.getMessage());\n      }\n    }\n\n    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {\n      try {\n        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));\n      } catch (org.apache.thrift.TException te) {\n        throw new java.io.IOException(te.getMessage());\n      }\n    }\n\n    private static class enqueueTaskReservations_argsStandardSchemeFactory implements SchemeFactory {\n      public enqueueTaskReservations_argsStandardScheme getScheme() {\n        return new enqueueTaskReservations_argsStandardScheme();\n      }\n    }\n\n    private static class enqueueTaskReservations_argsStandardScheme extends StandardScheme<enqueueTaskReservations_args> {\n\n      public void read(org.apache.thrift.protocol.TProtocol iprot, enqueueTaskReservations_args struct) throws org.apache.thrift.TException {\n        org.apache.thrift.protocol.TField schemeField;\n        iprot.readStructBegin();\n        while (true)\n        {\n          schemeField = iprot.readFieldBegin();\n          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { \n            break;\n          }\n          switch (schemeField.id) {\n            case 1: // REQUEST\n              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {\n                struct.request = new edu.berkeley.sparrow.thrift.TEnqueueTaskReservationsRequest();\n                struct.request.read(iprot);\n                struct.setRequestIsSet(true);\n              } else { \n                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n              }\n              break;\n            default:\n              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n          }\n          iprot.readFieldEnd();\n        }\n        iprot.readStructEnd();\n\n        // check for required fields of primitive type, which can't be checked in the validate method\n        struct.validate();\n      }\n\n      public void write(org.apache.thrift.protocol.TProtocol oprot, enqueueTaskReservations_args struct) throws org.apache.thrift.TException {\n        struct.validate();\n\n        oprot.writeStructBegin(STRUCT_DESC);\n        if (struct.request != null) {\n          oprot.writeFieldBegin(REQUEST_FIELD_DESC);\n          struct.request.write(oprot);\n          oprot.writeFieldEnd();\n        }\n        oprot.writeFieldStop();\n        oprot.writeStructEnd();\n      }\n\n    }\n\n    private static class enqueueTaskReservations_argsTupleSchemeFactory implements SchemeFactory {\n      public enqueueTaskReservations_argsTupleScheme getScheme() {\n        return new enqueueTaskReservations_argsTupleScheme();\n      }\n    }\n\n    private static class enqueueTaskReservations_argsTupleScheme extends TupleScheme<enqueueTaskReservations_args> {\n\n      @Override\n      public void write(org.apache.thrift.protocol.TProtocol prot, enqueueTaskReservations_args struct) throws org.apache.thrift.TException {\n        TTupleProtocol oprot = (TTupleProtocol) prot;\n        BitSet optionals = new BitSet();\n        if (struct.isSetRequest()) {\n          optionals.set(0);\n        }\n        oprot.writeBitSet(optionals, 1);\n        if (struct.isSetRequest()) {\n          struct.request.write(oprot);\n        }\n      }\n\n      @Override\n      public void read(org.apache.thrift.protocol.TProtocol prot, enqueueTaskReservations_args struct) throws org.apache.thrift.TException {\n        TTupleProtocol iprot = (TTupleProtocol) prot;\n        BitSet incoming = iprot.readBitSet(1);\n        if (incoming.get(0)) {\n          struct.request = new edu.berkeley.sparrow.thrift.TEnqueueTaskReservationsRequest();\n          struct.request.read(iprot);\n          struct.setRequestIsSet(true);\n        }\n      }\n    }\n\n  }\n\n  public static class enqueueTaskReservations_result implements org.apache.thrift.TBase<enqueueTaskReservations_result, enqueueTaskReservations_result._Fields>, java.io.Serializable, Cloneable   {\n    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct(\"enqueueTaskReservations_result\");\n\n    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField(\"success\", org.apache.thrift.protocol.TType.BOOL, (short)0);\n\n    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();\n    static {\n      schemes.put(StandardScheme.class, new enqueueTaskReservations_resultStandardSchemeFactory());\n      schemes.put(TupleScheme.class, new enqueueTaskReservations_resultTupleSchemeFactory());\n    }\n\n    public boolean success; // required\n\n    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */\n    public enum _Fields implements org.apache.thrift.TFieldIdEnum {\n      SUCCESS((short)0, \"success\");\n\n      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();\n\n      static {\n        for (_Fields field : EnumSet.allOf(_Fields.class)) {\n          byName.put(field.getFieldName(), field);\n        }\n      }\n\n      /**\n       * Find the _Fields constant that matches fieldId, or null if its not found.\n       */\n      public static _Fields findByThriftId(int fieldId) {\n        switch(fieldId) {\n          case 0: // SUCCESS\n            return SUCCESS;\n          default:\n            return null;\n        }\n      }\n\n      /**\n       * Find the _Fields constant that matches fieldId, throwing an exception\n       * if it is not found.\n       */\n      public static _Fields findByThriftIdOrThrow(int fieldId) {\n        _Fields fields = findByThriftId(fieldId);\n        if (fields == null) throw new IllegalArgumentException(\"Field \" + fieldId + \" doesn't exist!\");\n        return fields;\n      }\n\n      /**\n       * Find the _Fields constant that matches name, or null if its not found.\n       */\n      public static _Fields findByName(String name) {\n        return byName.get(name);\n      }\n\n      private final short _thriftId;\n      private final String _fieldName;\n\n      _Fields(short thriftId, String fieldName) {\n        _thriftId = thriftId;\n        _fieldName = fieldName;\n      }\n\n      public short getThriftFieldId() {\n        return _thriftId;\n      }\n\n      public String getFieldName() {\n        return _fieldName;\n      }\n    }\n\n    // isset id assignments\n    private static final int __SUCCESS_ISSET_ID = 0;\n    private BitSet __isset_bit_vector = new BitSet(1);\n    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;\n    static {\n      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);\n      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData(\"success\", org.apache.thrift.TFieldRequirementType.DEFAULT, \n          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));\n      metaDataMap = Collections.unmodifiableMap(tmpMap);\n      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(enqueueTaskReservations_result.class, metaDataMap);\n    }\n\n    public enqueueTaskReservations_result() {\n    }\n\n    public enqueueTaskReservations_result(\n      boolean success)\n    {\n      this();\n      this.success = success;\n      setSuccessIsSet(true);\n    }\n\n    /**\n     * Performs a deep copy on <i>other</i>.\n     */\n    public enqueueTaskReservations_result(enqueueTaskReservations_result other) {\n      __isset_bit_vector.clear();\n      __isset_bit_vector.or(other.__isset_bit_vector);\n      this.success = other.success;\n    }\n\n    public enqueueTaskReservations_result deepCopy() {\n      return new enqueueTaskReservations_result(this);\n    }\n\n    public void clear() {\n      setSuccessIsSet(false);\n      this.success = false;\n    }\n\n    public boolean isSuccess() {\n      return this.success;\n    }\n\n    public enqueueTaskReservations_result setSuccess(boolean success) {\n      this.success = success;\n      setSuccessIsSet(true);\n      return this;\n    }\n\n    public void unsetSuccess() {\n      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);\n    }\n\n    /** Returns true if field success is set (has been assigned a value) and false otherwise */\n    public boolean isSetSuccess() {\n      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);\n    }\n\n    public void setSuccessIsSet(boolean value) {\n      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);\n    }\n\n    public void setFieldValue(_Fields field, Object value) {\n      switch (field) {\n      case SUCCESS:\n        if (value == null) {\n          unsetSuccess();\n        } else {\n          setSuccess((Boolean)value);\n        }\n        break;\n\n      }\n    }\n\n    public Object getFieldValue(_Fields field) {\n      switch (field) {\n      case SUCCESS:\n        return Boolean.valueOf(isSuccess());\n\n      }\n      throw new IllegalStateException();\n    }\n\n    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */\n    public boolean isSet(_Fields field) {\n      if (field == null) {\n        throw new IllegalArgumentException();\n      }\n\n      switch (field) {\n      case SUCCESS:\n        return isSetSuccess();\n      }\n      throw new IllegalStateException();\n    }\n\n    @Override\n    public boolean equals(Object that) {\n      if (that == null)\n        return false;\n      if (that instanceof enqueueTaskReservations_result)\n        return this.equals((enqueueTaskReservations_result)that);\n      return false;\n    }\n\n    public boolean equals(enqueueTaskReservations_result that) {\n      if (that == null)\n        return false;\n\n      boolean this_present_success = true;\n      boolean that_present_success = true;\n      if (this_present_success || that_present_success) {\n        if (!(this_present_success && that_present_success))\n          return false;\n        if (this.success != that.success)\n          return false;\n      }\n\n      return true;\n    }\n\n    @Override\n    public int hashCode() {\n      return 0;\n    }\n\n    public int compareTo(enqueueTaskReservations_result other) {\n      if (!getClass().equals(other.getClass())) {\n        return getClass().getName().compareTo(other.getClass().getName());\n      }\n\n      int lastComparison = 0;\n      enqueueTaskReservations_result typedOther = (enqueueTaskReservations_result)other;\n\n      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());\n      if (lastComparison != 0) {\n        return lastComparison;\n      }\n      if (isSetSuccess()) {\n        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);\n        if (lastComparison != 0) {\n          return lastComparison;\n        }\n      }\n      return 0;\n    }\n\n    public _Fields fieldForId(int fieldId) {\n      return _Fields.findByThriftId(fieldId);\n    }\n\n    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {\n      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);\n    }\n\n    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {\n      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);\n      }\n\n    @Override\n    public String toString() {\n      StringBuilder sb = new StringBuilder(\"enqueueTaskReservations_result(\");\n      boolean first = true;\n\n      sb.append(\"success:\");\n      sb.append(this.success);\n      first = false;\n      sb.append(\")\");\n      return sb.toString();\n    }\n\n    public void validate() throws org.apache.thrift.TException {\n      // check for required fields\n    }\n\n    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {\n      try {\n        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));\n      } catch (org.apache.thrift.TException te) {\n        throw new java.io.IOException(te.getMessage());\n      }\n    }\n\n    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {\n      try {\n        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.\n        __isset_bit_vector = new BitSet(1);\n        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));\n      } catch (org.apache.thrift.TException te) {\n        throw new java.io.IOException(te.getMessage());\n      }\n    }\n\n    private static class enqueueTaskReservations_resultStandardSchemeFactory implements SchemeFactory {\n      public enqueueTaskReservations_resultStandardScheme getScheme() {\n        return new enqueueTaskReservations_resultStandardScheme();\n      }\n    }\n\n    private static class enqueueTaskReservations_resultStandardScheme extends StandardScheme<enqueueTaskReservations_result> {\n\n      public void read(org.apache.thrift.protocol.TProtocol iprot, enqueueTaskReservations_result struct) throws org.apache.thrift.TException {\n        org.apache.thrift.protocol.TField schemeField;\n        iprot.readStructBegin();\n        while (true)\n        {\n          schemeField = iprot.readFieldBegin();\n          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { \n            break;\n          }\n          switch (schemeField.id) {\n            case 0: // SUCCESS\n              if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {\n                struct.success = iprot.readBool();\n                struct.setSuccessIsSet(true);\n              } else { \n                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n              }\n              break;\n            default:\n              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n          }\n          iprot.readFieldEnd();\n        }\n        iprot.readStructEnd();\n\n        // check for required fields of primitive type, which can't be checked in the validate method\n        struct.validate();\n      }\n\n      public void write(org.apache.thrift.protocol.TProtocol oprot, enqueueTaskReservations_result struct) throws org.apache.thrift.TException {\n        struct.validate();\n\n        oprot.writeStructBegin(STRUCT_DESC);\n        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);\n        oprot.writeBool(struct.success);\n        oprot.writeFieldEnd();\n        oprot.writeFieldStop();\n        oprot.writeStructEnd();\n      }\n\n    }\n\n    private static class enqueueTaskReservations_resultTupleSchemeFactory implements SchemeFactory {\n      public enqueueTaskReservations_resultTupleScheme getScheme() {\n        return new enqueueTaskReservations_resultTupleScheme();\n      }\n    }\n\n    private static class enqueueTaskReservations_resultTupleScheme extends TupleScheme<enqueueTaskReservations_result> {\n\n      @Override\n      public void write(org.apache.thrift.protocol.TProtocol prot, enqueueTaskReservations_result struct) throws org.apache.thrift.TException {\n        TTupleProtocol oprot = (TTupleProtocol) prot;\n        BitSet optionals = new BitSet();\n        if (struct.isSetSuccess()) {\n          optionals.set(0);\n        }\n        oprot.writeBitSet(optionals, 1);\n        if (struct.isSetSuccess()) {\n          oprot.writeBool(struct.success);\n        }\n      }\n\n      @Override\n      public void read(org.apache.thrift.protocol.TProtocol prot, enqueueTaskReservations_result struct) throws org.apache.thrift.TException {\n        TTupleProtocol iprot = (TTupleProtocol) prot;\n        BitSet incoming = iprot.readBitSet(1);\n        if (incoming.get(0)) {\n          struct.success = iprot.readBool();\n          struct.setSuccessIsSet(true);\n        }\n      }\n    }\n\n  }\n\n  public static class cancelTaskReservations_args implements org.apache.thrift.TBase<cancelTaskReservations_args, cancelTaskReservations_args._Fields>, java.io.Serializable, Cloneable   {\n    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct(\"cancelTaskReservations_args\");\n\n    private static final org.apache.thrift.protocol.TField REQUEST_FIELD_DESC = new org.apache.thrift.protocol.TField(\"request\", org.apache.thrift.protocol.TType.STRUCT, (short)1);\n\n    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();\n    static {\n      schemes.put(StandardScheme.class, new cancelTaskReservations_argsStandardSchemeFactory());\n      schemes.put(TupleScheme.class, new cancelTaskReservations_argsTupleSchemeFactory());\n    }\n\n    public edu.berkeley.sparrow.thrift.TCancelTaskReservationsRequest request; // required\n\n    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */\n    public enum _Fields implements org.apache.thrift.TFieldIdEnum {\n      REQUEST((short)1, \"request\");\n\n      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();\n\n      static {\n        for (_Fields field : EnumSet.allOf(_Fields.class)) {\n          byName.put(field.getFieldName(), field);\n        }\n      }\n\n      /**\n       * Find the _Fields constant that matches fieldId, or null if its not found.\n       */\n      public static _Fields findByThriftId(int fieldId) {\n        switch(fieldId) {\n          case 1: // REQUEST\n            return REQUEST;\n          default:\n            return null;\n        }\n      }\n\n      /**\n       * Find the _Fields constant that matches fieldId, throwing an exception\n       * if it is not found.\n       */\n      public static _Fields findByThriftIdOrThrow(int fieldId) {\n        _Fields fields = findByThriftId(fieldId);\n        if (fields == null) throw new IllegalArgumentException(\"Field \" + fieldId + \" doesn't exist!\");\n        return fields;\n      }\n\n      /**\n       * Find the _Fields constant that matches name, or null if its not found.\n       */\n      public static _Fields findByName(String name) {\n        return byName.get(name);\n      }\n\n      private final short _thriftId;\n      private final String _fieldName;\n\n      _Fields(short thriftId, String fieldName) {\n        _thriftId = thriftId;\n        _fieldName = fieldName;\n      }\n\n      public short getThriftFieldId() {\n        return _thriftId;\n      }\n\n      public String getFieldName() {\n        return _fieldName;\n      }\n    }\n\n    // isset id assignments\n    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;\n    static {\n      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);\n      tmpMap.put(_Fields.REQUEST, new org.apache.thrift.meta_data.FieldMetaData(\"request\", org.apache.thrift.TFieldRequirementType.DEFAULT, \n          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, edu.berkeley.sparrow.thrift.TCancelTaskReservationsRequest.class)));\n      metaDataMap = Collections.unmodifiableMap(tmpMap);\n      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(cancelTaskReservations_args.class, metaDataMap);\n    }\n\n    public cancelTaskReservations_args() {\n    }\n\n    public cancelTaskReservations_args(\n      edu.berkeley.sparrow.thrift.TCancelTaskReservationsRequest request)\n    {\n      this();\n      this.request = request;\n    }\n\n    /**\n     * Performs a deep copy on <i>other</i>.\n     */\n    public cancelTaskReservations_args(cancelTaskReservations_args other) {\n      if (other.isSetRequest()) {\n        this.request = new edu.berkeley.sparrow.thrift.TCancelTaskReservationsRequest(other.request);\n      }\n    }\n\n    public cancelTaskReservations_args deepCopy() {\n      return new cancelTaskReservations_args(this);\n    }\n\n    public void clear() {\n      this.request = null;\n    }\n\n    public edu.berkeley.sparrow.thrift.TCancelTaskReservationsRequest getRequest() {\n      return this.request;\n    }\n\n    public cancelTaskReservations_args setRequest(edu.berkeley.sparrow.thrift.TCancelTaskReservationsRequest request) {\n      this.request = request;\n      return this;\n    }\n\n    public void unsetRequest() {\n      this.request = null;\n    }\n\n    /** Returns true if field request is set (has been assigned a value) and false otherwise */\n    public boolean isSetRequest() {\n      return this.request != null;\n    }\n\n    public void setRequestIsSet(boolean value) {\n      if (!value) {\n        this.request = null;\n      }\n    }\n\n    public void setFieldValue(_Fields field, Object value) {\n      switch (field) {\n      case REQUEST:\n        if (value == null) {\n          unsetRequest();\n        } else {\n          setRequest((edu.berkeley.sparrow.thrift.TCancelTaskReservationsRequest)value);\n        }\n        break;\n\n      }\n    }\n\n    public Object getFieldValue(_Fields field) {\n      switch (field) {\n      case REQUEST:\n        return getRequest();\n\n      }\n      throw new IllegalStateException();\n    }\n\n    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */\n    public boolean isSet(_Fields field) {\n      if (field == null) {\n        throw new IllegalArgumentException();\n      }\n\n      switch (field) {\n      case REQUEST:\n        return isSetRequest();\n      }\n      throw new IllegalStateException();\n    }\n\n    @Override\n    public boolean equals(Object that) {\n      if (that == null)\n        return false;\n      if (that instanceof cancelTaskReservations_args)\n        return this.equals((cancelTaskReservations_args)that);\n      return false;\n    }\n\n    public boolean equals(cancelTaskReservations_args that) {\n      if (that == null)\n        return false;\n\n      boolean this_present_request = true && this.isSetRequest();\n      boolean that_present_request = true && that.isSetRequest();\n      if (this_present_request || that_present_request) {\n        if (!(this_present_request && that_present_request))\n          return false;\n        if (!this.request.equals(that.request))\n          return false;\n      }\n\n      return true;\n    }\n\n    @Override\n    public int hashCode() {\n      return 0;\n    }\n\n    public int compareTo(cancelTaskReservations_args other) {\n      if (!getClass().equals(other.getClass())) {\n        return getClass().getName().compareTo(other.getClass().getName());\n      }\n\n      int lastComparison = 0;\n      cancelTaskReservations_args typedOther = (cancelTaskReservations_args)other;\n\n      lastComparison = Boolean.valueOf(isSetRequest()).compareTo(typedOther.isSetRequest());\n      if (lastComparison != 0) {\n        return lastComparison;\n      }\n      if (isSetRequest()) {\n        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, typedOther.request);\n        if (lastComparison != 0) {\n          return lastComparison;\n        }\n      }\n      return 0;\n    }\n\n    public _Fields fieldForId(int fieldId) {\n      return _Fields.findByThriftId(fieldId);\n    }\n\n    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {\n      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);\n    }\n\n    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {\n      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);\n    }\n\n    @Override\n    public String toString() {\n      StringBuilder sb = new StringBuilder(\"cancelTaskReservations_args(\");\n      boolean first = true;\n\n      sb.append(\"request:\");\n      if (this.request == null) {\n        sb.append(\"null\");\n      } else {\n        sb.append(this.request);\n      }\n      first = false;\n      sb.append(\")\");\n      return sb.toString();\n    }\n\n    public void validate() throws org.apache.thrift.TException {\n      // check for required fields\n    }\n\n    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {\n      try {\n        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));\n      } catch (org.apache.thrift.TException te) {\n        throw new java.io.IOException(te.getMessage());\n      }\n    }\n\n    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {\n      try {\n        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));\n      } catch (org.apache.thrift.TException te) {\n        throw new java.io.IOException(te.getMessage());\n      }\n    }\n\n    private static class cancelTaskReservations_argsStandardSchemeFactory implements SchemeFactory {\n      public cancelTaskReservations_argsStandardScheme getScheme() {\n        return new cancelTaskReservations_argsStandardScheme();\n      }\n    }\n\n    private static class cancelTaskReservations_argsStandardScheme extends StandardScheme<cancelTaskReservations_args> {\n\n      public void read(org.apache.thrift.protocol.TProtocol iprot, cancelTaskReservations_args struct) throws org.apache.thrift.TException {\n        org.apache.thrift.protocol.TField schemeField;\n        iprot.readStructBegin();\n        while (true)\n        {\n          schemeField = iprot.readFieldBegin();\n          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { \n            break;\n          }\n          switch (schemeField.id) {\n            case 1: // REQUEST\n              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {\n                struct.request = new edu.berkeley.sparrow.thrift.TCancelTaskReservationsRequest();\n                struct.request.read(iprot);\n                struct.setRequestIsSet(true);\n              } else { \n                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n              }\n              break;\n            default:\n              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n          }\n          iprot.readFieldEnd();\n        }\n        iprot.readStructEnd();\n\n        // check for required fields of primitive type, which can't be checked in the validate method\n        struct.validate();\n      }\n\n      public void write(org.apache.thrift.protocol.TProtocol oprot, cancelTaskReservations_args struct) throws org.apache.thrift.TException {\n        struct.validate();\n\n        oprot.writeStructBegin(STRUCT_DESC);\n        if (struct.request != null) {\n          oprot.writeFieldBegin(REQUEST_FIELD_DESC);\n          struct.request.write(oprot);\n          oprot.writeFieldEnd();\n        }\n        oprot.writeFieldStop();\n        oprot.writeStructEnd();\n      }\n\n    }\n\n    private static class cancelTaskReservations_argsTupleSchemeFactory implements SchemeFactory {\n      public cancelTaskReservations_argsTupleScheme getScheme() {\n        return new cancelTaskReservations_argsTupleScheme();\n      }\n    }\n\n    private static class cancelTaskReservations_argsTupleScheme extends TupleScheme<cancelTaskReservations_args> {\n\n      @Override\n      public void write(org.apache.thrift.protocol.TProtocol prot, cancelTaskReservations_args struct) throws org.apache.thrift.TException {\n        TTupleProtocol oprot = (TTupleProtocol) prot;\n        BitSet optionals = new BitSet();\n        if (struct.isSetRequest()) {\n          optionals.set(0);\n        }\n        oprot.writeBitSet(optionals, 1);\n        if (struct.isSetRequest()) {\n          struct.request.write(oprot);\n        }\n      }\n\n      @Override\n      public void read(org.apache.thrift.protocol.TProtocol prot, cancelTaskReservations_args struct) throws org.apache.thrift.TException {\n        TTupleProtocol iprot = (TTupleProtocol) prot;\n        BitSet incoming = iprot.readBitSet(1);\n        if (incoming.get(0)) {\n          struct.request = new edu.berkeley.sparrow.thrift.TCancelTaskReservationsRequest();\n          struct.request.read(iprot);\n          struct.setRequestIsSet(true);\n        }\n      }\n    }\n\n  }\n\n  public static class cancelTaskReservations_result implements org.apache.thrift.TBase<cancelTaskReservations_result, cancelTaskReservations_result._Fields>, java.io.Serializable, Cloneable   {\n    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct(\"cancelTaskReservations_result\");\n\n\n    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();\n    static {\n      schemes.put(StandardScheme.class, new cancelTaskReservations_resultStandardSchemeFactory());\n      schemes.put(TupleScheme.class, new cancelTaskReservations_resultTupleSchemeFactory());\n    }\n\n\n    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */\n    public enum _Fields implements org.apache.thrift.TFieldIdEnum {\n;\n\n      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();\n\n      static {\n        for (_Fields field : EnumSet.allOf(_Fields.class)) {\n          byName.put(field.getFieldName(), field);\n        }\n      }\n\n      /**\n       * Find the _Fields constant that matches fieldId, or null if its not found.\n       */\n      public static _Fields findByThriftId(int fieldId) {\n        switch(fieldId) {\n          default:\n            return null;\n        }\n      }\n\n      /**\n       * Find the _Fields constant that matches fieldId, throwing an exception\n       * if it is not found.\n       */\n      public static _Fields findByThriftIdOrThrow(int fieldId) {\n        _Fields fields = findByThriftId(fieldId);\n        if (fields == null) throw new IllegalArgumentException(\"Field \" + fieldId + \" doesn't exist!\");\n        return fields;\n      }\n\n      /**\n       * Find the _Fields constant that matches name, or null if its not found.\n       */\n      public static _Fields findByName(String name) {\n        return byName.get(name);\n      }\n\n      private final short _thriftId;\n      private final String _fieldName;\n\n      _Fields(short thriftId, String fieldName) {\n        _thriftId = thriftId;\n        _fieldName = fieldName;\n      }\n\n      public short getThriftFieldId() {\n        return _thriftId;\n      }\n\n      public String getFieldName() {\n        return _fieldName;\n      }\n    }\n    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;\n    static {\n      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);\n      metaDataMap = Collections.unmodifiableMap(tmpMap);\n      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(cancelTaskReservations_result.class, metaDataMap);\n    }\n\n    public cancelTaskReservations_result() {\n    }\n\n    /**\n     * Performs a deep copy on <i>other</i>.\n     */\n    public cancelTaskReservations_result(cancelTaskReservations_result other) {\n    }\n\n    public cancelTaskReservations_result deepCopy() {\n      return new cancelTaskReservations_result(this);\n    }\n\n    public void clear() {\n    }\n\n    public void setFieldValue(_Fields field, Object value) {\n      switch (field) {\n      }\n    }\n\n    public Object getFieldValue(_Fields field) {\n      switch (field) {\n      }\n      throw new IllegalStateException();\n    }\n\n    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */\n    public boolean isSet(_Fields field) {\n      if (field == null) {\n        throw new IllegalArgumentException();\n      }\n\n      switch (field) {\n      }\n      throw new IllegalStateException();\n    }\n\n    @Override\n    public boolean equals(Object that) {\n      if (that == null)\n        return false;\n      if (that instanceof cancelTaskReservations_result)\n        return this.equals((cancelTaskReservations_result)that);\n      return false;\n    }\n\n    public boolean equals(cancelTaskReservations_result that) {\n      if (that == null)\n        return false;\n\n      return true;\n    }\n\n    @Override\n    public int hashCode() {\n      return 0;\n    }\n\n    public int compareTo(cancelTaskReservations_result other) {\n      if (!getClass().equals(other.getClass())) {\n        return getClass().getName().compareTo(other.getClass().getName());\n      }\n\n      int lastComparison = 0;\n      cancelTaskReservations_result typedOther = (cancelTaskReservations_result)other;\n\n      return 0;\n    }\n\n    public _Fields fieldForId(int fieldId) {\n      return _Fields.findByThriftId(fieldId);\n    }\n\n    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {\n      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);\n    }\n\n    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {\n      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);\n      }\n\n    @Override\n    public String toString() {\n      StringBuilder sb = new StringBuilder(\"cancelTaskReservations_result(\");\n      boolean first = true;\n\n      sb.append(\")\");\n      return sb.toString();\n    }\n\n    public void validate() throws org.apache.thrift.TException {\n      // check for required fields\n    }\n\n    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {\n      try {\n        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));\n      } catch (org.apache.thrift.TException te) {\n        throw new java.io.IOException(te.getMessage());\n      }\n    }\n\n    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {\n      try {\n        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));\n      } catch (org.apache.thrift.TException te) {\n        throw new java.io.IOException(te.getMessage());\n      }\n    }\n\n    private static class cancelTaskReservations_resultStandardSchemeFactory implements SchemeFactory {\n      public cancelTaskReservations_resultStandardScheme getScheme() {\n        return new cancelTaskReservations_resultStandardScheme();\n      }\n    }\n\n    private static class cancelTaskReservations_resultStandardScheme extends StandardScheme<cancelTaskReservations_result> {\n\n      public void read(org.apache.thrift.protocol.TProtocol iprot, cancelTaskReservations_result struct) throws org.apache.thrift.TException {\n        org.apache.thrift.protocol.TField schemeField;\n        iprot.readStructBegin();\n        while (true)\n        {\n          schemeField = iprot.readFieldBegin();\n          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { \n            break;\n          }\n          switch (schemeField.id) {\n            default:\n              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n          }\n          iprot.readFieldEnd();\n        }\n        iprot.readStructEnd();\n\n        // check for required fields of primitive type, which can't be checked in the validate method\n        struct.validate();\n      }\n\n      public void write(org.apache.thrift.protocol.TProtocol oprot, cancelTaskReservations_result struct) throws org.apache.thrift.TException {\n        struct.validate();\n\n        oprot.writeStructBegin(STRUCT_DESC);\n        oprot.writeFieldStop();\n        oprot.writeStructEnd();\n      }\n\n    }\n\n    private static class cancelTaskReservations_resultTupleSchemeFactory implements SchemeFactory {\n      public cancelTaskReservations_resultTupleScheme getScheme() {\n        return new cancelTaskReservations_resultTupleScheme();\n      }\n    }\n\n    private static class cancelTaskReservations_resultTupleScheme extends TupleScheme<cancelTaskReservations_result> {\n\n      @Override\n      public void write(org.apache.thrift.protocol.TProtocol prot, cancelTaskReservations_result struct) throws org.apache.thrift.TException {\n        TTupleProtocol oprot = (TTupleProtocol) prot;\n      }\n\n      @Override\n      public void read(org.apache.thrift.protocol.TProtocol prot, cancelTaskReservations_result struct) throws org.apache.thrift.TException {\n        TTupleProtocol iprot = (TTupleProtocol) prot;\n      }\n    }\n\n  }\n\n}\n"
  },
  {
    "path": "src/main/gen-java/edu/berkeley/sparrow/thrift/LoadSpec.java",
    "content": "/**\n * Autogenerated by Thrift Compiler (0.8.0)\n *\n * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING\n *  @generated\n */\npackage edu.berkeley.sparrow.thrift;\n\nimport org.apache.thrift.scheme.IScheme;\nimport org.apache.thrift.scheme.SchemeFactory;\nimport org.apache.thrift.scheme.StandardScheme;\n\nimport org.apache.thrift.scheme.TupleScheme;\nimport org.apache.thrift.protocol.TTupleProtocol;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.util.HashMap;\nimport java.util.EnumMap;\nimport java.util.Set;\nimport java.util.HashSet;\nimport java.util.EnumSet;\nimport java.util.Collections;\nimport java.util.BitSet;\nimport java.nio.ByteBuffer;\nimport java.util.Arrays;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\npublic class LoadSpec implements org.apache.thrift.TBase<LoadSpec, LoadSpec._Fields>, java.io.Serializable, Cloneable {\n  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct(\"LoadSpec\");\n\n  private static final org.apache.thrift.protocol.TField LOAD_FIELD_DESC = new org.apache.thrift.protocol.TField(\"load\", org.apache.thrift.protocol.TType.DOUBLE, (short)1);\n\n  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();\n  static {\n    schemes.put(StandardScheme.class, new LoadSpecStandardSchemeFactory());\n    schemes.put(TupleScheme.class, new LoadSpecTupleSchemeFactory());\n  }\n\n  public double load; // required\n\n  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */\n  public enum _Fields implements org.apache.thrift.TFieldIdEnum {\n    LOAD((short)1, \"load\");\n\n    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();\n\n    static {\n      for (_Fields field : EnumSet.allOf(_Fields.class)) {\n        byName.put(field.getFieldName(), field);\n      }\n    }\n\n    /**\n     * Find the _Fields constant that matches fieldId, or null if its not found.\n     */\n    public static _Fields findByThriftId(int fieldId) {\n      switch(fieldId) {\n        case 1: // LOAD\n          return LOAD;\n        default:\n          return null;\n      }\n    }\n\n    /**\n     * Find the _Fields constant that matches fieldId, throwing an exception\n     * if it is not found.\n     */\n    public static _Fields findByThriftIdOrThrow(int fieldId) {\n      _Fields fields = findByThriftId(fieldId);\n      if (fields == null) throw new IllegalArgumentException(\"Field \" + fieldId + \" doesn't exist!\");\n      return fields;\n    }\n\n    /**\n     * Find the _Fields constant that matches name, or null if its not found.\n     */\n    public static _Fields findByName(String name) {\n      return byName.get(name);\n    }\n\n    private final short _thriftId;\n    private final String _fieldName;\n\n    _Fields(short thriftId, String fieldName) {\n      _thriftId = thriftId;\n      _fieldName = fieldName;\n    }\n\n    public short getThriftFieldId() {\n      return _thriftId;\n    }\n\n    public String getFieldName() {\n      return _fieldName;\n    }\n  }\n\n  // isset id assignments\n  private static final int __LOAD_ISSET_ID = 0;\n  private BitSet __isset_bit_vector = new BitSet(1);\n  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;\n  static {\n    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);\n    tmpMap.put(_Fields.LOAD, new org.apache.thrift.meta_data.FieldMetaData(\"load\", org.apache.thrift.TFieldRequirementType.DEFAULT, \n        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));\n    metaDataMap = Collections.unmodifiableMap(tmpMap);\n    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LoadSpec.class, metaDataMap);\n  }\n\n  public LoadSpec() {\n  }\n\n  public LoadSpec(\n    double load)\n  {\n    this();\n    this.load = load;\n    setLoadIsSet(true);\n  }\n\n  /**\n   * Performs a deep copy on <i>other</i>.\n   */\n  public LoadSpec(LoadSpec other) {\n    __isset_bit_vector.clear();\n    __isset_bit_vector.or(other.__isset_bit_vector);\n    this.load = other.load;\n  }\n\n  public LoadSpec deepCopy() {\n    return new LoadSpec(this);\n  }\n\n  public void clear() {\n    setLoadIsSet(false);\n    this.load = 0.0;\n  }\n\n  public double getLoad() {\n    return this.load;\n  }\n\n  public LoadSpec setLoad(double load) {\n    this.load = load;\n    setLoadIsSet(true);\n    return this;\n  }\n\n  public void unsetLoad() {\n    __isset_bit_vector.clear(__LOAD_ISSET_ID);\n  }\n\n  /** Returns true if field load is set (has been assigned a value) and false otherwise */\n  public boolean isSetLoad() {\n    return __isset_bit_vector.get(__LOAD_ISSET_ID);\n  }\n\n  public void setLoadIsSet(boolean value) {\n    __isset_bit_vector.set(__LOAD_ISSET_ID, value);\n  }\n\n  public void setFieldValue(_Fields field, Object value) {\n    switch (field) {\n    case LOAD:\n      if (value == null) {\n        unsetLoad();\n      } else {\n        setLoad((Double)value);\n      }\n      break;\n\n    }\n  }\n\n  public Object getFieldValue(_Fields field) {\n    switch (field) {\n    case LOAD:\n      return Double.valueOf(getLoad());\n\n    }\n    throw new IllegalStateException();\n  }\n\n  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */\n  public boolean isSet(_Fields field) {\n    if (field == null) {\n      throw new IllegalArgumentException();\n    }\n\n    switch (field) {\n    case LOAD:\n      return isSetLoad();\n    }\n    throw new IllegalStateException();\n  }\n\n  @Override\n  public boolean equals(Object that) {\n    if (that == null)\n      return false;\n    if (that instanceof LoadSpec)\n      return this.equals((LoadSpec)that);\n    return false;\n  }\n\n  public boolean equals(LoadSpec that) {\n    if (that == null)\n      return false;\n\n    boolean this_present_load = true;\n    boolean that_present_load = true;\n    if (this_present_load || that_present_load) {\n      if (!(this_present_load && that_present_load))\n        return false;\n      if (this.load != that.load)\n        return false;\n    }\n\n    return true;\n  }\n\n  @Override\n  public int hashCode() {\n    return 0;\n  }\n\n  public int compareTo(LoadSpec other) {\n    if (!getClass().equals(other.getClass())) {\n      return getClass().getName().compareTo(other.getClass().getName());\n    }\n\n    int lastComparison = 0;\n    LoadSpec typedOther = (LoadSpec)other;\n\n    lastComparison = Boolean.valueOf(isSetLoad()).compareTo(typedOther.isSetLoad());\n    if (lastComparison != 0) {\n      return lastComparison;\n    }\n    if (isSetLoad()) {\n      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.load, typedOther.load);\n      if (lastComparison != 0) {\n        return lastComparison;\n      }\n    }\n    return 0;\n  }\n\n  public _Fields fieldForId(int fieldId) {\n    return _Fields.findByThriftId(fieldId);\n  }\n\n  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {\n    schemes.get(iprot.getScheme()).getScheme().read(iprot, this);\n  }\n\n  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {\n    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);\n  }\n\n  @Override\n  public String toString() {\n    StringBuilder sb = new StringBuilder(\"LoadSpec(\");\n    boolean first = true;\n\n    sb.append(\"load:\");\n    sb.append(this.load);\n    first = false;\n    sb.append(\")\");\n    return sb.toString();\n  }\n\n  public void validate() throws org.apache.thrift.TException {\n    // check for required fields\n  }\n\n  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {\n    try {\n      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));\n    } catch (org.apache.thrift.TException te) {\n      throw new java.io.IOException(te.getMessage());\n    }\n  }\n\n  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {\n    try {\n      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.\n      __isset_bit_vector = new BitSet(1);\n      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));\n    } catch (org.apache.thrift.TException te) {\n      throw new java.io.IOException(te.getMessage());\n    }\n  }\n\n  private static class LoadSpecStandardSchemeFactory implements SchemeFactory {\n    public LoadSpecStandardScheme getScheme() {\n      return new LoadSpecStandardScheme();\n    }\n  }\n\n  private static class LoadSpecStandardScheme extends StandardScheme<LoadSpec> {\n\n    public void read(org.apache.thrift.protocol.TProtocol iprot, LoadSpec struct) throws org.apache.thrift.TException {\n      org.apache.thrift.protocol.TField schemeField;\n      iprot.readStructBegin();\n      while (true)\n      {\n        schemeField = iprot.readFieldBegin();\n        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { \n          break;\n        }\n        switch (schemeField.id) {\n          case 1: // LOAD\n            if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) {\n              struct.load = iprot.readDouble();\n              struct.setLoadIsSet(true);\n            } else { \n              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n            }\n            break;\n          default:\n            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n        }\n        iprot.readFieldEnd();\n      }\n      iprot.readStructEnd();\n\n      // check for required fields of primitive type, which can't be checked in the validate method\n      struct.validate();\n    }\n\n    public void write(org.apache.thrift.protocol.TProtocol oprot, LoadSpec struct) throws org.apache.thrift.TException {\n      struct.validate();\n\n      oprot.writeStructBegin(STRUCT_DESC);\n      oprot.writeFieldBegin(LOAD_FIELD_DESC);\n      oprot.writeDouble(struct.load);\n      oprot.writeFieldEnd();\n      oprot.writeFieldStop();\n      oprot.writeStructEnd();\n    }\n\n  }\n\n  private static class LoadSpecTupleSchemeFactory implements SchemeFactory {\n    public LoadSpecTupleScheme getScheme() {\n      return new LoadSpecTupleScheme();\n    }\n  }\n\n  private static class LoadSpecTupleScheme extends TupleScheme<LoadSpec> {\n\n    @Override\n    public void write(org.apache.thrift.protocol.TProtocol prot, LoadSpec struct) throws org.apache.thrift.TException {\n      TTupleProtocol oprot = (TTupleProtocol) prot;\n      BitSet optionals = new BitSet();\n      if (struct.isSetLoad()) {\n        optionals.set(0);\n      }\n      oprot.writeBitSet(optionals, 1);\n      if (struct.isSetLoad()) {\n        oprot.writeDouble(struct.load);\n      }\n    }\n\n    @Override\n    public void read(org.apache.thrift.protocol.TProtocol prot, LoadSpec struct) throws org.apache.thrift.TException {\n      TTupleProtocol iprot = (TTupleProtocol) prot;\n      BitSet incoming = iprot.readBitSet(1);\n      if (incoming.get(0)) {\n        struct.load = iprot.readDouble();\n        struct.setLoadIsSet(true);\n      }\n    }\n  }\n\n}\n\n"
  },
  {
    "path": "src/main/gen-java/edu/berkeley/sparrow/thrift/NodeMonitorService.java",
    "content": "/**\n * Autogenerated by Thrift Compiler (0.8.0)\n *\n * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING\n *  @generated\n */\npackage edu.berkeley.sparrow.thrift;\n\nimport org.apache.thrift.scheme.IScheme;\nimport org.apache.thrift.scheme.SchemeFactory;\nimport org.apache.thrift.scheme.StandardScheme;\n\nimport org.apache.thrift.scheme.TupleScheme;\nimport org.apache.thrift.protocol.TTupleProtocol;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.util.HashMap;\nimport java.util.EnumMap;\nimport java.util.Set;\nimport java.util.HashSet;\nimport java.util.EnumSet;\nimport java.util.Collections;\nimport java.util.BitSet;\nimport java.nio.ByteBuffer;\nimport java.util.Arrays;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\npublic class NodeMonitorService {\n\n  public interface Iface {\n\n    public boolean registerBackend(String app, String listenSocket) throws org.apache.thrift.TException;\n\n    public void tasksFinished(List<edu.berkeley.sparrow.thrift.TFullTaskId> tasks) throws org.apache.thrift.TException;\n\n    public void sendFrontendMessage(String app, edu.berkeley.sparrow.thrift.TFullTaskId taskId, int status, ByteBuffer message) throws org.apache.thrift.TException;\n\n  }\n\n  public interface AsyncIface {\n\n    public void registerBackend(String app, String listenSocket, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.registerBackend_call> resultHandler) throws org.apache.thrift.TException;\n\n    public void tasksFinished(List<edu.berkeley.sparrow.thrift.TFullTaskId> tasks, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.tasksFinished_call> resultHandler) throws org.apache.thrift.TException;\n\n    public void sendFrontendMessage(String app, edu.berkeley.sparrow.thrift.TFullTaskId taskId, int status, ByteBuffer message, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.sendFrontendMessage_call> resultHandler) throws org.apache.thrift.TException;\n\n  }\n\n  public static class Client extends org.apache.thrift.TServiceClient implements Iface {\n    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {\n      public Factory() {}\n      public Client getClient(org.apache.thrift.protocol.TProtocol prot) {\n        return new Client(prot);\n      }\n      public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {\n        return new Client(iprot, oprot);\n      }\n    }\n\n    public Client(org.apache.thrift.protocol.TProtocol prot)\n    {\n      super(prot, prot);\n    }\n\n    public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {\n      super(iprot, oprot);\n    }\n\n    public boolean registerBackend(String app, String listenSocket) throws org.apache.thrift.TException\n    {\n      send_registerBackend(app, listenSocket);\n      return recv_registerBackend();\n    }\n\n    public void send_registerBackend(String app, String listenSocket) throws org.apache.thrift.TException\n    {\n      registerBackend_args args = new registerBackend_args();\n      args.setApp(app);\n      args.setListenSocket(listenSocket);\n      sendBase(\"registerBackend\", args);\n    }\n\n    public boolean recv_registerBackend() throws org.apache.thrift.TException\n    {\n      registerBackend_result result = new registerBackend_result();\n      receiveBase(result, \"registerBackend\");\n      if (result.isSetSuccess()) {\n        return result.success;\n      }\n      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, \"registerBackend failed: unknown result\");\n    }\n\n    public void tasksFinished(List<edu.berkeley.sparrow.thrift.TFullTaskId> tasks) throws org.apache.thrift.TException\n    {\n      send_tasksFinished(tasks);\n      recv_tasksFinished();\n    }\n\n    public void send_tasksFinished(List<edu.berkeley.sparrow.thrift.TFullTaskId> tasks) throws org.apache.thrift.TException\n    {\n      tasksFinished_args args = new tasksFinished_args();\n      args.setTasks(tasks);\n      sendBase(\"tasksFinished\", args);\n    }\n\n    public void recv_tasksFinished() throws org.apache.thrift.TException\n    {\n      tasksFinished_result result = new tasksFinished_result();\n      receiveBase(result, \"tasksFinished\");\n      return;\n    }\n\n    public void sendFrontendMessage(String app, edu.berkeley.sparrow.thrift.TFullTaskId taskId, int status, ByteBuffer message) throws org.apache.thrift.TException\n    {\n      send_sendFrontendMessage(app, taskId, status, message);\n      recv_sendFrontendMessage();\n    }\n\n    public void send_sendFrontendMessage(String app, edu.berkeley.sparrow.thrift.TFullTaskId taskId, int status, ByteBuffer message) throws org.apache.thrift.TException\n    {\n      sendFrontendMessage_args args = new sendFrontendMessage_args();\n      args.setApp(app);\n      args.setTaskId(taskId);\n      args.setStatus(status);\n      args.setMessage(message);\n      sendBase(\"sendFrontendMessage\", args);\n    }\n\n    public void recv_sendFrontendMessage() throws org.apache.thrift.TException\n    {\n      sendFrontendMessage_result result = new sendFrontendMessage_result();\n      receiveBase(result, \"sendFrontendMessage\");\n      return;\n    }\n\n  }\n  public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface {\n    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {\n      private org.apache.thrift.async.TAsyncClientManager clientManager;\n      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;\n      public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {\n        this.clientManager = clientManager;\n        this.protocolFactory = protocolFactory;\n      }\n      public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {\n        return new AsyncClient(protocolFactory, clientManager, transport);\n      }\n    }\n\n    public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {\n      super(protocolFactory, clientManager, transport);\n    }\n\n    public void registerBackend(String app, String listenSocket, org.apache.thrift.async.AsyncMethodCallback<registerBackend_call> resultHandler) throws org.apache.thrift.TException {\n      checkReady();\n      registerBackend_call method_call = new registerBackend_call(app, listenSocket, resultHandler, this, ___protocolFactory, ___transport);\n      this.___currentMethod = method_call;\n      ___manager.call(method_call);\n    }\n\n    public static class registerBackend_call extends org.apache.thrift.async.TAsyncMethodCall {\n      private String app;\n      private String listenSocket;\n      public registerBackend_call(String app, String listenSocket, org.apache.thrift.async.AsyncMethodCallback<registerBackend_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {\n        super(client, protocolFactory, transport, resultHandler, false);\n        this.app = app;\n        this.listenSocket = listenSocket;\n      }\n\n      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {\n        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage(\"registerBackend\", org.apache.thrift.protocol.TMessageType.CALL, 0));\n        registerBackend_args args = new registerBackend_args();\n        args.setApp(app);\n        args.setListenSocket(listenSocket);\n        args.write(prot);\n        prot.writeMessageEnd();\n      }\n\n      public boolean getResult() throws org.apache.thrift.TException {\n        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {\n          throw new IllegalStateException(\"Method call not finished!\");\n        }\n        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());\n        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);\n        return (new Client(prot)).recv_registerBackend();\n      }\n    }\n\n    public void tasksFinished(List<edu.berkeley.sparrow.thrift.TFullTaskId> tasks, org.apache.thrift.async.AsyncMethodCallback<tasksFinished_call> resultHandler) throws org.apache.thrift.TException {\n      checkReady();\n      tasksFinished_call method_call = new tasksFinished_call(tasks, resultHandler, this, ___protocolFactory, ___transport);\n      this.___currentMethod = method_call;\n      ___manager.call(method_call);\n    }\n\n    public static class tasksFinished_call extends org.apache.thrift.async.TAsyncMethodCall {\n      private List<edu.berkeley.sparrow.thrift.TFullTaskId> tasks;\n      public tasksFinished_call(List<edu.berkeley.sparrow.thrift.TFullTaskId> tasks, org.apache.thrift.async.AsyncMethodCallback<tasksFinished_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {\n        super(client, protocolFactory, transport, resultHandler, false);\n        this.tasks = tasks;\n      }\n\n      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {\n        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage(\"tasksFinished\", org.apache.thrift.protocol.TMessageType.CALL, 0));\n        tasksFinished_args args = new tasksFinished_args();\n        args.setTasks(tasks);\n        args.write(prot);\n        prot.writeMessageEnd();\n      }\n\n      public void getResult() throws org.apache.thrift.TException {\n        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {\n          throw new IllegalStateException(\"Method call not finished!\");\n        }\n        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());\n        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);\n        (new Client(prot)).recv_tasksFinished();\n      }\n    }\n\n    public void sendFrontendMessage(String app, edu.berkeley.sparrow.thrift.TFullTaskId taskId, int status, ByteBuffer message, org.apache.thrift.async.AsyncMethodCallback<sendFrontendMessage_call> resultHandler) throws org.apache.thrift.TException {\n      checkReady();\n      sendFrontendMessage_call method_call = new sendFrontendMessage_call(app, taskId, status, message, resultHandler, this, ___protocolFactory, ___transport);\n      this.___currentMethod = method_call;\n      ___manager.call(method_call);\n    }\n\n    public static class sendFrontendMessage_call extends org.apache.thrift.async.TAsyncMethodCall {\n      private String app;\n      private edu.berkeley.sparrow.thrift.TFullTaskId taskId;\n      private int status;\n      private ByteBuffer message;\n      public sendFrontendMessage_call(String app, edu.berkeley.sparrow.thrift.TFullTaskId taskId, int status, ByteBuffer message, org.apache.thrift.async.AsyncMethodCallback<sendFrontendMessage_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {\n        super(client, protocolFactory, transport, resultHandler, false);\n        this.app = app;\n        this.taskId = taskId;\n        this.status = status;\n        this.message = message;\n      }\n\n      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {\n        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage(\"sendFrontendMessage\", org.apache.thrift.protocol.TMessageType.CALL, 0));\n        sendFrontendMessage_args args = new sendFrontendMessage_args();\n        args.setApp(app);\n        args.setTaskId(taskId);\n        args.setStatus(status);\n        args.setMessage(message);\n        args.write(prot);\n        prot.writeMessageEnd();\n      }\n\n      public void getResult() throws org.apache.thrift.TException {\n        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {\n          throw new IllegalStateException(\"Method call not finished!\");\n        }\n        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());\n        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);\n        (new Client(prot)).recv_sendFrontendMessage();\n      }\n    }\n\n  }\n\n  public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor {\n    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());\n    public Processor(I iface) {\n      super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));\n    }\n\n    protected Processor(I iface, Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {\n      super(iface, getProcessMap(processMap));\n    }\n\n    private static <I extends Iface> Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> getProcessMap(Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {\n      processMap.put(\"registerBackend\", new registerBackend());\n      processMap.put(\"tasksFinished\", new tasksFinished());\n      processMap.put(\"sendFrontendMessage\", new sendFrontendMessage());\n      return processMap;\n    }\n\n    private static class registerBackend<I extends Iface> extends org.apache.thrift.ProcessFunction<I, registerBackend_args> {\n      public registerBackend() {\n        super(\"registerBackend\");\n      }\n\n      protected registerBackend_args getEmptyArgsInstance() {\n        return new registerBackend_args();\n      }\n\n      protected registerBackend_result getResult(I iface, registerBackend_args args) throws org.apache.thrift.TException {\n        registerBackend_result result = new registerBackend_result();\n        result.success = iface.registerBackend(args.app, args.listenSocket);\n        result.setSuccessIsSet(true);\n        return result;\n      }\n    }\n\n    private static class tasksFinished<I extends Iface> extends org.apache.thrift.ProcessFunction<I, tasksFinished_args> {\n      public tasksFinished() {\n        super(\"tasksFinished\");\n      }\n\n      protected tasksFinished_args getEmptyArgsInstance() {\n        return new tasksFinished_args();\n      }\n\n      protected tasksFinished_result getResult(I iface, tasksFinished_args args) throws org.apache.thrift.TException {\n        tasksFinished_result result = new tasksFinished_result();\n        iface.tasksFinished(args.tasks);\n        return result;\n      }\n    }\n\n    private static class sendFrontendMessage<I extends Iface> extends org.apache.thrift.ProcessFunction<I, sendFrontendMessage_args> {\n      public sendFrontendMessage() {\n        super(\"sendFrontendMessage\");\n      }\n\n      protected sendFrontendMessage_args getEmptyArgsInstance() {\n        return new sendFrontendMessage_args();\n      }\n\n      protected sendFrontendMessage_result getResult(I iface, sendFrontendMessage_args args) throws org.apache.thrift.TException {\n        sendFrontendMessage_result result = new sendFrontendMessage_result();\n        iface.sendFrontendMessage(args.app, args.taskId, args.status, args.message);\n        return result;\n      }\n    }\n\n  }\n\n  public static class registerBackend_args implements org.apache.thrift.TBase<registerBackend_args, registerBackend_args._Fields>, java.io.Serializable, Cloneable   {\n    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct(\"registerBackend_args\");\n\n    private static final org.apache.thrift.protocol.TField APP_FIELD_DESC = new org.apache.thrift.protocol.TField(\"app\", org.apache.thrift.protocol.TType.STRING, (short)1);\n    private static final org.apache.thrift.protocol.TField LISTEN_SOCKET_FIELD_DESC = new org.apache.thrift.protocol.TField(\"listenSocket\", org.apache.thrift.protocol.TType.STRING, (short)2);\n\n    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();\n    static {\n      schemes.put(StandardScheme.class, new registerBackend_argsStandardSchemeFactory());\n      schemes.put(TupleScheme.class, new registerBackend_argsTupleSchemeFactory());\n    }\n\n    public String app; // required\n    public String listenSocket; // required\n\n    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */\n    public enum _Fields implements org.apache.thrift.TFieldIdEnum {\n      APP((short)1, \"app\"),\n      LISTEN_SOCKET((short)2, \"listenSocket\");\n\n      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();\n\n      static {\n        for (_Fields field : EnumSet.allOf(_Fields.class)) {\n          byName.put(field.getFieldName(), field);\n        }\n      }\n\n      /**\n       * Find the _Fields constant that matches fieldId, or null if its not found.\n       */\n      public static _Fields findByThriftId(int fieldId) {\n        switch(fieldId) {\n          case 1: // APP\n            return APP;\n          case 2: // LISTEN_SOCKET\n            return LISTEN_SOCKET;\n          default:\n            return null;\n        }\n      }\n\n      /**\n       * Find the _Fields constant that matches fieldId, throwing an exception\n       * if it is not found.\n       */\n      public static _Fields findByThriftIdOrThrow(int fieldId) {\n        _Fields fields = findByThriftId(fieldId);\n        if (fields == null) throw new IllegalArgumentException(\"Field \" + fieldId + \" doesn't exist!\");\n        return fields;\n      }\n\n      /**\n       * Find the _Fields constant that matches name, or null if its not found.\n       */\n      public static _Fields findByName(String name) {\n        return byName.get(name);\n      }\n\n      private final short _thriftId;\n      private final String _fieldName;\n\n      _Fields(short thriftId, String fieldName) {\n        _thriftId = thriftId;\n        _fieldName = fieldName;\n      }\n\n      public short getThriftFieldId() {\n        return _thriftId;\n      }\n\n      public String getFieldName() {\n        return _fieldName;\n      }\n    }\n\n    // isset id assignments\n    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;\n    static {\n      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);\n      tmpMap.put(_Fields.APP, new org.apache.thrift.meta_data.FieldMetaData(\"app\", org.apache.thrift.TFieldRequirementType.DEFAULT, \n          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));\n      tmpMap.put(_Fields.LISTEN_SOCKET, new org.apache.thrift.meta_data.FieldMetaData(\"listenSocket\", org.apache.thrift.TFieldRequirementType.DEFAULT, \n          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));\n      metaDataMap = Collections.unmodifiableMap(tmpMap);\n      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(registerBackend_args.class, metaDataMap);\n    }\n\n    public registerBackend_args() {\n    }\n\n    public registerBackend_args(\n      String app,\n      String listenSocket)\n    {\n      this();\n      this.app = app;\n      this.listenSocket = listenSocket;\n    }\n\n    /**\n     * Performs a deep copy on <i>other</i>.\n     */\n    public registerBackend_args(registerBackend_args other) {\n      if (other.isSetApp()) {\n        this.app = other.app;\n      }\n      if (other.isSetListenSocket()) {\n        this.listenSocket = other.listenSocket;\n      }\n    }\n\n    public registerBackend_args deepCopy() {\n      return new registerBackend_args(this);\n    }\n\n    public void clear() {\n      this.app = null;\n      this.listenSocket = null;\n    }\n\n    public String getApp() {\n      return this.app;\n    }\n\n    public registerBackend_args setApp(String app) {\n      this.app = app;\n      return this;\n    }\n\n    public void unsetApp() {\n      this.app = null;\n    }\n\n    /** Returns true if field app is set (has been assigned a value) and false otherwise */\n    public boolean isSetApp() {\n      return this.app != null;\n    }\n\n    public void setAppIsSet(boolean value) {\n      if (!value) {\n        this.app = null;\n      }\n    }\n\n    public String getListenSocket() {\n      return this.listenSocket;\n    }\n\n    public registerBackend_args setListenSocket(String listenSocket) {\n      this.listenSocket = listenSocket;\n      return this;\n    }\n\n    public void unsetListenSocket() {\n      this.listenSocket = null;\n    }\n\n    /** Returns true if field listenSocket is set (has been assigned a value) and false otherwise */\n    public boolean isSetListenSocket() {\n      return this.listenSocket != null;\n    }\n\n    public void setListenSocketIsSet(boolean value) {\n      if (!value) {\n        this.listenSocket = null;\n      }\n    }\n\n    public void setFieldValue(_Fields field, Object value) {\n      switch (field) {\n      case APP:\n        if (value == null) {\n          unsetApp();\n        } else {\n          setApp((String)value);\n        }\n        break;\n\n      case LISTEN_SOCKET:\n        if (value == null) {\n          unsetListenSocket();\n        } else {\n          setListenSocket((String)value);\n        }\n        break;\n\n      }\n    }\n\n    public Object getFieldValue(_Fields field) {\n      switch (field) {\n      case APP:\n        return getApp();\n\n      case LISTEN_SOCKET:\n        return getListenSocket();\n\n      }\n      throw new IllegalStateException();\n    }\n\n    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */\n    public boolean isSet(_Fields field) {\n      if (field == null) {\n        throw new IllegalArgumentException();\n      }\n\n      switch (field) {\n      case APP:\n        return isSetApp();\n      case LISTEN_SOCKET:\n        return isSetListenSocket();\n      }\n      throw new IllegalStateException();\n    }\n\n    @Override\n    public boolean equals(Object that) {\n      if (that == null)\n        return false;\n      if (that instanceof registerBackend_args)\n        return this.equals((registerBackend_args)that);\n      return false;\n    }\n\n    public boolean equals(registerBackend_args that) {\n      if (that == null)\n        return false;\n\n      boolean this_present_app = true && this.isSetApp();\n      boolean that_present_app = true && that.isSetApp();\n      if (this_present_app || that_present_app) {\n        if (!(this_present_app && that_present_app))\n          return false;\n        if (!this.app.equals(that.app))\n          return false;\n      }\n\n      boolean this_present_listenSocket = true && this.isSetListenSocket();\n      boolean that_present_listenSocket = true && that.isSetListenSocket();\n      if (this_present_listenSocket || that_present_listenSocket) {\n        if (!(this_present_listenSocket && that_present_listenSocket))\n          return false;\n        if (!this.listenSocket.equals(that.listenSocket))\n          return false;\n      }\n\n      return true;\n    }\n\n    @Override\n    public int hashCode() {\n      return 0;\n    }\n\n    public int compareTo(registerBackend_args other) {\n      if (!getClass().equals(other.getClass())) {\n        return getClass().getName().compareTo(other.getClass().getName());\n      }\n\n      int lastComparison = 0;\n      registerBackend_args typedOther = (registerBackend_args)other;\n\n      lastComparison = Boolean.valueOf(isSetApp()).compareTo(typedOther.isSetApp());\n      if (lastComparison != 0) {\n        return lastComparison;\n      }\n      if (isSetApp()) {\n        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.app, typedOther.app);\n        if (lastComparison != 0) {\n          return lastComparison;\n        }\n      }\n      lastComparison = Boolean.valueOf(isSetListenSocket()).compareTo(typedOther.isSetListenSocket());\n      if (lastComparison != 0) {\n        return lastComparison;\n      }\n      if (isSetListenSocket()) {\n        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.listenSocket, typedOther.listenSocket);\n        if (lastComparison != 0) {\n          return lastComparison;\n        }\n      }\n      return 0;\n    }\n\n    public _Fields fieldForId(int fieldId) {\n      return _Fields.findByThriftId(fieldId);\n    }\n\n    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {\n      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);\n    }\n\n    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {\n      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);\n    }\n\n    @Override\n    public String toString() {\n      StringBuilder sb = new StringBuilder(\"registerBackend_args(\");\n      boolean first = true;\n\n      sb.append(\"app:\");\n      if (this.app == null) {\n        sb.append(\"null\");\n      } else {\n        sb.append(this.app);\n      }\n      first = false;\n      if (!first) sb.append(\", \");\n      sb.append(\"listenSocket:\");\n      if (this.listenSocket == null) {\n        sb.append(\"null\");\n      } else {\n        sb.append(this.listenSocket);\n      }\n      first = false;\n      sb.append(\")\");\n      return sb.toString();\n    }\n\n    public void validate() throws org.apache.thrift.TException {\n      // check for required fields\n    }\n\n    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {\n      try {\n        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));\n      } catch (org.apache.thrift.TException te) {\n        throw new java.io.IOException(te.getMessage());\n      }\n    }\n\n    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {\n      try {\n        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));\n      } catch (org.apache.thrift.TException te) {\n        throw new java.io.IOException(te.getMessage());\n      }\n    }\n\n    private static class registerBackend_argsStandardSchemeFactory implements SchemeFactory {\n      public registerBackend_argsStandardScheme getScheme() {\n        return new registerBackend_argsStandardScheme();\n      }\n    }\n\n    private static class registerBackend_argsStandardScheme extends StandardScheme<registerBackend_args> {\n\n      public void read(org.apache.thrift.protocol.TProtocol iprot, registerBackend_args struct) throws org.apache.thrift.TException {\n        org.apache.thrift.protocol.TField schemeField;\n        iprot.readStructBegin();\n        while (true)\n        {\n          schemeField = iprot.readFieldBegin();\n          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { \n            break;\n          }\n          switch (schemeField.id) {\n            case 1: // APP\n              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {\n                struct.app = iprot.readString();\n                struct.setAppIsSet(true);\n              } else { \n                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n              }\n              break;\n            case 2: // LISTEN_SOCKET\n              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {\n                struct.listenSocket = iprot.readString();\n                struct.setListenSocketIsSet(true);\n              } else { \n                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n              }\n              break;\n            default:\n              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n          }\n          iprot.readFieldEnd();\n        }\n        iprot.readStructEnd();\n\n        // check for required fields of primitive type, which can't be checked in the validate method\n        struct.validate();\n      }\n\n      public void write(org.apache.thrift.protocol.TProtocol oprot, registerBackend_args struct) throws org.apache.thrift.TException {\n        struct.validate();\n\n        oprot.writeStructBegin(STRUCT_DESC);\n        if (struct.app != null) {\n          oprot.writeFieldBegin(APP_FIELD_DESC);\n          oprot.writeString(struct.app);\n          oprot.writeFieldEnd();\n        }\n        if (struct.listenSocket != null) {\n          oprot.writeFieldBegin(LISTEN_SOCKET_FIELD_DESC);\n          oprot.writeString(struct.listenSocket);\n          oprot.writeFieldEnd();\n        }\n        oprot.writeFieldStop();\n        oprot.writeStructEnd();\n      }\n\n    }\n\n    private static class registerBackend_argsTupleSchemeFactory implements SchemeFactory {\n      public registerBackend_argsTupleScheme getScheme() {\n        return new registerBackend_argsTupleScheme();\n      }\n    }\n\n    private static class registerBackend_argsTupleScheme extends TupleScheme<registerBackend_args> {\n\n      @Override\n      public void write(org.apache.thrift.protocol.TProtocol prot, registerBackend_args struct) throws org.apache.thrift.TException {\n        TTupleProtocol oprot = (TTupleProtocol) prot;\n        BitSet optionals = new BitSet();\n        if (struct.isSetApp()) {\n          optionals.set(0);\n        }\n        if (struct.isSetListenSocket()) {\n          optionals.set(1);\n        }\n        oprot.writeBitSet(optionals, 2);\n        if (struct.isSetApp()) {\n          oprot.writeString(struct.app);\n        }\n        if (struct.isSetListenSocket()) {\n          oprot.writeString(struct.listenSocket);\n        }\n      }\n\n      @Override\n      public void read(org.apache.thrift.protocol.TProtocol prot, registerBackend_args struct) throws org.apache.thrift.TException {\n        TTupleProtocol iprot = (TTupleProtocol) prot;\n        BitSet incoming = iprot.readBitSet(2);\n        if (incoming.get(0)) {\n          struct.app = iprot.readString();\n          struct.setAppIsSet(true);\n        }\n        if (incoming.get(1)) {\n          struct.listenSocket = iprot.readString();\n          struct.setListenSocketIsSet(true);\n        }\n      }\n    }\n\n  }\n\n  public static class registerBackend_result implements org.apache.thrift.TBase<registerBackend_result, registerBackend_result._Fields>, java.io.Serializable, Cloneable   {\n    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct(\"registerBackend_result\");\n\n    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField(\"success\", org.apache.thrift.protocol.TType.BOOL, (short)0);\n\n    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();\n    static {\n      schemes.put(StandardScheme.class, new registerBackend_resultStandardSchemeFactory());\n      schemes.put(TupleScheme.class, new registerBackend_resultTupleSchemeFactory());\n    }\n\n    public boolean success; // required\n\n    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */\n    public enum _Fields implements org.apache.thrift.TFieldIdEnum {\n      SUCCESS((short)0, \"success\");\n\n      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();\n\n      static {\n        for (_Fields field : EnumSet.allOf(_Fields.class)) {\n          byName.put(field.getFieldName(), field);\n        }\n      }\n\n      /**\n       * Find the _Fields constant that matches fieldId, or null if its not found.\n       */\n      public static _Fields findByThriftId(int fieldId) {\n        switch(fieldId) {\n          case 0: // SUCCESS\n            return SUCCESS;\n          default:\n            return null;\n        }\n      }\n\n      /**\n       * Find the _Fields constant that matches fieldId, throwing an exception\n       * if it is not found.\n       */\n      public static _Fields findByThriftIdOrThrow(int fieldId) {\n        _Fields fields = findByThriftId(fieldId);\n        if (fields == null) throw new IllegalArgumentException(\"Field \" + fieldId + \" doesn't exist!\");\n        return fields;\n      }\n\n      /**\n       * Find the _Fields constant that matches name, or null if its not found.\n       */\n      public static _Fields findByName(String name) {\n        return byName.get(name);\n      }\n\n      private final short _thriftId;\n      private final String _fieldName;\n\n      _Fields(short thriftId, String fieldName) {\n        _thriftId = thriftId;\n        _fieldName = fieldName;\n      }\n\n      public short getThriftFieldId() {\n        return _thriftId;\n      }\n\n      public String getFieldName() {\n        return _fieldName;\n      }\n    }\n\n    // isset id assignments\n    private static final int __SUCCESS_ISSET_ID = 0;\n    private BitSet __isset_bit_vector = new BitSet(1);\n    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;\n    static {\n      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);\n      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData(\"success\", org.apache.thrift.TFieldRequirementType.DEFAULT, \n          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));\n      metaDataMap = Collections.unmodifiableMap(tmpMap);\n      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(registerBackend_result.class, metaDataMap);\n    }\n\n    public registerBackend_result() {\n    }\n\n    public registerBackend_result(\n      boolean success)\n    {\n      this();\n      this.success = success;\n      setSuccessIsSet(true);\n    }\n\n    /**\n     * Performs a deep copy on <i>other</i>.\n     */\n    public registerBackend_result(registerBackend_result other) {\n      __isset_bit_vector.clear();\n      __isset_bit_vector.or(other.__isset_bit_vector);\n      this.success = other.success;\n    }\n\n    public registerBackend_result deepCopy() {\n      return new registerBackend_result(this);\n    }\n\n    public void clear() {\n      setSuccessIsSet(false);\n      this.success = false;\n    }\n\n    public boolean isSuccess() {\n      return this.success;\n    }\n\n    public registerBackend_result setSuccess(boolean success) {\n      this.success = success;\n      setSuccessIsSet(true);\n      return this;\n    }\n\n    public void unsetSuccess() {\n      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);\n    }\n\n    /** Returns true if field success is set (has been assigned a value) and false otherwise */\n    public boolean isSetSuccess() {\n      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);\n    }\n\n    public void setSuccessIsSet(boolean value) {\n      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);\n    }\n\n    public void setFieldValue(_Fields field, Object value) {\n      switch (field) {\n      case SUCCESS:\n        if (value == null) {\n          unsetSuccess();\n        } else {\n          setSuccess((Boolean)value);\n        }\n        break;\n\n      }\n    }\n\n    public Object getFieldValue(_Fields field) {\n      switch (field) {\n      case SUCCESS:\n        return Boolean.valueOf(isSuccess());\n\n      }\n      throw new IllegalStateException();\n    }\n\n    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */\n    public boolean isSet(_Fields field) {\n      if (field == null) {\n        throw new IllegalArgumentException();\n      }\n\n      switch (field) {\n      case SUCCESS:\n        return isSetSuccess();\n      }\n      throw new IllegalStateException();\n    }\n\n    @Override\n    public boolean equals(Object that) {\n      if (that == null)\n        return false;\n      if (that instanceof registerBackend_result)\n        return this.equals((registerBackend_result)that);\n      return false;\n    }\n\n    public boolean equals(registerBackend_result that) {\n      if (that == null)\n        return false;\n\n      boolean this_present_success = true;\n      boolean that_present_success = true;\n      if (this_present_success || that_present_success) {\n        if (!(this_present_success && that_present_success))\n          return false;\n        if (this.success != that.success)\n          return false;\n      }\n\n      return true;\n    }\n\n    @Override\n    public int hashCode() {\n      return 0;\n    }\n\n    public int compareTo(registerBackend_result other) {\n      if (!getClass().equals(other.getClass())) {\n        return getClass().getName().compareTo(other.getClass().getName());\n      }\n\n      int lastComparison = 0;\n      registerBackend_result typedOther = (registerBackend_result)other;\n\n      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());\n      if (lastComparison != 0) {\n        return lastComparison;\n      }\n      if (isSetSuccess()) {\n        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);\n        if (lastComparison != 0) {\n          return lastComparison;\n        }\n      }\n      return 0;\n    }\n\n    public _Fields fieldForId(int fieldId) {\n      return _Fields.findByThriftId(fieldId);\n    }\n\n    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {\n      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);\n    }\n\n    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {\n      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);\n      }\n\n    @Override\n    public String toString() {\n      StringBuilder sb = new StringBuilder(\"registerBackend_result(\");\n      boolean first = true;\n\n      sb.append(\"success:\");\n      sb.append(this.success);\n      first = false;\n      sb.append(\")\");\n      return sb.toString();\n    }\n\n    public void validate() throws org.apache.thrift.TException {\n      // check for required fields\n    }\n\n    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {\n      try {\n        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));\n      } catch (org.apache.thrift.TException te) {\n        throw new java.io.IOException(te.getMessage());\n      }\n    }\n\n    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {\n      try {\n        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.\n        __isset_bit_vector = new BitSet(1);\n        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));\n      } catch (org.apache.thrift.TException te) {\n        throw new java.io.IOException(te.getMessage());\n      }\n    }\n\n    private static class registerBackend_resultStandardSchemeFactory implements SchemeFactory {\n      public registerBackend_resultStandardScheme getScheme() {\n        return new registerBackend_resultStandardScheme();\n      }\n    }\n\n    private static class registerBackend_resultStandardScheme extends StandardScheme<registerBackend_result> {\n\n      public void read(org.apache.thrift.protocol.TProtocol iprot, registerBackend_result struct) throws org.apache.thrift.TException {\n        org.apache.thrift.protocol.TField schemeField;\n        iprot.readStructBegin();\n        while (true)\n        {\n          schemeField = iprot.readFieldBegin();\n          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { \n            break;\n          }\n          switch (schemeField.id) {\n            case 0: // SUCCESS\n              if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {\n                struct.success = iprot.readBool();\n                struct.setSuccessIsSet(true);\n              } else { \n                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n              }\n              break;\n            default:\n              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n          }\n          iprot.readFieldEnd();\n        }\n        iprot.readStructEnd();\n\n        // check for required fields of primitive type, which can't be checked in the validate method\n        struct.validate();\n      }\n\n      public void write(org.apache.thrift.protocol.TProtocol oprot, registerBackend_result struct) throws org.apache.thrift.TException {\n        struct.validate();\n\n        oprot.writeStructBegin(STRUCT_DESC);\n        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);\n        oprot.writeBool(struct.success);\n        oprot.writeFieldEnd();\n        oprot.writeFieldStop();\n        oprot.writeStructEnd();\n      }\n\n    }\n\n    private static class registerBackend_resultTupleSchemeFactory implements SchemeFactory {\n      public registerBackend_resultTupleScheme getScheme() {\n        return new registerBackend_resultTupleScheme();\n      }\n    }\n\n    private static class registerBackend_resultTupleScheme extends TupleScheme<registerBackend_result> {\n\n      @Override\n      public void write(org.apache.thrift.protocol.TProtocol prot, registerBackend_result struct) throws org.apache.thrift.TException {\n        TTupleProtocol oprot = (TTupleProtocol) prot;\n        BitSet optionals = new BitSet();\n        if (struct.isSetSuccess()) {\n          optionals.set(0);\n        }\n        oprot.writeBitSet(optionals, 1);\n        if (struct.isSetSuccess()) {\n          oprot.writeBool(struct.success);\n        }\n      }\n\n      @Override\n      public void read(org.apache.thrift.protocol.TProtocol prot, registerBackend_result struct) throws org.apache.thrift.TException {\n        TTupleProtocol iprot = (TTupleProtocol) prot;\n        BitSet incoming = iprot.readBitSet(1);\n        if (incoming.get(0)) {\n          struct.success = iprot.readBool();\n          struct.setSuccessIsSet(true);\n        }\n      }\n    }\n\n  }\n\n  public static class tasksFinished_args implements org.apache.thrift.TBase<tasksFinished_args, tasksFinished_args._Fields>, java.io.Serializable, Cloneable   {\n    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct(\"tasksFinished_args\");\n\n    private static final org.apache.thrift.protocol.TField TASKS_FIELD_DESC = new org.apache.thrift.protocol.TField(\"tasks\", org.apache.thrift.protocol.TType.LIST, (short)1);\n\n    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();\n    static {\n      schemes.put(StandardScheme.class, new tasksFinished_argsStandardSchemeFactory());\n      schemes.put(TupleScheme.class, new tasksFinished_argsTupleSchemeFactory());\n    }\n\n    public List<edu.berkeley.sparrow.thrift.TFullTaskId> tasks; // required\n\n    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */\n    public enum _Fields implements org.apache.thrift.TFieldIdEnum {\n      TASKS((short)1, \"tasks\");\n\n      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();\n\n      static {\n        for (_Fields field : EnumSet.allOf(_Fields.class)) {\n          byName.put(field.getFieldName(), field);\n        }\n      }\n\n      /**\n       * Find the _Fields constant that matches fieldId, or null if its not found.\n       */\n      public static _Fields findByThriftId(int fieldId) {\n        switch(fieldId) {\n          case 1: // TASKS\n            return TASKS;\n          default:\n            return null;\n        }\n      }\n\n      /**\n       * Find the _Fields constant that matches fieldId, throwing an exception\n       * if it is not found.\n       */\n      public static _Fields findByThriftIdOrThrow(int fieldId) {\n        _Fields fields = findByThriftId(fieldId);\n        if (fields == null) throw new IllegalArgumentException(\"Field \" + fieldId + \" doesn't exist!\");\n        return fields;\n      }\n\n      /**\n       * Find the _Fields constant that matches name, or null if its not found.\n       */\n      public static _Fields findByName(String name) {\n        return byName.get(name);\n      }\n\n      private final short _thriftId;\n      private final String _fieldName;\n\n      _Fields(short thriftId, String fieldName) {\n        _thriftId = thriftId;\n        _fieldName = fieldName;\n      }\n\n      public short getThriftFieldId() {\n        return _thriftId;\n      }\n\n      public String getFieldName() {\n        return _fieldName;\n      }\n    }\n\n    // isset id assignments\n    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;\n    static {\n      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);\n      tmpMap.put(_Fields.TASKS, new org.apache.thrift.meta_data.FieldMetaData(\"tasks\", org.apache.thrift.TFieldRequirementType.DEFAULT, \n          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, \n              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, edu.berkeley.sparrow.thrift.TFullTaskId.class))));\n      metaDataMap = Collections.unmodifiableMap(tmpMap);\n      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(tasksFinished_args.class, metaDataMap);\n    }\n\n    public tasksFinished_args() {\n    }\n\n    public tasksFinished_args(\n      List<edu.berkeley.sparrow.thrift.TFullTaskId> tasks)\n    {\n      this();\n      this.tasks = tasks;\n    }\n\n    /**\n     * Performs a deep copy on <i>other</i>.\n     */\n    public tasksFinished_args(tasksFinished_args other) {\n      if (other.isSetTasks()) {\n        List<edu.berkeley.sparrow.thrift.TFullTaskId> __this__tasks = new ArrayList<edu.berkeley.sparrow.thrift.TFullTaskId>();\n        for (edu.berkeley.sparrow.thrift.TFullTaskId other_element : other.tasks) {\n          __this__tasks.add(new edu.berkeley.sparrow.thrift.TFullTaskId(other_element));\n        }\n        this.tasks = __this__tasks;\n      }\n    }\n\n    public tasksFinished_args deepCopy() {\n      return new tasksFinished_args(this);\n    }\n\n    public void clear() {\n      this.tasks = null;\n    }\n\n    public int getTasksSize() {\n      return (this.tasks == null) ? 0 : this.tasks.size();\n    }\n\n    public java.util.Iterator<edu.berkeley.sparrow.thrift.TFullTaskId> getTasksIterator() {\n      return (this.tasks == null) ? null : this.tasks.iterator();\n    }\n\n    public void addToTasks(edu.berkeley.sparrow.thrift.TFullTaskId elem) {\n      if (this.tasks == null) {\n        this.tasks = new ArrayList<edu.berkeley.sparrow.thrift.TFullTaskId>();\n      }\n      this.tasks.add(elem);\n    }\n\n    public List<edu.berkeley.sparrow.thrift.TFullTaskId> getTasks() {\n      return this.tasks;\n    }\n\n    public tasksFinished_args setTasks(List<edu.berkeley.sparrow.thrift.TFullTaskId> tasks) {\n      this.tasks = tasks;\n      return this;\n    }\n\n    public void unsetTasks() {\n      this.tasks = null;\n    }\n\n    /** Returns true if field tasks is set (has been assigned a value) and false otherwise */\n    public boolean isSetTasks() {\n      return this.tasks != null;\n    }\n\n    public void setTasksIsSet(boolean value) {\n      if (!value) {\n        this.tasks = null;\n      }\n    }\n\n    public void setFieldValue(_Fields field, Object value) {\n      switch (field) {\n      case TASKS:\n        if (value == null) {\n          unsetTasks();\n        } else {\n          setTasks((List<edu.berkeley.sparrow.thrift.TFullTaskId>)value);\n        }\n        break;\n\n      }\n    }\n\n    public Object getFieldValue(_Fields field) {\n      switch (field) {\n      case TASKS:\n        return getTasks();\n\n      }\n      throw new IllegalStateException();\n    }\n\n    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */\n    public boolean isSet(_Fields field) {\n      if (field == null) {\n        throw new IllegalArgumentException();\n      }\n\n      switch (field) {\n      case TASKS:\n        return isSetTasks();\n      }\n      throw new IllegalStateException();\n    }\n\n    @Override\n    public boolean equals(Object that) {\n      if (that == null)\n        return false;\n      if (that instanceof tasksFinished_args)\n        return this.equals((tasksFinished_args)that);\n      return false;\n    }\n\n    public boolean equals(tasksFinished_args that) {\n      if (that == null)\n        return false;\n\n      boolean this_present_tasks = true && this.isSetTasks();\n      boolean that_present_tasks = true && that.isSetTasks();\n      if (this_present_tasks || that_present_tasks) {\n        if (!(this_present_tasks && that_present_tasks))\n          return false;\n        if (!this.tasks.equals(that.tasks))\n          return false;\n      }\n\n      return true;\n    }\n\n    @Override\n    public int hashCode() {\n      return 0;\n    }\n\n    public int compareTo(tasksFinished_args other) {\n      if (!getClass().equals(other.getClass())) {\n        return getClass().getName().compareTo(other.getClass().getName());\n      }\n\n      int lastComparison = 0;\n      tasksFinished_args typedOther = (tasksFinished_args)other;\n\n      lastComparison = Boolean.valueOf(isSetTasks()).compareTo(typedOther.isSetTasks());\n      if (lastComparison != 0) {\n        return lastComparison;\n      }\n      if (isSetTasks()) {\n        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tasks, typedOther.tasks);\n        if (lastComparison != 0) {\n          return lastComparison;\n        }\n      }\n      return 0;\n    }\n\n    public _Fields fieldForId(int fieldId) {\n      return _Fields.findByThriftId(fieldId);\n    }\n\n    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {\n      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);\n    }\n\n    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {\n      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);\n    }\n\n    @Override\n    public String toString() {\n      StringBuilder sb = new StringBuilder(\"tasksFinished_args(\");\n      boolean first = true;\n\n      sb.append(\"tasks:\");\n      if (this.tasks == null) {\n        sb.append(\"null\");\n      } else {\n        sb.append(this.tasks);\n      }\n      first = false;\n      sb.append(\")\");\n      return sb.toString();\n    }\n\n    public void validate() throws org.apache.thrift.TException {\n      // check for required fields\n    }\n\n    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {\n      try {\n        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));\n      } catch (org.apache.thrift.TException te) {\n        throw new java.io.IOException(te.getMessage());\n      }\n    }\n\n    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {\n      try {\n        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));\n      } catch (org.apache.thrift.TException te) {\n        throw new java.io.IOException(te.getMessage());\n      }\n    }\n\n    private static class tasksFinished_argsStandardSchemeFactory implements SchemeFactory {\n      public tasksFinished_argsStandardScheme getScheme() {\n        return new tasksFinished_argsStandardScheme();\n      }\n    }\n\n    private static class tasksFinished_argsStandardScheme extends StandardScheme<tasksFinished_args> {\n\n      public void read(org.apache.thrift.protocol.TProtocol iprot, tasksFinished_args struct) throws org.apache.thrift.TException {\n        org.apache.thrift.protocol.TField schemeField;\n        iprot.readStructBegin();\n        while (true)\n        {\n          schemeField = iprot.readFieldBegin();\n          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { \n            break;\n          }\n          switch (schemeField.id) {\n            case 1: // TASKS\n              if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {\n                {\n                  org.apache.thrift.protocol.TList _list8 = iprot.readListBegin();\n                  struct.tasks = new ArrayList<edu.berkeley.sparrow.thrift.TFullTaskId>(_list8.size);\n                  for (int _i9 = 0; _i9 < _list8.size; ++_i9)\n                  {\n                    edu.berkeley.sparrow.thrift.TFullTaskId _elem10; // required\n                    _elem10 = new edu.berkeley.sparrow.thrift.TFullTaskId();\n                    _elem10.read(iprot);\n                    struct.tasks.add(_elem10);\n                  }\n                  iprot.readListEnd();\n                }\n                struct.setTasksIsSet(true);\n              } else { \n                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n              }\n              break;\n            default:\n              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n          }\n          iprot.readFieldEnd();\n        }\n        iprot.readStructEnd();\n\n        // check for required fields of primitive type, which can't be checked in the validate method\n        struct.validate();\n      }\n\n      public void write(org.apache.thrift.protocol.TProtocol oprot, tasksFinished_args struct) throws org.apache.thrift.TException {\n        struct.validate();\n\n        oprot.writeStructBegin(STRUCT_DESC);\n        if (struct.tasks != null) {\n          oprot.writeFieldBegin(TASKS_FIELD_DESC);\n          {\n            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.tasks.size()));\n            for (edu.berkeley.sparrow.thrift.TFullTaskId _iter11 : struct.tasks)\n            {\n              _iter11.write(oprot);\n            }\n            oprot.writeListEnd();\n          }\n          oprot.writeFieldEnd();\n        }\n        oprot.writeFieldStop();\n        oprot.writeStructEnd();\n      }\n\n    }\n\n    private static class tasksFinished_argsTupleSchemeFactory implements SchemeFactory {\n      public tasksFinished_argsTupleScheme getScheme() {\n        return new tasksFinished_argsTupleScheme();\n      }\n    }\n\n    private static class tasksFinished_argsTupleScheme extends TupleScheme<tasksFinished_args> {\n\n      @Override\n      public void write(org.apache.thrift.protocol.TProtocol prot, tasksFinished_args struct) throws org.apache.thrift.TException {\n        TTupleProtocol oprot = (TTupleProtocol) prot;\n        BitSet optionals = new BitSet();\n        if (struct.isSetTasks()) {\n          optionals.set(0);\n        }\n        oprot.writeBitSet(optionals, 1);\n        if (struct.isSetTasks()) {\n          {\n            oprot.writeI32(struct.tasks.size());\n            for (edu.berkeley.sparrow.thrift.TFullTaskId _iter12 : struct.tasks)\n            {\n              _iter12.write(oprot);\n            }\n          }\n        }\n      }\n\n      @Override\n      public void read(org.apache.thrift.protocol.TProtocol prot, tasksFinished_args struct) throws org.apache.thrift.TException {\n        TTupleProtocol iprot = (TTupleProtocol) prot;\n        BitSet incoming = iprot.readBitSet(1);\n        if (incoming.get(0)) {\n          {\n            org.apache.thrift.protocol.TList _list13 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());\n            struct.tasks = new ArrayList<edu.berkeley.sparrow.thrift.TFullTaskId>(_list13.size);\n            for (int _i14 = 0; _i14 < _list13.size; ++_i14)\n            {\n              edu.berkeley.sparrow.thrift.TFullTaskId _elem15; // required\n              _elem15 = new edu.berkeley.sparrow.thrift.TFullTaskId();\n              _elem15.read(iprot);\n              struct.tasks.add(_elem15);\n            }\n          }\n          struct.setTasksIsSet(true);\n        }\n      }\n    }\n\n  }\n\n  public static class tasksFinished_result implements org.apache.thrift.TBase<tasksFinished_result, tasksFinished_result._Fields>, java.io.Serializable, Cloneable   {\n    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct(\"tasksFinished_result\");\n\n\n    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();\n    static {\n      schemes.put(StandardScheme.class, new tasksFinished_resultStandardSchemeFactory());\n      schemes.put(TupleScheme.class, new tasksFinished_resultTupleSchemeFactory());\n    }\n\n\n    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */\n    public enum _Fields implements org.apache.thrift.TFieldIdEnum {\n;\n\n      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();\n\n      static {\n        for (_Fields field : EnumSet.allOf(_Fields.class)) {\n          byName.put(field.getFieldName(), field);\n        }\n      }\n\n      /**\n       * Find the _Fields constant that matches fieldId, or null if its not found.\n       */\n      public static _Fields findByThriftId(int fieldId) {\n        switch(fieldId) {\n          default:\n            return null;\n        }\n      }\n\n      /**\n       * Find the _Fields constant that matches fieldId, throwing an exception\n       * if it is not found.\n       */\n      public static _Fields findByThriftIdOrThrow(int fieldId) {\n        _Fields fields = findByThriftId(fieldId);\n        if (fields == null) throw new IllegalArgumentException(\"Field \" + fieldId + \" doesn't exist!\");\n        return fields;\n      }\n\n      /**\n       * Find the _Fields constant that matches name, or null if its not found.\n       */\n      public static _Fields findByName(String name) {\n        return byName.get(name);\n      }\n\n      private final short _thriftId;\n      private final String _fieldName;\n\n      _Fields(short thriftId, String fieldName) {\n        _thriftId = thriftId;\n        _fieldName = fieldName;\n      }\n\n      public short getThriftFieldId() {\n        return _thriftId;\n      }\n\n      public String getFieldName() {\n        return _fieldName;\n      }\n    }\n    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;\n    static {\n      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);\n      metaDataMap = Collections.unmodifiableMap(tmpMap);\n      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(tasksFinished_result.class, metaDataMap);\n    }\n\n    public tasksFinished_result() {\n    }\n\n    /**\n     * Performs a deep copy on <i>other</i>.\n     */\n    public tasksFinished_result(tasksFinished_result other) {\n    }\n\n    public tasksFinished_result deepCopy() {\n      return new tasksFinished_result(this);\n    }\n\n    public void clear() {\n    }\n\n    public void setFieldValue(_Fields field, Object value) {\n      switch (field) {\n      }\n    }\n\n    public Object getFieldValue(_Fields field) {\n      switch (field) {\n      }\n      throw new IllegalStateException();\n    }\n\n    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */\n    public boolean isSet(_Fields field) {\n      if (field == null) {\n        throw new IllegalArgumentException();\n      }\n\n      switch (field) {\n      }\n      throw new IllegalStateException();\n    }\n\n    @Override\n    public boolean equals(Object that) {\n      if (that == null)\n        return false;\n      if (that instanceof tasksFinished_result)\n        return this.equals((tasksFinished_result)that);\n      return false;\n    }\n\n    public boolean equals(tasksFinished_result that) {\n      if (that == null)\n        return false;\n\n      return true;\n    }\n\n    @Override\n    public int hashCode() {\n      return 0;\n    }\n\n    public int compareTo(tasksFinished_result other) {\n      if (!getClass().equals(other.getClass())) {\n        return getClass().getName().compareTo(other.getClass().getName());\n      }\n\n      int lastComparison = 0;\n      tasksFinished_result typedOther = (tasksFinished_result)other;\n\n      return 0;\n    }\n\n    public _Fields fieldForId(int fieldId) {\n      return _Fields.findByThriftId(fieldId);\n    }\n\n    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {\n      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);\n    }\n\n    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {\n      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);\n      }\n\n    @Override\n    public String toString() {\n      StringBuilder sb = new StringBuilder(\"tasksFinished_result(\");\n      boolean first = true;\n\n      sb.append(\")\");\n      return sb.toString();\n    }\n\n    public void validate() throws org.apache.thrift.TException {\n      // check for required fields\n    }\n\n    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {\n      try {\n        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));\n      } catch (org.apache.thrift.TException te) {\n        throw new java.io.IOException(te.getMessage());\n      }\n    }\n\n    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {\n      try {\n        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));\n      } catch (org.apache.thrift.TException te) {\n        throw new java.io.IOException(te.getMessage());\n      }\n    }\n\n    private static class tasksFinished_resultStandardSchemeFactory implements SchemeFactory {\n      public tasksFinished_resultStandardScheme getScheme() {\n        return new tasksFinished_resultStandardScheme();\n      }\n    }\n\n    private static class tasksFinished_resultStandardScheme extends StandardScheme<tasksFinished_result> {\n\n      public void read(org.apache.thrift.protocol.TProtocol iprot, tasksFinished_result struct) throws org.apache.thrift.TException {\n        org.apache.thrift.protocol.TField schemeField;\n        iprot.readStructBegin();\n        while (true)\n        {\n          schemeField = iprot.readFieldBegin();\n          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { \n            break;\n          }\n          switch (schemeField.id) {\n            default:\n              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n          }\n          iprot.readFieldEnd();\n        }\n        iprot.readStructEnd();\n\n        // check for required fields of primitive type, which can't be checked in the validate method\n        struct.validate();\n      }\n\n      public void write(org.apache.thrift.protocol.TProtocol oprot, tasksFinished_result struct) throws org.apache.thrift.TException {\n        struct.validate();\n\n        oprot.writeStructBegin(STRUCT_DESC);\n        oprot.writeFieldStop();\n        oprot.writeStructEnd();\n      }\n\n    }\n\n    private static class tasksFinished_resultTupleSchemeFactory implements SchemeFactory {\n      public tasksFinished_resultTupleScheme getScheme() {\n        return new tasksFinished_resultTupleScheme();\n      }\n    }\n\n    private static class tasksFinished_resultTupleScheme extends TupleScheme<tasksFinished_result> {\n\n      @Override\n      public void write(org.apache.thrift.protocol.TProtocol prot, tasksFinished_result struct) throws org.apache.thrift.TException {\n        TTupleProtocol oprot = (TTupleProtocol) prot;\n      }\n\n      @Override\n      public void read(org.apache.thrift.protocol.TProtocol prot, tasksFinished_result struct) throws org.apache.thrift.TException {\n        TTupleProtocol iprot = (TTupleProtocol) prot;\n      }\n    }\n\n  }\n\n  public static class sendFrontendMessage_args implements org.apache.thrift.TBase<sendFrontendMessage_args, sendFrontendMessage_args._Fields>, java.io.Serializable, Cloneable   {\n    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct(\"sendFrontendMessage_args\");\n\n    private static final org.apache.thrift.protocol.TField APP_FIELD_DESC = new org.apache.thrift.protocol.TField(\"app\", org.apache.thrift.protocol.TType.STRING, (short)1);\n    private static final org.apache.thrift.protocol.TField TASK_ID_FIELD_DESC = new org.apache.thrift.protocol.TField(\"taskId\", org.apache.thrift.protocol.TType.STRUCT, (short)2);\n    private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField(\"status\", org.apache.thrift.protocol.TType.I32, (short)3);\n    private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField(\"message\", org.apache.thrift.protocol.TType.STRING, (short)4);\n\n    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();\n    static {\n      schemes.put(StandardScheme.class, new sendFrontendMessage_argsStandardSchemeFactory());\n      schemes.put(TupleScheme.class, new sendFrontendMessage_argsTupleSchemeFactory());\n    }\n\n    public String app; // required\n    public edu.berkeley.sparrow.thrift.TFullTaskId taskId; // required\n    public int status; // required\n    public ByteBuffer message; // required\n\n    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */\n    public enum _Fields implements org.apache.thrift.TFieldIdEnum {\n      APP((short)1, \"app\"),\n      TASK_ID((short)2, \"taskId\"),\n      STATUS((short)3, \"status\"),\n      MESSAGE((short)4, \"message\");\n\n      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();\n\n      static {\n        for (_Fields field : EnumSet.allOf(_Fields.class)) {\n          byName.put(field.getFieldName(), field);\n        }\n      }\n\n      /**\n       * Find the _Fields constant that matches fieldId, or null if its not found.\n       */\n      public static _Fields findByThriftId(int fieldId) {\n        switch(fieldId) {\n          case 1: // APP\n            return APP;\n          case 2: // TASK_ID\n            return TASK_ID;\n          case 3: // STATUS\n            return STATUS;\n          case 4: // MESSAGE\n            return MESSAGE;\n          default:\n            return null;\n        }\n      }\n\n      /**\n       * Find the _Fields constant that matches fieldId, throwing an exception\n       * if it is not found.\n       */\n      public static _Fields findByThriftIdOrThrow(int fieldId) {\n        _Fields fields = findByThriftId(fieldId);\n        if (fields == null) throw new IllegalArgumentException(\"Field \" + fieldId + \" doesn't exist!\");\n        return fields;\n      }\n\n      /**\n       * Find the _Fields constant that matches name, or null if its not found.\n       */\n      public static _Fields findByName(String name) {\n        return byName.get(name);\n      }\n\n      private final short _thriftId;\n      private final String _fieldName;\n\n      _Fields(short thriftId, String fieldName) {\n        _thriftId = thriftId;\n        _fieldName = fieldName;\n      }\n\n      public short getThriftFieldId() {\n        return _thriftId;\n      }\n\n      public String getFieldName() {\n        return _fieldName;\n      }\n    }\n\n    // isset id assignments\n    private static final int __STATUS_ISSET_ID = 0;\n    private BitSet __isset_bit_vector = new BitSet(1);\n    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;\n    static {\n      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);\n      tmpMap.put(_Fields.APP, new org.apache.thrift.meta_data.FieldMetaData(\"app\", org.apache.thrift.TFieldRequirementType.DEFAULT, \n          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));\n      tmpMap.put(_Fields.TASK_ID, new org.apache.thrift.meta_data.FieldMetaData(\"taskId\", org.apache.thrift.TFieldRequirementType.DEFAULT, \n          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, edu.berkeley.sparrow.thrift.TFullTaskId.class)));\n      tmpMap.put(_Fields.STATUS, new org.apache.thrift.meta_data.FieldMetaData(\"status\", org.apache.thrift.TFieldRequirementType.DEFAULT, \n          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));\n      tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData(\"message\", org.apache.thrift.TFieldRequirementType.DEFAULT, \n          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING          , true)));\n      metaDataMap = Collections.unmodifiableMap(tmpMap);\n      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(sendFrontendMessage_args.class, metaDataMap);\n    }\n\n    public sendFrontendMessage_args() {\n    }\n\n    public sendFrontendMessage_args(\n      String app,\n      edu.berkeley.sparrow.thrift.TFullTaskId taskId,\n      int status,\n      ByteBuffer message)\n    {\n      this();\n      this.app = app;\n      this.taskId = taskId;\n      this.status = status;\n      setStatusIsSet(true);\n      this.message = message;\n    }\n\n    /**\n     * Performs a deep copy on <i>other</i>.\n     */\n    public sendFrontendMessage_args(sendFrontendMessage_args other) {\n      __isset_bit_vector.clear();\n      __isset_bit_vector.or(other.__isset_bit_vector);\n      if (other.isSetApp()) {\n        this.app = other.app;\n      }\n      if (other.isSetTaskId()) {\n        this.taskId = new edu.berkeley.sparrow.thrift.TFullTaskId(other.taskId);\n      }\n      this.status = other.status;\n      if (other.isSetMessage()) {\n        this.message = org.apache.thrift.TBaseHelper.copyBinary(other.message);\n;\n      }\n    }\n\n    public sendFrontendMessage_args deepCopy() {\n      return new sendFrontendMessage_args(this);\n    }\n\n    public void clear() {\n      this.app = null;\n      this.taskId = null;\n      setStatusIsSet(false);\n      this.status = 0;\n      this.message = null;\n    }\n\n    public String getApp() {\n      return this.app;\n    }\n\n    public sendFrontendMessage_args setApp(String app) {\n      this.app = app;\n      return this;\n    }\n\n    public void unsetApp() {\n      this.app = null;\n    }\n\n    /** Returns true if field app is set (has been assigned a value) and false otherwise */\n    public boolean isSetApp() {\n      return this.app != null;\n    }\n\n    public void setAppIsSet(boolean value) {\n      if (!value) {\n        this.app = null;\n      }\n    }\n\n    public edu.berkeley.sparrow.thrift.TFullTaskId getTaskId() {\n      return this.taskId;\n    }\n\n    public sendFrontendMessage_args setTaskId(edu.berkeley.sparrow.thrift.TFullTaskId taskId) {\n      this.taskId = taskId;\n      return this;\n    }\n\n    public void unsetTaskId() {\n      this.taskId = null;\n    }\n\n    /** Returns true if field taskId is set (has been assigned a value) and false otherwise */\n    public boolean isSetTaskId() {\n      return this.taskId != null;\n    }\n\n    public void setTaskIdIsSet(boolean value) {\n      if (!value) {\n        this.taskId = null;\n      }\n    }\n\n    public int getStatus() {\n      return this.status;\n    }\n\n    public sendFrontendMessage_args setStatus(int status) {\n      this.status = status;\n      setStatusIsSet(true);\n      return this;\n    }\n\n    public void unsetStatus() {\n      __isset_bit_vector.clear(__STATUS_ISSET_ID);\n    }\n\n    /** Returns true if field status is set (has been assigned a value) and false otherwise */\n    public boolean isSetStatus() {\n      return __isset_bit_vector.get(__STATUS_ISSET_ID);\n    }\n\n    public void setStatusIsSet(boolean value) {\n      __isset_bit_vector.set(__STATUS_ISSET_ID, value);\n    }\n\n    public byte[] getMessage() {\n      setMessage(org.apache.thrift.TBaseHelper.rightSize(message));\n      return message == null ? null : message.array();\n    }\n\n    public ByteBuffer bufferForMessage() {\n      return message;\n    }\n\n    public sendFrontendMessage_args setMessage(byte[] message) {\n      setMessage(message == null ? (ByteBuffer)null : ByteBuffer.wrap(message));\n      return this;\n    }\n\n    public sendFrontendMessage_args setMessage(ByteBuffer message) {\n      this.message = message;\n      return this;\n    }\n\n    public void unsetMessage() {\n      this.message = null;\n    }\n\n    /** Returns true if field message is set (has been assigned a value) and false otherwise */\n    public boolean isSetMessage() {\n      return this.message != null;\n    }\n\n    public void setMessageIsSet(boolean value) {\n      if (!value) {\n        this.message = null;\n      }\n    }\n\n    public void setFieldValue(_Fields field, Object value) {\n      switch (field) {\n      case APP:\n        if (value == null) {\n          unsetApp();\n        } else {\n          setApp((String)value);\n        }\n        break;\n\n      case TASK_ID:\n        if (value == null) {\n          unsetTaskId();\n        } else {\n          setTaskId((edu.berkeley.sparrow.thrift.TFullTaskId)value);\n        }\n        break;\n\n      case STATUS:\n        if (value == null) {\n          unsetStatus();\n        } else {\n          setStatus((Integer)value);\n        }\n        break;\n\n      case MESSAGE:\n        if (value == null) {\n          unsetMessage();\n        } else {\n          setMessage((ByteBuffer)value);\n        }\n        break;\n\n      }\n    }\n\n    public Object getFieldValue(_Fields field) {\n      switch (field) {\n      case APP:\n        return getApp();\n\n      case TASK_ID:\n        return getTaskId();\n\n      case STATUS:\n        return Integer.valueOf(getStatus());\n\n      case MESSAGE:\n        return getMessage();\n\n      }\n      throw new IllegalStateException();\n    }\n\n    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */\n    public boolean isSet(_Fields field) {\n      if (field == null) {\n        throw new IllegalArgumentException();\n      }\n\n      switch (field) {\n      case APP:\n        return isSetApp();\n      case TASK_ID:\n        return isSetTaskId();\n      case STATUS:\n        return isSetStatus();\n      case MESSAGE:\n        return isSetMessage();\n      }\n      throw new IllegalStateException();\n    }\n\n    @Override\n    public boolean equals(Object that) {\n      if (that == null)\n        return false;\n      if (that instanceof sendFrontendMessage_args)\n        return this.equals((sendFrontendMessage_args)that);\n      return false;\n    }\n\n    public boolean equals(sendFrontendMessage_args that) {\n      if (that == null)\n        return false;\n\n      boolean this_present_app = true && this.isSetApp();\n      boolean that_present_app = true && that.isSetApp();\n      if (this_present_app || that_present_app) {\n        if (!(this_present_app && that_present_app))\n          return false;\n        if (!this.app.equals(that.app))\n          return false;\n      }\n\n      boolean this_present_taskId = true && this.isSetTaskId();\n      boolean that_present_taskId = true && that.isSetTaskId();\n      if (this_present_taskId || that_present_taskId) {\n        if (!(this_present_taskId && that_present_taskId))\n          return false;\n        if (!this.taskId.equals(that.taskId))\n          return false;\n      }\n\n      boolean this_present_status = true;\n      boolean that_present_status = true;\n      if (this_present_status || that_present_status) {\n        if (!(this_present_status && that_present_status))\n          return false;\n        if (this.status != that.status)\n          return false;\n      }\n\n      boolean this_present_message = true && this.isSetMessage();\n      boolean that_present_message = true && that.isSetMessage();\n      if (this_present_message || that_present_message) {\n        if (!(this_present_message && that_present_message))\n          return false;\n        if (!this.message.equals(that.message))\n          return false;\n      }\n\n      return true;\n    }\n\n    @Override\n    public int hashCode() {\n      return 0;\n    }\n\n    public int compareTo(sendFrontendMessage_args other) {\n      if (!getClass().equals(other.getClass())) {\n        return getClass().getName().compareTo(other.getClass().getName());\n      }\n\n      int lastComparison = 0;\n      sendFrontendMessage_args typedOther = (sendFrontendMessage_args)other;\n\n      lastComparison = Boolean.valueOf(isSetApp()).compareTo(typedOther.isSetApp());\n      if (lastComparison != 0) {\n        return lastComparison;\n      }\n      if (isSetApp()) {\n        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.app, typedOther.app);\n        if (lastComparison != 0) {\n          return lastComparison;\n        }\n      }\n      lastComparison = Boolean.valueOf(isSetTaskId()).compareTo(typedOther.isSetTaskId());\n      if (lastComparison != 0) {\n        return lastComparison;\n      }\n      if (isSetTaskId()) {\n        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.taskId, typedOther.taskId);\n        if (lastComparison != 0) {\n          return lastComparison;\n        }\n      }\n      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus());\n      if (lastComparison != 0) {\n        return lastComparison;\n      }\n      if (isSetStatus()) {\n        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status);\n        if (lastComparison != 0) {\n          return lastComparison;\n        }\n      }\n      lastComparison = Boolean.valueOf(isSetMessage()).compareTo(typedOther.isSetMessage());\n      if (lastComparison != 0) {\n        return lastComparison;\n      }\n      if (isSetMessage()) {\n        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, typedOther.message);\n        if (lastComparison != 0) {\n          return lastComparison;\n        }\n      }\n      return 0;\n    }\n\n    public _Fields fieldForId(int fieldId) {\n      return _Fields.findByThriftId(fieldId);\n    }\n\n    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {\n      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);\n    }\n\n    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {\n      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);\n    }\n\n    @Override\n    public String toString() {\n      StringBuilder sb = new StringBuilder(\"sendFrontendMessage_args(\");\n      boolean first = true;\n\n      sb.append(\"app:\");\n      if (this.app == null) {\n        sb.append(\"null\");\n      } else {\n        sb.append(this.app);\n      }\n      first = false;\n      if (!first) sb.append(\", \");\n      sb.append(\"taskId:\");\n      if (this.taskId == null) {\n        sb.append(\"null\");\n      } else {\n        sb.append(this.taskId);\n      }\n      first = false;\n      if (!first) sb.append(\", \");\n      sb.append(\"status:\");\n      sb.append(this.status);\n      first = false;\n      if (!first) sb.append(\", \");\n      sb.append(\"message:\");\n      if (this.message == null) {\n        sb.append(\"null\");\n      } else {\n        org.apache.thrift.TBaseHelper.toString(this.message, sb);\n      }\n      first = false;\n      sb.append(\")\");\n      return sb.toString();\n    }\n\n    public void validate() throws org.apache.thrift.TException {\n      // check for required fields\n    }\n\n    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {\n      try {\n        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));\n      } catch (org.apache.thrift.TException te) {\n        throw new java.io.IOException(te.getMessage());\n      }\n    }\n\n    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {\n      try {\n        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.\n        __isset_bit_vector = new BitSet(1);\n        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));\n      } catch (org.apache.thrift.TException te) {\n        throw new java.io.IOException(te.getMessage());\n      }\n    }\n\n    private static class sendFrontendMessage_argsStandardSchemeFactory implements SchemeFactory {\n      public sendFrontendMessage_argsStandardScheme getScheme() {\n        return new sendFrontendMessage_argsStandardScheme();\n      }\n    }\n\n    private static class sendFrontendMessage_argsStandardScheme extends StandardScheme<sendFrontendMessage_args> {\n\n      public void read(org.apache.thrift.protocol.TProtocol iprot, sendFrontendMessage_args struct) throws org.apache.thrift.TException {\n        org.apache.thrift.protocol.TField schemeField;\n        iprot.readStructBegin();\n        while (true)\n        {\n          schemeField = iprot.readFieldBegin();\n          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { \n            break;\n          }\n          switch (schemeField.id) {\n            case 1: // APP\n              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {\n                struct.app = iprot.readString();\n                struct.setAppIsSet(true);\n              } else { \n                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n              }\n              break;\n            case 2: // TASK_ID\n              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {\n                struct.taskId = new edu.berkeley.sparrow.thrift.TFullTaskId();\n                struct.taskId.read(iprot);\n                struct.setTaskIdIsSet(true);\n              } else { \n                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n              }\n              break;\n            case 3: // STATUS\n              if (schemeField.type == org.apache.thrift.protocol.TType.I32) {\n                struct.status = iprot.readI32();\n                struct.setStatusIsSet(true);\n              } else { \n                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n              }\n              break;\n            case 4: // MESSAGE\n              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {\n                struct.message = iprot.readBinary();\n                struct.setMessageIsSet(true);\n              } else { \n                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n              }\n              break;\n            default:\n              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n          }\n          iprot.readFieldEnd();\n        }\n        iprot.readStructEnd();\n\n        // check for required fields of primitive type, which can't be checked in the validate method\n        struct.validate();\n      }\n\n      public void write(org.apache.thrift.protocol.TProtocol oprot, sendFrontendMessage_args struct) throws org.apache.thrift.TException {\n        struct.validate();\n\n        oprot.writeStructBegin(STRUCT_DESC);\n        if (struct.app != null) {\n          oprot.writeFieldBegin(APP_FIELD_DESC);\n          oprot.writeString(struct.app);\n          oprot.writeFieldEnd();\n        }\n        if (struct.taskId != null) {\n          oprot.writeFieldBegin(TASK_ID_FIELD_DESC);\n          struct.taskId.write(oprot);\n          oprot.writeFieldEnd();\n        }\n        oprot.writeFieldBegin(STATUS_FIELD_DESC);\n        oprot.writeI32(struct.status);\n        oprot.writeFieldEnd();\n        if (struct.message != null) {\n          oprot.writeFieldBegin(MESSAGE_FIELD_DESC);\n          oprot.writeBinary(struct.message);\n          oprot.writeFieldEnd();\n        }\n        oprot.writeFieldStop();\n        oprot.writeStructEnd();\n      }\n\n    }\n\n    private static class sendFrontendMessage_argsTupleSchemeFactory implements SchemeFactory {\n      public sendFrontendMessage_argsTupleScheme getScheme() {\n        return new sendFrontendMessage_argsTupleScheme();\n      }\n    }\n\n    private static class sendFrontendMessage_argsTupleScheme extends TupleScheme<sendFrontendMessage_args> {\n\n      @Override\n      public void write(org.apache.thrift.protocol.TProtocol prot, sendFrontendMessage_args struct) throws org.apache.thrift.TException {\n        TTupleProtocol oprot = (TTupleProtocol) prot;\n        BitSet optionals = new BitSet();\n        if (struct.isSetApp()) {\n          optionals.set(0);\n        }\n        if (struct.isSetTaskId()) {\n          optionals.set(1);\n        }\n        if (struct.isSetStatus()) {\n          optionals.set(2);\n        }\n        if (struct.isSetMessage()) {\n          optionals.set(3);\n        }\n        oprot.writeBitSet(optionals, 4);\n        if (struct.isSetApp()) {\n          oprot.writeString(struct.app);\n        }\n        if (struct.isSetTaskId()) {\n          struct.taskId.write(oprot);\n        }\n        if (struct.isSetStatus()) {\n          oprot.writeI32(struct.status);\n        }\n        if (struct.isSetMessage()) {\n          oprot.writeBinary(struct.message);\n        }\n      }\n\n      @Override\n      public void read(org.apache.thrift.protocol.TProtocol prot, sendFrontendMessage_args struct) throws org.apache.thrift.TException {\n        TTupleProtocol iprot = (TTupleProtocol) prot;\n        BitSet incoming = iprot.readBitSet(4);\n        if (incoming.get(0)) {\n          struct.app = iprot.readString();\n          struct.setAppIsSet(true);\n        }\n        if (incoming.get(1)) {\n          struct.taskId = new edu.berkeley.sparrow.thrift.TFullTaskId();\n          struct.taskId.read(iprot);\n          struct.setTaskIdIsSet(true);\n        }\n        if (incoming.get(2)) {\n          struct.status = iprot.readI32();\n          struct.setStatusIsSet(true);\n        }\n        if (incoming.get(3)) {\n          struct.message = iprot.readBinary();\n          struct.setMessageIsSet(true);\n        }\n      }\n    }\n\n  }\n\n  public static class sendFrontendMessage_result implements org.apache.thrift.TBase<sendFrontendMessage_result, sendFrontendMessage_result._Fields>, java.io.Serializable, Cloneable   {\n    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct(\"sendFrontendMessage_result\");\n\n\n    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();\n    static {\n      schemes.put(StandardScheme.class, new sendFrontendMessage_resultStandardSchemeFactory());\n      schemes.put(TupleScheme.class, new sendFrontendMessage_resultTupleSchemeFactory());\n    }\n\n\n    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */\n    public enum _Fields implements org.apache.thrift.TFieldIdEnum {\n;\n\n      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();\n\n      static {\n        for (_Fields field : EnumSet.allOf(_Fields.class)) {\n          byName.put(field.getFieldName(), field);\n        }\n      }\n\n      /**\n       * Find the _Fields constant that matches fieldId, or null if its not found.\n       */\n      public static _Fields findByThriftId(int fieldId) {\n        switch(fieldId) {\n          default:\n            return null;\n        }\n      }\n\n      /**\n       * Find the _Fields constant that matches fieldId, throwing an exception\n       * if it is not found.\n       */\n      public static _Fields findByThriftIdOrThrow(int fieldId) {\n        _Fields fields = findByThriftId(fieldId);\n        if (fields == null) throw new IllegalArgumentException(\"Field \" + fieldId + \" doesn't exist!\");\n        return fields;\n      }\n\n      /**\n       * Find the _Fields constant that matches name, or null if its not found.\n       */\n      public static _Fields findByName(String name) {\n        return byName.get(name);\n      }\n\n      private final short _thriftId;\n      private final String _fieldName;\n\n      _Fields(short thriftId, String fieldName) {\n        _thriftId = thriftId;\n        _fieldName = fieldName;\n      }\n\n      public short getThriftFieldId() {\n        return _thriftId;\n      }\n\n      public String getFieldName() {\n        return _fieldName;\n      }\n    }\n    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;\n    static {\n      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);\n      metaDataMap = Collections.unmodifiableMap(tmpMap);\n      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(sendFrontendMessage_result.class, metaDataMap);\n    }\n\n    public sendFrontendMessage_result() {\n    }\n\n    /**\n     * Performs a deep copy on <i>other</i>.\n     */\n    public sendFrontendMessage_result(sendFrontendMessage_result other) {\n    }\n\n    public sendFrontendMessage_result deepCopy() {\n      return new sendFrontendMessage_result(this);\n    }\n\n    public void clear() {\n    }\n\n    public void setFieldValue(_Fields field, Object value) {\n      switch (field) {\n      }\n    }\n\n    public Object getFieldValue(_Fields field) {\n      switch (field) {\n      }\n      throw new IllegalStateException();\n    }\n\n    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */\n    public boolean isSet(_Fields field) {\n      if (field == null) {\n        throw new IllegalArgumentException();\n      }\n\n      switch (field) {\n      }\n      throw new IllegalStateException();\n    }\n\n    @Override\n    public boolean equals(Object that) {\n      if (that == null)\n        return false;\n      if (that instanceof sendFrontendMessage_result)\n        return this.equals((sendFrontendMessage_result)that);\n      return false;\n    }\n\n    public boolean equals(sendFrontendMessage_result that) {\n      if (that == null)\n        return false;\n\n      return true;\n    }\n\n    @Override\n    public int hashCode() {\n      return 0;\n    }\n\n    public int compareTo(sendFrontendMessage_result other) {\n      if (!getClass().equals(other.getClass())) {\n        return getClass().getName().compareTo(other.getClass().getName());\n      }\n\n      int lastComparison = 0;\n      sendFrontendMessage_result typedOther = (sendFrontendMessage_result)other;\n\n      return 0;\n    }\n\n    public _Fields fieldForId(int fieldId) {\n      return _Fields.findByThriftId(fieldId);\n    }\n\n    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {\n      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);\n    }\n\n    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {\n      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);\n      }\n\n    @Override\n    public String toString() {\n      StringBuilder sb = new StringBuilder(\"sendFrontendMessage_result(\");\n      boolean first = true;\n\n      sb.append(\")\");\n      return sb.toString();\n    }\n\n    public void validate() throws org.apache.thrift.TException {\n      // check for required fields\n    }\n\n    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {\n      try {\n        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));\n      } catch (org.apache.thrift.TException te) {\n        throw new java.io.IOException(te.getMessage());\n      }\n    }\n\n    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {\n      try {\n        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));\n      } catch (org.apache.thrift.TException te) {\n        throw new java.io.IOException(te.getMessage());\n      }\n    }\n\n    private static class sendFrontendMessage_resultStandardSchemeFactory implements SchemeFactory {\n      public sendFrontendMessage_resultStandardScheme getScheme() {\n        return new sendFrontendMessage_resultStandardScheme();\n      }\n    }\n\n    private static class sendFrontendMessage_resultStandardScheme extends StandardScheme<sendFrontendMessage_result> {\n\n      public void read(org.apache.thrift.protocol.TProtocol iprot, sendFrontendMessage_result struct) throws org.apache.thrift.TException {\n        org.apache.thrift.protocol.TField schemeField;\n        iprot.readStructBegin();\n        while (true)\n        {\n          schemeField = iprot.readFieldBegin();\n          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { \n            break;\n          }\n          switch (schemeField.id) {\n            default:\n              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n          }\n          iprot.readFieldEnd();\n        }\n        iprot.readStructEnd();\n\n        // check for required fields of primitive type, which can't be checked in the validate method\n        struct.validate();\n      }\n\n      public void write(org.apache.thrift.protocol.TProtocol oprot, sendFrontendMessage_result struct) throws org.apache.thrift.TException {\n        struct.validate();\n\n        oprot.writeStructBegin(STRUCT_DESC);\n        oprot.writeFieldStop();\n        oprot.writeStructEnd();\n      }\n\n    }\n\n    private static class sendFrontendMessage_resultTupleSchemeFactory implements SchemeFactory {\n      public sendFrontendMessage_resultTupleScheme getScheme() {\n        return new sendFrontendMessage_resultTupleScheme();\n      }\n    }\n\n    private static class sendFrontendMessage_resultTupleScheme extends TupleScheme<sendFrontendMessage_result> {\n\n      @Override\n      public void write(org.apache.thrift.protocol.TProtocol prot, sendFrontendMessage_result struct) throws org.apache.thrift.TException {\n        TTupleProtocol oprot = (TTupleProtocol) prot;\n      }\n\n      @Override\n      public void read(org.apache.thrift.protocol.TProtocol prot, sendFrontendMessage_result struct) throws org.apache.thrift.TException {\n        TTupleProtocol iprot = (TTupleProtocol) prot;\n      }\n    }\n\n  }\n\n}\n"
  },
  {
    "path": "src/main/gen-java/edu/berkeley/sparrow/thrift/PongService.java",
    "content": "/**\n * Autogenerated by Thrift Compiler (0.8.0)\n *\n * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING\n *  @generated\n */\npackage edu.berkeley.sparrow.thrift;\n\nimport org.apache.thrift.scheme.IScheme;\nimport org.apache.thrift.scheme.SchemeFactory;\nimport org.apache.thrift.scheme.StandardScheme;\n\nimport org.apache.thrift.scheme.TupleScheme;\nimport org.apache.thrift.protocol.TTupleProtocol;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.util.HashMap;\nimport java.util.EnumMap;\nimport java.util.Set;\nimport java.util.HashSet;\nimport java.util.EnumSet;\nimport java.util.Collections;\nimport java.util.BitSet;\nimport java.nio.ByteBuffer;\nimport java.util.Arrays;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\npublic class PongService {\n\n  public interface Iface {\n\n    public String ping(String data) throws org.apache.thrift.TException;\n\n  }\n\n  public interface AsyncIface {\n\n    public void ping(String data, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.ping_call> resultHandler) throws org.apache.thrift.TException;\n\n  }\n\n  public static class Client extends org.apache.thrift.TServiceClient implements Iface {\n    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {\n      public Factory() {}\n      public Client getClient(org.apache.thrift.protocol.TProtocol prot) {\n        return new Client(prot);\n      }\n      public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {\n        return new Client(iprot, oprot);\n      }\n    }\n\n    public Client(org.apache.thrift.protocol.TProtocol prot)\n    {\n      super(prot, prot);\n    }\n\n    public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {\n      super(iprot, oprot);\n    }\n\n    public String ping(String data) throws org.apache.thrift.TException\n    {\n      send_ping(data);\n      return recv_ping();\n    }\n\n    public void send_ping(String data) throws org.apache.thrift.TException\n    {\n      ping_args args = new ping_args();\n      args.setData(data);\n      sendBase(\"ping\", args);\n    }\n\n    public String recv_ping() throws org.apache.thrift.TException\n    {\n      ping_result result = new ping_result();\n      receiveBase(result, \"ping\");\n      if (result.isSetSuccess()) {\n        return result.success;\n      }\n      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, \"ping failed: unknown result\");\n    }\n\n  }\n  public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface {\n    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {\n      private org.apache.thrift.async.TAsyncClientManager clientManager;\n      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;\n      public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {\n        this.clientManager = clientManager;\n        this.protocolFactory = protocolFactory;\n      }\n      public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {\n        return new AsyncClient(protocolFactory, clientManager, transport);\n      }\n    }\n\n    public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {\n      super(protocolFactory, clientManager, transport);\n    }\n\n    public void ping(String data, org.apache.thrift.async.AsyncMethodCallback<ping_call> resultHandler) throws org.apache.thrift.TException {\n      checkReady();\n      ping_call method_call = new ping_call(data, resultHandler, this, ___protocolFactory, ___transport);\n      this.___currentMethod = method_call;\n      ___manager.call(method_call);\n    }\n\n    public static class ping_call extends org.apache.thrift.async.TAsyncMethodCall {\n      private String data;\n      public ping_call(String data, org.apache.thrift.async.AsyncMethodCallback<ping_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {\n        super(client, protocolFactory, transport, resultHandler, false);\n        this.data = data;\n      }\n\n      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {\n        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage(\"ping\", org.apache.thrift.protocol.TMessageType.CALL, 0));\n        ping_args args = new ping_args();\n        args.setData(data);\n        args.write(prot);\n        prot.writeMessageEnd();\n      }\n\n      public String getResult() throws org.apache.thrift.TException {\n        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {\n          throw new IllegalStateException(\"Method call not finished!\");\n        }\n        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());\n        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);\n        return (new Client(prot)).recv_ping();\n      }\n    }\n\n  }\n\n  public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor {\n    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());\n    public Processor(I iface) {\n      super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));\n    }\n\n    protected Processor(I iface, Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {\n      super(iface, getProcessMap(processMap));\n    }\n\n    private static <I extends Iface> Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> getProcessMap(Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {\n      processMap.put(\"ping\", new ping());\n      return processMap;\n    }\n\n    private static class ping<I extends Iface> extends org.apache.thrift.ProcessFunction<I, ping_args> {\n      public ping() {\n        super(\"ping\");\n      }\n\n      protected ping_args getEmptyArgsInstance() {\n        return new ping_args();\n      }\n\n      protected ping_result getResult(I iface, ping_args args) throws org.apache.thrift.TException {\n        ping_result result = new ping_result();\n        result.success = iface.ping(args.data);\n        return result;\n      }\n    }\n\n  }\n\n  public static class ping_args implements org.apache.thrift.TBase<ping_args, ping_args._Fields>, java.io.Serializable, Cloneable   {\n    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct(\"ping_args\");\n\n    private static final org.apache.thrift.protocol.TField DATA_FIELD_DESC = new org.apache.thrift.protocol.TField(\"data\", org.apache.thrift.protocol.TType.STRING, (short)1);\n\n    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();\n    static {\n      schemes.put(StandardScheme.class, new ping_argsStandardSchemeFactory());\n      schemes.put(TupleScheme.class, new ping_argsTupleSchemeFactory());\n    }\n\n    public String data; // required\n\n    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */\n    public enum _Fields implements org.apache.thrift.TFieldIdEnum {\n      DATA((short)1, \"data\");\n\n      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();\n\n      static {\n        for (_Fields field : EnumSet.allOf(_Fields.class)) {\n          byName.put(field.getFieldName(), field);\n        }\n      }\n\n      /**\n       * Find the _Fields constant that matches fieldId, or null if its not found.\n       */\n      public static _Fields findByThriftId(int fieldId) {\n        switch(fieldId) {\n          case 1: // DATA\n            return DATA;\n          default:\n            return null;\n        }\n      }\n\n      /**\n       * Find the _Fields constant that matches fieldId, throwing an exception\n       * if it is not found.\n       */\n      public static _Fields findByThriftIdOrThrow(int fieldId) {\n        _Fields fields = findByThriftId(fieldId);\n        if (fields == null) throw new IllegalArgumentException(\"Field \" + fieldId + \" doesn't exist!\");\n        return fields;\n      }\n\n      /**\n       * Find the _Fields constant that matches name, or null if its not found.\n       */\n      public static _Fields findByName(String name) {\n        return byName.get(name);\n      }\n\n      private final short _thriftId;\n      private final String _fieldName;\n\n      _Fields(short thriftId, String fieldName) {\n        _thriftId = thriftId;\n        _fieldName = fieldName;\n      }\n\n      public short getThriftFieldId() {\n        return _thriftId;\n      }\n\n      public String getFieldName() {\n        return _fieldName;\n      }\n    }\n\n    // isset id assignments\n    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;\n    static {\n      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);\n      tmpMap.put(_Fields.DATA, new org.apache.thrift.meta_data.FieldMetaData(\"data\", org.apache.thrift.TFieldRequirementType.DEFAULT, \n          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));\n      metaDataMap = Collections.unmodifiableMap(tmpMap);\n      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ping_args.class, metaDataMap);\n    }\n\n    public ping_args() {\n    }\n\n    public ping_args(\n      String data)\n    {\n      this();\n      this.data = data;\n    }\n\n    /**\n     * Performs a deep copy on <i>other</i>.\n     */\n    public ping_args(ping_args other) {\n      if (other.isSetData()) {\n        this.data = other.data;\n      }\n    }\n\n    public ping_args deepCopy() {\n      return new ping_args(this);\n    }\n\n    public void clear() {\n      this.data = null;\n    }\n\n    public String getData() {\n      return this.data;\n    }\n\n    public ping_args setData(String data) {\n      this.data = data;\n      return this;\n    }\n\n    public void unsetData() {\n      this.data = null;\n    }\n\n    /** Returns true if field data is set (has been assigned a value) and false otherwise */\n    public boolean isSetData() {\n      return this.data != null;\n    }\n\n    public void setDataIsSet(boolean value) {\n      if (!value) {\n        this.data = null;\n      }\n    }\n\n    public void setFieldValue(_Fields field, Object value) {\n      switch (field) {\n      case DATA:\n        if (value == null) {\n          unsetData();\n        } else {\n          setData((String)value);\n        }\n        break;\n\n      }\n    }\n\n    public Object getFieldValue(_Fields field) {\n      switch (field) {\n      case DATA:\n        return getData();\n\n      }\n      throw new IllegalStateException();\n    }\n\n    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */\n    public boolean isSet(_Fields field) {\n      if (field == null) {\n        throw new IllegalArgumentException();\n      }\n\n      switch (field) {\n      case DATA:\n        return isSetData();\n      }\n      throw new IllegalStateException();\n    }\n\n    @Override\n    public boolean equals(Object that) {\n      if (that == null)\n        return false;\n      if (that instanceof ping_args)\n        return this.equals((ping_args)that);\n      return false;\n    }\n\n    public boolean equals(ping_args that) {\n      if (that == null)\n        return false;\n\n      boolean this_present_data = true && this.isSetData();\n      boolean that_present_data = true && that.isSetData();\n      if (this_present_data || that_present_data) {\n        if (!(this_present_data && that_present_data))\n          return false;\n        if (!this.data.equals(that.data))\n          return false;\n      }\n\n      return true;\n    }\n\n    @Override\n    public int hashCode() {\n      return 0;\n    }\n\n    public int compareTo(ping_args other) {\n      if (!getClass().equals(other.getClass())) {\n        return getClass().getName().compareTo(other.getClass().getName());\n      }\n\n      int lastComparison = 0;\n      ping_args typedOther = (ping_args)other;\n\n      lastComparison = Boolean.valueOf(isSetData()).compareTo(typedOther.isSetData());\n      if (lastComparison != 0) {\n        return lastComparison;\n      }\n      if (isSetData()) {\n        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.data, typedOther.data);\n        if (lastComparison != 0) {\n          return lastComparison;\n        }\n      }\n      return 0;\n    }\n\n    public _Fields fieldForId(int fieldId) {\n      return _Fields.findByThriftId(fieldId);\n    }\n\n    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {\n      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);\n    }\n\n    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {\n      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);\n    }\n\n    @Override\n    public String toString() {\n      StringBuilder sb = new StringBuilder(\"ping_args(\");\n      boolean first = true;\n\n      sb.append(\"data:\");\n      if (this.data == null) {\n        sb.append(\"null\");\n      } else {\n        sb.append(this.data);\n      }\n      first = false;\n      sb.append(\")\");\n      return sb.toString();\n    }\n\n    public void validate() throws org.apache.thrift.TException {\n      // check for required fields\n    }\n\n    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {\n      try {\n        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));\n      } catch (org.apache.thrift.TException te) {\n        throw new java.io.IOException(te.getMessage());\n      }\n    }\n\n    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {\n      try {\n        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));\n      } catch (org.apache.thrift.TException te) {\n        throw new java.io.IOException(te.getMessage());\n      }\n    }\n\n    private static class ping_argsStandardSchemeFactory implements SchemeFactory {\n      public ping_argsStandardScheme getScheme() {\n        return new ping_argsStandardScheme();\n      }\n    }\n\n    private static class ping_argsStandardScheme extends StandardScheme<ping_args> {\n\n      public void read(org.apache.thrift.protocol.TProtocol iprot, ping_args struct) throws org.apache.thrift.TException {\n        org.apache.thrift.protocol.TField schemeField;\n        iprot.readStructBegin();\n        while (true)\n        {\n          schemeField = iprot.readFieldBegin();\n          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { \n            break;\n          }\n          switch (schemeField.id) {\n            case 1: // DATA\n              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {\n                struct.data = iprot.readString();\n                struct.setDataIsSet(true);\n              } else { \n                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n              }\n              break;\n            default:\n              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n          }\n          iprot.readFieldEnd();\n        }\n        iprot.readStructEnd();\n\n        // check for required fields of primitive type, which can't be checked in the validate method\n        struct.validate();\n      }\n\n      public void write(org.apache.thrift.protocol.TProtocol oprot, ping_args struct) throws org.apache.thrift.TException {\n        struct.validate();\n\n        oprot.writeStructBegin(STRUCT_DESC);\n        if (struct.data != null) {\n          oprot.writeFieldBegin(DATA_FIELD_DESC);\n          oprot.writeString(struct.data);\n          oprot.writeFieldEnd();\n        }\n        oprot.writeFieldStop();\n        oprot.writeStructEnd();\n      }\n\n    }\n\n    private static class ping_argsTupleSchemeFactory implements SchemeFactory {\n      public ping_argsTupleScheme getScheme() {\n        return new ping_argsTupleScheme();\n      }\n    }\n\n    private static class ping_argsTupleScheme extends TupleScheme<ping_args> {\n\n      @Override\n      public void write(org.apache.thrift.protocol.TProtocol prot, ping_args struct) throws org.apache.thrift.TException {\n        TTupleProtocol oprot = (TTupleProtocol) prot;\n        BitSet optionals = new BitSet();\n        if (struct.isSetData()) {\n          optionals.set(0);\n        }\n        oprot.writeBitSet(optionals, 1);\n        if (struct.isSetData()) {\n          oprot.writeString(struct.data);\n        }\n      }\n\n      @Override\n      public void read(org.apache.thrift.protocol.TProtocol prot, ping_args struct) throws org.apache.thrift.TException {\n        TTupleProtocol iprot = (TTupleProtocol) prot;\n        BitSet incoming = iprot.readBitSet(1);\n        if (incoming.get(0)) {\n          struct.data = iprot.readString();\n          struct.setDataIsSet(true);\n        }\n      }\n    }\n\n  }\n\n  public static class ping_result implements org.apache.thrift.TBase<ping_result, ping_result._Fields>, java.io.Serializable, Cloneable   {\n    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct(\"ping_result\");\n\n    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField(\"success\", org.apache.thrift.protocol.TType.STRING, (short)0);\n\n    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();\n    static {\n      schemes.put(StandardScheme.class, new ping_resultStandardSchemeFactory());\n      schemes.put(TupleScheme.class, new ping_resultTupleSchemeFactory());\n    }\n\n    public String success; // required\n\n    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */\n    public enum _Fields implements org.apache.thrift.TFieldIdEnum {\n      SUCCESS((short)0, \"success\");\n\n      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();\n\n      static {\n        for (_Fields field : EnumSet.allOf(_Fields.class)) {\n          byName.put(field.getFieldName(), field);\n        }\n      }\n\n      /**\n       * Find the _Fields constant that matches fieldId, or null if its not found.\n       */\n      public static _Fields findByThriftId(int fieldId) {\n        switch(fieldId) {\n          case 0: // SUCCESS\n            return SUCCESS;\n          default:\n            return null;\n        }\n      }\n\n      /**\n       * Find the _Fields constant that matches fieldId, throwing an exception\n       * if it is not found.\n       */\n      public static _Fields findByThriftIdOrThrow(int fieldId) {\n        _Fields fields = findByThriftId(fieldId);\n        if (fields == null) throw new IllegalArgumentException(\"Field \" + fieldId + \" doesn't exist!\");\n        return fields;\n      }\n\n      /**\n       * Find the _Fields constant that matches name, or null if its not found.\n       */\n      public static _Fields findByName(String name) {\n        return byName.get(name);\n      }\n\n      private final short _thriftId;\n      private final String _fieldName;\n\n      _Fields(short thriftId, String fieldName) {\n        _thriftId = thriftId;\n        _fieldName = fieldName;\n      }\n\n      public short getThriftFieldId() {\n        return _thriftId;\n      }\n\n      public String getFieldName() {\n        return _fieldName;\n      }\n    }\n\n    // isset id assignments\n    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;\n    static {\n      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);\n      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData(\"success\", org.apache.thrift.TFieldRequirementType.DEFAULT, \n          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));\n      metaDataMap = Collections.unmodifiableMap(tmpMap);\n      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ping_result.class, metaDataMap);\n    }\n\n    public ping_result() {\n    }\n\n    public ping_result(\n      String success)\n    {\n      this();\n      this.success = success;\n    }\n\n    /**\n     * Performs a deep copy on <i>other</i>.\n     */\n    public ping_result(ping_result other) {\n      if (other.isSetSuccess()) {\n        this.success = other.success;\n      }\n    }\n\n    public ping_result deepCopy() {\n      return new ping_result(this);\n    }\n\n    public void clear() {\n      this.success = null;\n    }\n\n    public String getSuccess() {\n      return this.success;\n    }\n\n    public ping_result setSuccess(String success) {\n      this.success = success;\n      return this;\n    }\n\n    public void unsetSuccess() {\n      this.success = null;\n    }\n\n    /** Returns true if field success is set (has been assigned a value) and false otherwise */\n    public boolean isSetSuccess() {\n      return this.success != null;\n    }\n\n    public void setSuccessIsSet(boolean value) {\n      if (!value) {\n        this.success = null;\n      }\n    }\n\n    public void setFieldValue(_Fields field, Object value) {\n      switch (field) {\n      case SUCCESS:\n        if (value == null) {\n          unsetSuccess();\n        } else {\n          setSuccess((String)value);\n        }\n        break;\n\n      }\n    }\n\n    public Object getFieldValue(_Fields field) {\n      switch (field) {\n      case SUCCESS:\n        return getSuccess();\n\n      }\n      throw new IllegalStateException();\n    }\n\n    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */\n    public boolean isSet(_Fields field) {\n      if (field == null) {\n        throw new IllegalArgumentException();\n      }\n\n      switch (field) {\n      case SUCCESS:\n        return isSetSuccess();\n      }\n      throw new IllegalStateException();\n    }\n\n    @Override\n    public boolean equals(Object that) {\n      if (that == null)\n        return false;\n      if (that instanceof ping_result)\n        return this.equals((ping_result)that);\n      return false;\n    }\n\n    public boolean equals(ping_result that) {\n      if (that == null)\n        return false;\n\n      boolean this_present_success = true && this.isSetSuccess();\n      boolean that_present_success = true && that.isSetSuccess();\n      if (this_present_success || that_present_success) {\n        if (!(this_present_success && that_present_success))\n          return false;\n        if (!this.success.equals(that.success))\n          return false;\n      }\n\n      return true;\n    }\n\n    @Override\n    public int hashCode() {\n      return 0;\n    }\n\n    public int compareTo(ping_result other) {\n      if (!getClass().equals(other.getClass())) {\n        return getClass().getName().compareTo(other.getClass().getName());\n      }\n\n      int lastComparison = 0;\n      ping_result typedOther = (ping_result)other;\n\n      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());\n      if (lastComparison != 0) {\n        return lastComparison;\n      }\n      if (isSetSuccess()) {\n        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);\n        if (lastComparison != 0) {\n          return lastComparison;\n        }\n      }\n      return 0;\n    }\n\n    public _Fields fieldForId(int fieldId) {\n      return _Fields.findByThriftId(fieldId);\n    }\n\n    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {\n      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);\n    }\n\n    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {\n      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);\n      }\n\n    @Override\n    public String toString() {\n      StringBuilder sb = new StringBuilder(\"ping_result(\");\n      boolean first = true;\n\n      sb.append(\"success:\");\n      if (this.success == null) {\n        sb.append(\"null\");\n      } else {\n        sb.append(this.success);\n      }\n      first = false;\n      sb.append(\")\");\n      return sb.toString();\n    }\n\n    public void validate() throws org.apache.thrift.TException {\n      // check for required fields\n    }\n\n    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {\n      try {\n        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));\n      } catch (org.apache.thrift.TException te) {\n        throw new java.io.IOException(te.getMessage());\n      }\n    }\n\n    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {\n      try {\n        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));\n      } catch (org.apache.thrift.TException te) {\n        throw new java.io.IOException(te.getMessage());\n      }\n    }\n\n    private static class ping_resultStandardSchemeFactory implements SchemeFactory {\n      public ping_resultStandardScheme getScheme() {\n        return new ping_resultStandardScheme();\n      }\n    }\n\n    private static class ping_resultStandardScheme extends StandardScheme<ping_result> {\n\n      public void read(org.apache.thrift.protocol.TProtocol iprot, ping_result struct) throws org.apache.thrift.TException {\n        org.apache.thrift.protocol.TField schemeField;\n        iprot.readStructBegin();\n        while (true)\n        {\n          schemeField = iprot.readFieldBegin();\n          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { \n            break;\n          }\n          switch (schemeField.id) {\n            case 0: // SUCCESS\n              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {\n                struct.success = iprot.readString();\n                struct.setSuccessIsSet(true);\n              } else { \n                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n              }\n              break;\n            default:\n              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n          }\n          iprot.readFieldEnd();\n        }\n        iprot.readStructEnd();\n\n        // check for required fields of primitive type, which can't be checked in the validate method\n        struct.validate();\n      }\n\n      public void write(org.apache.thrift.protocol.TProtocol oprot, ping_result struct) throws org.apache.thrift.TException {\n        struct.validate();\n\n        oprot.writeStructBegin(STRUCT_DESC);\n        if (struct.success != null) {\n          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);\n          oprot.writeString(struct.success);\n          oprot.writeFieldEnd();\n        }\n        oprot.writeFieldStop();\n        oprot.writeStructEnd();\n      }\n\n    }\n\n    private static class ping_resultTupleSchemeFactory implements SchemeFactory {\n      public ping_resultTupleScheme getScheme() {\n        return new ping_resultTupleScheme();\n      }\n    }\n\n    private static class ping_resultTupleScheme extends TupleScheme<ping_result> {\n\n      @Override\n      public void write(org.apache.thrift.protocol.TProtocol prot, ping_result struct) throws org.apache.thrift.TException {\n        TTupleProtocol oprot = (TTupleProtocol) prot;\n        BitSet optionals = new BitSet();\n        if (struct.isSetSuccess()) {\n          optionals.set(0);\n        }\n        oprot.writeBitSet(optionals, 1);\n        if (struct.isSetSuccess()) {\n          oprot.writeString(struct.success);\n        }\n      }\n\n      @Override\n      public void read(org.apache.thrift.protocol.TProtocol prot, ping_result struct) throws org.apache.thrift.TException {\n        TTupleProtocol iprot = (TTupleProtocol) prot;\n        BitSet incoming = iprot.readBitSet(1);\n        if (incoming.get(0)) {\n          struct.success = iprot.readString();\n          struct.setSuccessIsSet(true);\n        }\n      }\n    }\n\n  }\n\n}\n"
  },
  {
    "path": "src/main/gen-java/edu/berkeley/sparrow/thrift/SchedulerService.java",
    "content": "/**\n * Autogenerated by Thrift Compiler (0.8.0)\n *\n * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING\n *  @generated\n */\npackage edu.berkeley.sparrow.thrift;\n\nimport org.apache.thrift.scheme.IScheme;\nimport org.apache.thrift.scheme.SchemeFactory;\nimport org.apache.thrift.scheme.StandardScheme;\n\nimport org.apache.thrift.scheme.TupleScheme;\nimport org.apache.thrift.protocol.TTupleProtocol;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.util.HashMap;\nimport java.util.EnumMap;\nimport java.util.Set;\nimport java.util.HashSet;\nimport java.util.EnumSet;\nimport java.util.Collections;\nimport java.util.BitSet;\nimport java.nio.ByteBuffer;\nimport java.util.Arrays;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\npublic class SchedulerService {\n\n  public interface Iface {\n\n    public boolean registerFrontend(String app, String socketAddress) throws org.apache.thrift.TException;\n\n    public void submitJob(edu.berkeley.sparrow.thrift.TSchedulingRequest req) throws edu.berkeley.sparrow.thrift.IncompleteRequestException, org.apache.thrift.TException;\n\n    public void sendFrontendMessage(String app, edu.berkeley.sparrow.thrift.TFullTaskId taskId, int status, ByteBuffer message) throws org.apache.thrift.TException;\n\n  }\n\n  public interface AsyncIface {\n\n    public void registerFrontend(String app, String socketAddress, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.registerFrontend_call> resultHandler) throws org.apache.thrift.TException;\n\n    public void submitJob(edu.berkeley.sparrow.thrift.TSchedulingRequest req, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.submitJob_call> resultHandler) throws org.apache.thrift.TException;\n\n    public void sendFrontendMessage(String app, edu.berkeley.sparrow.thrift.TFullTaskId taskId, int status, ByteBuffer message, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.sendFrontendMessage_call> resultHandler) throws org.apache.thrift.TException;\n\n  }\n\n  public static class Client extends org.apache.thrift.TServiceClient implements Iface {\n    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {\n      public Factory() {}\n      public Client getClient(org.apache.thrift.protocol.TProtocol prot) {\n        return new Client(prot);\n      }\n      public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {\n        return new Client(iprot, oprot);\n      }\n    }\n\n    public Client(org.apache.thrift.protocol.TProtocol prot)\n    {\n      super(prot, prot);\n    }\n\n    public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {\n      super(iprot, oprot);\n    }\n\n    public boolean registerFrontend(String app, String socketAddress) throws org.apache.thrift.TException\n    {\n      send_registerFrontend(app, socketAddress);\n      return recv_registerFrontend();\n    }\n\n    public void send_registerFrontend(String app, String socketAddress) throws org.apache.thrift.TException\n    {\n      registerFrontend_args args = new registerFrontend_args();\n      args.setApp(app);\n      args.setSocketAddress(socketAddress);\n      sendBase(\"registerFrontend\", args);\n    }\n\n    public boolean recv_registerFrontend() throws org.apache.thrift.TException\n    {\n      registerFrontend_result result = new registerFrontend_result();\n      receiveBase(result, \"registerFrontend\");\n      if (result.isSetSuccess()) {\n        return result.success;\n      }\n      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, \"registerFrontend failed: unknown result\");\n    }\n\n    public void submitJob(edu.berkeley.sparrow.thrift.TSchedulingRequest req) throws edu.berkeley.sparrow.thrift.IncompleteRequestException, org.apache.thrift.TException\n    {\n      send_submitJob(req);\n      recv_submitJob();\n    }\n\n    public void send_submitJob(edu.berkeley.sparrow.thrift.TSchedulingRequest req) throws org.apache.thrift.TException\n    {\n      submitJob_args args = new submitJob_args();\n      args.setReq(req);\n      sendBase(\"submitJob\", args);\n    }\n\n    public void recv_submitJob() throws edu.berkeley.sparrow.thrift.IncompleteRequestException, org.apache.thrift.TException\n    {\n      submitJob_result result = new submitJob_result();\n      receiveBase(result, \"submitJob\");\n      if (result.e != null) {\n        throw result.e;\n      }\n      return;\n    }\n\n    public void sendFrontendMessage(String app, edu.berkeley.sparrow.thrift.TFullTaskId taskId, int status, ByteBuffer message) throws org.apache.thrift.TException\n    {\n      send_sendFrontendMessage(app, taskId, status, message);\n      recv_sendFrontendMessage();\n    }\n\n    public void send_sendFrontendMessage(String app, edu.berkeley.sparrow.thrift.TFullTaskId taskId, int status, ByteBuffer message) throws org.apache.thrift.TException\n    {\n      sendFrontendMessage_args args = new sendFrontendMessage_args();\n      args.setApp(app);\n      args.setTaskId(taskId);\n      args.setStatus(status);\n      args.setMessage(message);\n      sendBase(\"sendFrontendMessage\", args);\n    }\n\n    public void recv_sendFrontendMessage() throws org.apache.thrift.TException\n    {\n      sendFrontendMessage_result result = new sendFrontendMessage_result();\n      receiveBase(result, \"sendFrontendMessage\");\n      return;\n    }\n\n  }\n  public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface {\n    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {\n      private org.apache.thrift.async.TAsyncClientManager clientManager;\n      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;\n      public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {\n        this.clientManager = clientManager;\n        this.protocolFactory = protocolFactory;\n      }\n      public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {\n        return new AsyncClient(protocolFactory, clientManager, transport);\n      }\n    }\n\n    public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {\n      super(protocolFactory, clientManager, transport);\n    }\n\n    public void registerFrontend(String app, String socketAddress, org.apache.thrift.async.AsyncMethodCallback<registerFrontend_call> resultHandler) throws org.apache.thrift.TException {\n      checkReady();\n      registerFrontend_call method_call = new registerFrontend_call(app, socketAddress, resultHandler, this, ___protocolFactory, ___transport);\n      this.___currentMethod = method_call;\n      ___manager.call(method_call);\n    }\n\n    public static class registerFrontend_call extends org.apache.thrift.async.TAsyncMethodCall {\n      private String app;\n      private String socketAddress;\n      public registerFrontend_call(String app, String socketAddress, org.apache.thrift.async.AsyncMethodCallback<registerFrontend_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {\n        super(client, protocolFactory, transport, resultHandler, false);\n        this.app = app;\n        this.socketAddress = socketAddress;\n      }\n\n      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {\n        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage(\"registerFrontend\", org.apache.thrift.protocol.TMessageType.CALL, 0));\n        registerFrontend_args args = new registerFrontend_args();\n        args.setApp(app);\n        args.setSocketAddress(socketAddress);\n        args.write(prot);\n        prot.writeMessageEnd();\n      }\n\n      public boolean getResult() throws org.apache.thrift.TException {\n        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {\n          throw new IllegalStateException(\"Method call not finished!\");\n        }\n        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());\n        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);\n        return (new Client(prot)).recv_registerFrontend();\n      }\n    }\n\n    public void submitJob(edu.berkeley.sparrow.thrift.TSchedulingRequest req, org.apache.thrift.async.AsyncMethodCallback<submitJob_call> resultHandler) throws org.apache.thrift.TException {\n      checkReady();\n      submitJob_call method_call = new submitJob_call(req, resultHandler, this, ___protocolFactory, ___transport);\n      this.___currentMethod = method_call;\n      ___manager.call(method_call);\n    }\n\n    public static class submitJob_call extends org.apache.thrift.async.TAsyncMethodCall {\n      private edu.berkeley.sparrow.thrift.TSchedulingRequest req;\n      public submitJob_call(edu.berkeley.sparrow.thrift.TSchedulingRequest req, org.apache.thrift.async.AsyncMethodCallback<submitJob_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {\n        super(client, protocolFactory, transport, resultHandler, false);\n        this.req = req;\n      }\n\n      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {\n        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage(\"submitJob\", org.apache.thrift.protocol.TMessageType.CALL, 0));\n        submitJob_args args = new submitJob_args();\n        args.setReq(req);\n        args.write(prot);\n        prot.writeMessageEnd();\n      }\n\n      public void getResult() throws edu.berkeley.sparrow.thrift.IncompleteRequestException, org.apache.thrift.TException {\n        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {\n          throw new IllegalStateException(\"Method call not finished!\");\n        }\n        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());\n        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);\n        (new Client(prot)).recv_submitJob();\n      }\n    }\n\n    public void sendFrontendMessage(String app, edu.berkeley.sparrow.thrift.TFullTaskId taskId, int status, ByteBuffer message, org.apache.thrift.async.AsyncMethodCallback<sendFrontendMessage_call> resultHandler) throws org.apache.thrift.TException {\n      checkReady();\n      sendFrontendMessage_call method_call = new sendFrontendMessage_call(app, taskId, status, message, resultHandler, this, ___protocolFactory, ___transport);\n      this.___currentMethod = method_call;\n      ___manager.call(method_call);\n    }\n\n    public static class sendFrontendMessage_call extends org.apache.thrift.async.TAsyncMethodCall {\n      private String app;\n      private edu.berkeley.sparrow.thrift.TFullTaskId taskId;\n      private int status;\n      private ByteBuffer message;\n      public sendFrontendMessage_call(String app, edu.berkeley.sparrow.thrift.TFullTaskId taskId, int status, ByteBuffer message, org.apache.thrift.async.AsyncMethodCallback<sendFrontendMessage_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {\n        super(client, protocolFactory, transport, resultHandler, false);\n        this.app = app;\n        this.taskId = taskId;\n        this.status = status;\n        this.message = message;\n      }\n\n      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {\n        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage(\"sendFrontendMessage\", org.apache.thrift.protocol.TMessageType.CALL, 0));\n        sendFrontendMessage_args args = new sendFrontendMessage_args();\n        args.setApp(app);\n        args.setTaskId(taskId);\n        args.setStatus(status);\n        args.setMessage(message);\n        args.write(prot);\n        prot.writeMessageEnd();\n      }\n\n      public void getResult() throws org.apache.thrift.TException {\n        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {\n          throw new IllegalStateException(\"Method call not finished!\");\n        }\n        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());\n        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);\n        (new Client(prot)).recv_sendFrontendMessage();\n      }\n    }\n\n  }\n\n  public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor {\n    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());\n    public Processor(I iface) {\n      super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));\n    }\n\n    protected Processor(I iface, Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {\n      super(iface, getProcessMap(processMap));\n    }\n\n    private static <I extends Iface> Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> getProcessMap(Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {\n      processMap.put(\"registerFrontend\", new registerFrontend());\n      processMap.put(\"submitJob\", new submitJob());\n      processMap.put(\"sendFrontendMessage\", new sendFrontendMessage());\n      return processMap;\n    }\n\n    private static class registerFrontend<I extends Iface> extends org.apache.thrift.ProcessFunction<I, registerFrontend_args> {\n      public registerFrontend() {\n        super(\"registerFrontend\");\n      }\n\n      protected registerFrontend_args getEmptyArgsInstance() {\n        return new registerFrontend_args();\n      }\n\n      protected registerFrontend_result getResult(I iface, registerFrontend_args args) throws org.apache.thrift.TException {\n        registerFrontend_result result = new registerFrontend_result();\n        result.success = iface.registerFrontend(args.app, args.socketAddress);\n        result.setSuccessIsSet(true);\n        return result;\n      }\n    }\n\n    private static class submitJob<I extends Iface> extends org.apache.thrift.ProcessFunction<I, submitJob_args> {\n      public submitJob() {\n        super(\"submitJob\");\n      }\n\n      protected submitJob_args getEmptyArgsInstance() {\n        return new submitJob_args();\n      }\n\n      protected submitJob_result getResult(I iface, submitJob_args args) throws org.apache.thrift.TException {\n        submitJob_result result = new submitJob_result();\n        try {\n          iface.submitJob(args.req);\n        } catch (edu.berkeley.sparrow.thrift.IncompleteRequestException e) {\n          result.e = e;\n        }\n        return result;\n      }\n    }\n\n    private static class sendFrontendMessage<I extends Iface> extends org.apache.thrift.ProcessFunction<I, sendFrontendMessage_args> {\n      public sendFrontendMessage() {\n        super(\"sendFrontendMessage\");\n      }\n\n      protected sendFrontendMessage_args getEmptyArgsInstance() {\n        return new sendFrontendMessage_args();\n      }\n\n      protected sendFrontendMessage_result getResult(I iface, sendFrontendMessage_args args) throws org.apache.thrift.TException {\n        sendFrontendMessage_result result = new sendFrontendMessage_result();\n        iface.sendFrontendMessage(args.app, args.taskId, args.status, args.message);\n        return result;\n      }\n    }\n\n  }\n\n  public static class registerFrontend_args implements org.apache.thrift.TBase<registerFrontend_args, registerFrontend_args._Fields>, java.io.Serializable, Cloneable   {\n    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct(\"registerFrontend_args\");\n\n    private static final org.apache.thrift.protocol.TField APP_FIELD_DESC = new org.apache.thrift.protocol.TField(\"app\", org.apache.thrift.protocol.TType.STRING, (short)1);\n    private static final org.apache.thrift.protocol.TField SOCKET_ADDRESS_FIELD_DESC = new org.apache.thrift.protocol.TField(\"socketAddress\", org.apache.thrift.protocol.TType.STRING, (short)2);\n\n    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();\n    static {\n      schemes.put(StandardScheme.class, new registerFrontend_argsStandardSchemeFactory());\n      schemes.put(TupleScheme.class, new registerFrontend_argsTupleSchemeFactory());\n    }\n\n    public String app; // required\n    public String socketAddress; // required\n\n    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */\n    public enum _Fields implements org.apache.thrift.TFieldIdEnum {\n      APP((short)1, \"app\"),\n      SOCKET_ADDRESS((short)2, \"socketAddress\");\n\n      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();\n\n      static {\n        for (_Fields field : EnumSet.allOf(_Fields.class)) {\n          byName.put(field.getFieldName(), field);\n        }\n      }\n\n      /**\n       * Find the _Fields constant that matches fieldId, or null if its not found.\n       */\n      public static _Fields findByThriftId(int fieldId) {\n        switch(fieldId) {\n          case 1: // APP\n            return APP;\n          case 2: // SOCKET_ADDRESS\n            return SOCKET_ADDRESS;\n          default:\n            return null;\n        }\n      }\n\n      /**\n       * Find the _Fields constant that matches fieldId, throwing an exception\n       * if it is not found.\n       */\n      public static _Fields findByThriftIdOrThrow(int fieldId) {\n        _Fields fields = findByThriftId(fieldId);\n        if (fields == null) throw new IllegalArgumentException(\"Field \" + fieldId + \" doesn't exist!\");\n        return fields;\n      }\n\n      /**\n       * Find the _Fields constant that matches name, or null if its not found.\n       */\n      public static _Fields findByName(String name) {\n        return byName.get(name);\n      }\n\n      private final short _thriftId;\n      private final String _fieldName;\n\n      _Fields(short thriftId, String fieldName) {\n        _thriftId = thriftId;\n        _fieldName = fieldName;\n      }\n\n      public short getThriftFieldId() {\n        return _thriftId;\n      }\n\n      public String getFieldName() {\n        return _fieldName;\n      }\n    }\n\n    // isset id assignments\n    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;\n    static {\n      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);\n      tmpMap.put(_Fields.APP, new org.apache.thrift.meta_data.FieldMetaData(\"app\", org.apache.thrift.TFieldRequirementType.DEFAULT, \n          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));\n      tmpMap.put(_Fields.SOCKET_ADDRESS, new org.apache.thrift.meta_data.FieldMetaData(\"socketAddress\", org.apache.thrift.TFieldRequirementType.DEFAULT, \n          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));\n      metaDataMap = Collections.unmodifiableMap(tmpMap);\n      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(registerFrontend_args.class, metaDataMap);\n    }\n\n    public registerFrontend_args() {\n    }\n\n    public registerFrontend_args(\n      String app,\n      String socketAddress)\n    {\n      this();\n      this.app = app;\n      this.socketAddress = socketAddress;\n    }\n\n    /**\n     * Performs a deep copy on <i>other</i>.\n     */\n    public registerFrontend_args(registerFrontend_args other) {\n      if (other.isSetApp()) {\n        this.app = other.app;\n      }\n      if (other.isSetSocketAddress()) {\n        this.socketAddress = other.socketAddress;\n      }\n    }\n\n    public registerFrontend_args deepCopy() {\n      return new registerFrontend_args(this);\n    }\n\n    public void clear() {\n      this.app = null;\n      this.socketAddress = null;\n    }\n\n    public String getApp() {\n      return this.app;\n    }\n\n    public registerFrontend_args setApp(String app) {\n      this.app = app;\n      return this;\n    }\n\n    public void unsetApp() {\n      this.app = null;\n    }\n\n    /** Returns true if field app is set (has been assigned a value) and false otherwise */\n    public boolean isSetApp() {\n      return this.app != null;\n    }\n\n    public void setAppIsSet(boolean value) {\n      if (!value) {\n        this.app = null;\n      }\n    }\n\n    public String getSocketAddress() {\n      return this.socketAddress;\n    }\n\n    public registerFrontend_args setSocketAddress(String socketAddress) {\n      this.socketAddress = socketAddress;\n      return this;\n    }\n\n    public void unsetSocketAddress() {\n      this.socketAddress = null;\n    }\n\n    /** Returns true if field socketAddress is set (has been assigned a value) and false otherwise */\n    public boolean isSetSocketAddress() {\n      return this.socketAddress != null;\n    }\n\n    public void setSocketAddressIsSet(boolean value) {\n      if (!value) {\n        this.socketAddress = null;\n      }\n    }\n\n    public void setFieldValue(_Fields field, Object value) {\n      switch (field) {\n      case APP:\n        if (value == null) {\n          unsetApp();\n        } else {\n          setApp((String)value);\n        }\n        break;\n\n      case SOCKET_ADDRESS:\n        if (value == null) {\n          unsetSocketAddress();\n        } else {\n          setSocketAddress((String)value);\n        }\n        break;\n\n      }\n    }\n\n    public Object getFieldValue(_Fields field) {\n      switch (field) {\n      case APP:\n        return getApp();\n\n      case SOCKET_ADDRESS:\n        return getSocketAddress();\n\n      }\n      throw new IllegalStateException();\n    }\n\n    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */\n    public boolean isSet(_Fields field) {\n      if (field == null) {\n        throw new IllegalArgumentException();\n      }\n\n      switch (field) {\n      case APP:\n        return isSetApp();\n      case SOCKET_ADDRESS:\n        return isSetSocketAddress();\n      }\n      throw new IllegalStateException();\n    }\n\n    @Override\n    public boolean equals(Object that) {\n      if (that == null)\n        return false;\n      if (that instanceof registerFrontend_args)\n        return this.equals((registerFrontend_args)that);\n      return false;\n    }\n\n    public boolean equals(registerFrontend_args that) {\n      if (that == null)\n        return false;\n\n      boolean this_present_app = true && this.isSetApp();\n      boolean that_present_app = true && that.isSetApp();\n      if (this_present_app || that_present_app) {\n        if (!(this_present_app && that_present_app))\n          return false;\n        if (!this.app.equals(that.app))\n          return false;\n      }\n\n      boolean this_present_socketAddress = true && this.isSetSocketAddress();\n      boolean that_present_socketAddress = true && that.isSetSocketAddress();\n      if (this_present_socketAddress || that_present_socketAddress) {\n        if (!(this_present_socketAddress && that_present_socketAddress))\n          return false;\n        if (!this.socketAddress.equals(that.socketAddress))\n          return false;\n      }\n\n      return true;\n    }\n\n    @Override\n    public int hashCode() {\n      return 0;\n    }\n\n    public int compareTo(registerFrontend_args other) {\n      if (!getClass().equals(other.getClass())) {\n        return getClass().getName().compareTo(other.getClass().getName());\n      }\n\n      int lastComparison = 0;\n      registerFrontend_args typedOther = (registerFrontend_args)other;\n\n      lastComparison = Boolean.valueOf(isSetApp()).compareTo(typedOther.isSetApp());\n      if (lastComparison != 0) {\n        return lastComparison;\n      }\n      if (isSetApp()) {\n        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.app, typedOther.app);\n        if (lastComparison != 0) {\n          return lastComparison;\n        }\n      }\n      lastComparison = Boolean.valueOf(isSetSocketAddress()).compareTo(typedOther.isSetSocketAddress());\n      if (lastComparison != 0) {\n        return lastComparison;\n      }\n      if (isSetSocketAddress()) {\n        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.socketAddress, typedOther.socketAddress);\n        if (lastComparison != 0) {\n          return lastComparison;\n        }\n      }\n      return 0;\n    }\n\n    public _Fields fieldForId(int fieldId) {\n      return _Fields.findByThriftId(fieldId);\n    }\n\n    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {\n      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);\n    }\n\n    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {\n      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);\n    }\n\n    @Override\n    public String toString() {\n      StringBuilder sb = new StringBuilder(\"registerFrontend_args(\");\n      boolean first = true;\n\n      sb.append(\"app:\");\n      if (this.app == null) {\n        sb.append(\"null\");\n      } else {\n        sb.append(this.app);\n      }\n      first = false;\n      if (!first) sb.append(\", \");\n      sb.append(\"socketAddress:\");\n      if (this.socketAddress == null) {\n        sb.append(\"null\");\n      } else {\n        sb.append(this.socketAddress);\n      }\n      first = false;\n      sb.append(\")\");\n      return sb.toString();\n    }\n\n    public void validate() throws org.apache.thrift.TException {\n      // check for required fields\n    }\n\n    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {\n      try {\n        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));\n      } catch (org.apache.thrift.TException te) {\n        throw new java.io.IOException(te.getMessage());\n      }\n    }\n\n    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {\n      try {\n        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));\n      } catch (org.apache.thrift.TException te) {\n        throw new java.io.IOException(te.getMessage());\n      }\n    }\n\n    private static class registerFrontend_argsStandardSchemeFactory implements SchemeFactory {\n      public registerFrontend_argsStandardScheme getScheme() {\n        return new registerFrontend_argsStandardScheme();\n      }\n    }\n\n    private static class registerFrontend_argsStandardScheme extends StandardScheme<registerFrontend_args> {\n\n      public void read(org.apache.thrift.protocol.TProtocol iprot, registerFrontend_args struct) throws org.apache.thrift.TException {\n        org.apache.thrift.protocol.TField schemeField;\n        iprot.readStructBegin();\n        while (true)\n        {\n          schemeField = iprot.readFieldBegin();\n          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { \n            break;\n          }\n          switch (schemeField.id) {\n            case 1: // APP\n              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {\n                struct.app = iprot.readString();\n                struct.setAppIsSet(true);\n              } else { \n                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n              }\n              break;\n            case 2: // SOCKET_ADDRESS\n              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {\n                struct.socketAddress = iprot.readString();\n                struct.setSocketAddressIsSet(true);\n              } else { \n                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n              }\n              break;\n            default:\n              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n          }\n          iprot.readFieldEnd();\n        }\n        iprot.readStructEnd();\n\n        // check for required fields of primitive type, which can't be checked in the validate method\n        struct.validate();\n      }\n\n      public void write(org.apache.thrift.protocol.TProtocol oprot, registerFrontend_args struct) throws org.apache.thrift.TException {\n        struct.validate();\n\n        oprot.writeStructBegin(STRUCT_DESC);\n        if (struct.app != null) {\n          oprot.writeFieldBegin(APP_FIELD_DESC);\n          oprot.writeString(struct.app);\n          oprot.writeFieldEnd();\n        }\n        if (struct.socketAddress != null) {\n          oprot.writeFieldBegin(SOCKET_ADDRESS_FIELD_DESC);\n          oprot.writeString(struct.socketAddress);\n          oprot.writeFieldEnd();\n        }\n        oprot.writeFieldStop();\n        oprot.writeStructEnd();\n      }\n\n    }\n\n    private static class registerFrontend_argsTupleSchemeFactory implements SchemeFactory {\n      public registerFrontend_argsTupleScheme getScheme() {\n        return new registerFrontend_argsTupleScheme();\n      }\n    }\n\n    private static class registerFrontend_argsTupleScheme extends TupleScheme<registerFrontend_args> {\n\n      @Override\n      public void write(org.apache.thrift.protocol.TProtocol prot, registerFrontend_args struct) throws org.apache.thrift.TException {\n        TTupleProtocol oprot = (TTupleProtocol) prot;\n        BitSet optionals = new BitSet();\n        if (struct.isSetApp()) {\n          optionals.set(0);\n        }\n        if (struct.isSetSocketAddress()) {\n          optionals.set(1);\n        }\n        oprot.writeBitSet(optionals, 2);\n        if (struct.isSetApp()) {\n          oprot.writeString(struct.app);\n        }\n        if (struct.isSetSocketAddress()) {\n          oprot.writeString(struct.socketAddress);\n        }\n      }\n\n      @Override\n      public void read(org.apache.thrift.protocol.TProtocol prot, registerFrontend_args struct) throws org.apache.thrift.TException {\n        TTupleProtocol iprot = (TTupleProtocol) prot;\n        BitSet incoming = iprot.readBitSet(2);\n        if (incoming.get(0)) {\n          struct.app = iprot.readString();\n          struct.setAppIsSet(true);\n        }\n        if (incoming.get(1)) {\n          struct.socketAddress = iprot.readString();\n          struct.setSocketAddressIsSet(true);\n        }\n      }\n    }\n\n  }\n\n  public static class registerFrontend_result implements org.apache.thrift.TBase<registerFrontend_result, registerFrontend_result._Fields>, java.io.Serializable, Cloneable   {\n    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct(\"registerFrontend_result\");\n\n    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField(\"success\", org.apache.thrift.protocol.TType.BOOL, (short)0);\n\n    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();\n    static {\n      schemes.put(StandardScheme.class, new registerFrontend_resultStandardSchemeFactory());\n      schemes.put(TupleScheme.class, new registerFrontend_resultTupleSchemeFactory());\n    }\n\n    public boolean success; // required\n\n    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */\n    public enum _Fields implements org.apache.thrift.TFieldIdEnum {\n      SUCCESS((short)0, \"success\");\n\n      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();\n\n      static {\n        for (_Fields field : EnumSet.allOf(_Fields.class)) {\n          byName.put(field.getFieldName(), field);\n        }\n      }\n\n      /**\n       * Find the _Fields constant that matches fieldId, or null if its not found.\n       */\n      public static _Fields findByThriftId(int fieldId) {\n        switch(fieldId) {\n          case 0: // SUCCESS\n            return SUCCESS;\n          default:\n            return null;\n        }\n      }\n\n      /**\n       * Find the _Fields constant that matches fieldId, throwing an exception\n       * if it is not found.\n       */\n      public static _Fields findByThriftIdOrThrow(int fieldId) {\n        _Fields fields = findByThriftId(fieldId);\n        if (fields == null) throw new IllegalArgumentException(\"Field \" + fieldId + \" doesn't exist!\");\n        return fields;\n      }\n\n      /**\n       * Find the _Fields constant that matches name, or null if its not found.\n       */\n      public static _Fields findByName(String name) {\n        return byName.get(name);\n      }\n\n      private final short _thriftId;\n      private final String _fieldName;\n\n      _Fields(short thriftId, String fieldName) {\n        _thriftId = thriftId;\n        _fieldName = fieldName;\n      }\n\n      public short getThriftFieldId() {\n        return _thriftId;\n      }\n\n      public String getFieldName() {\n        return _fieldName;\n      }\n    }\n\n    // isset id assignments\n    private static final int __SUCCESS_ISSET_ID = 0;\n    private BitSet __isset_bit_vector = new BitSet(1);\n    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;\n    static {\n      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);\n      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData(\"success\", org.apache.thrift.TFieldRequirementType.DEFAULT, \n          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));\n      metaDataMap = Collections.unmodifiableMap(tmpMap);\n      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(registerFrontend_result.class, metaDataMap);\n    }\n\n    public registerFrontend_result() {\n    }\n\n    public registerFrontend_result(\n      boolean success)\n    {\n      this();\n      this.success = success;\n      setSuccessIsSet(true);\n    }\n\n    /**\n     * Performs a deep copy on <i>other</i>.\n     */\n    public registerFrontend_result(registerFrontend_result other) {\n      __isset_bit_vector.clear();\n      __isset_bit_vector.or(other.__isset_bit_vector);\n      this.success = other.success;\n    }\n\n    public registerFrontend_result deepCopy() {\n      return new registerFrontend_result(this);\n    }\n\n    public void clear() {\n      setSuccessIsSet(false);\n      this.success = false;\n    }\n\n    public boolean isSuccess() {\n      return this.success;\n    }\n\n    public registerFrontend_result setSuccess(boolean success) {\n      this.success = success;\n      setSuccessIsSet(true);\n      return this;\n    }\n\n    public void unsetSuccess() {\n      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);\n    }\n\n    /** Returns true if field success is set (has been assigned a value) and false otherwise */\n    public boolean isSetSuccess() {\n      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);\n    }\n\n    public void setSuccessIsSet(boolean value) {\n      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);\n    }\n\n    public void setFieldValue(_Fields field, Object value) {\n      switch (field) {\n      case SUCCESS:\n        if (value == null) {\n          unsetSuccess();\n        } else {\n          setSuccess((Boolean)value);\n        }\n        break;\n\n      }\n    }\n\n    public Object getFieldValue(_Fields field) {\n      switch (field) {\n      case SUCCESS:\n        return Boolean.valueOf(isSuccess());\n\n      }\n      throw new IllegalStateException();\n    }\n\n    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */\n    public boolean isSet(_Fields field) {\n      if (field == null) {\n        throw new IllegalArgumentException();\n      }\n\n      switch (field) {\n      case SUCCESS:\n        return isSetSuccess();\n      }\n      throw new IllegalStateException();\n    }\n\n    @Override\n    public boolean equals(Object that) {\n      if (that == null)\n        return false;\n      if (that instanceof registerFrontend_result)\n        return this.equals((registerFrontend_result)that);\n      return false;\n    }\n\n    public boolean equals(registerFrontend_result that) {\n      if (that == null)\n        return false;\n\n      boolean this_present_success = true;\n      boolean that_present_success = true;\n      if (this_present_success || that_present_success) {\n        if (!(this_present_success && that_present_success))\n          return false;\n        if (this.success != that.success)\n          return false;\n      }\n\n      return true;\n    }\n\n    @Override\n    public int hashCode() {\n      return 0;\n    }\n\n    public int compareTo(registerFrontend_result other) {\n      if (!getClass().equals(other.getClass())) {\n        return getClass().getName().compareTo(other.getClass().getName());\n      }\n\n      int lastComparison = 0;\n      registerFrontend_result typedOther = (registerFrontend_result)other;\n\n      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());\n      if (lastComparison != 0) {\n        return lastComparison;\n      }\n      if (isSetSuccess()) {\n        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);\n        if (lastComparison != 0) {\n          return lastComparison;\n        }\n      }\n      return 0;\n    }\n\n    public _Fields fieldForId(int fieldId) {\n      return _Fields.findByThriftId(fieldId);\n    }\n\n    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {\n      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);\n    }\n\n    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {\n      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);\n      }\n\n    @Override\n    public String toString() {\n      StringBuilder sb = new StringBuilder(\"registerFrontend_result(\");\n      boolean first = true;\n\n      sb.append(\"success:\");\n      sb.append(this.success);\n      first = false;\n      sb.append(\")\");\n      return sb.toString();\n    }\n\n    public void validate() throws org.apache.thrift.TException {\n      // check for required fields\n    }\n\n    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {\n      try {\n        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));\n      } catch (org.apache.thrift.TException te) {\n        throw new java.io.IOException(te.getMessage());\n      }\n    }\n\n    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {\n      try {\n        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.\n        __isset_bit_vector = new BitSet(1);\n        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));\n      } catch (org.apache.thrift.TException te) {\n        throw new java.io.IOException(te.getMessage());\n      }\n    }\n\n    private static class registerFrontend_resultStandardSchemeFactory implements SchemeFactory {\n      public registerFrontend_resultStandardScheme getScheme() {\n        return new registerFrontend_resultStandardScheme();\n      }\n    }\n\n    private static class registerFrontend_resultStandardScheme extends StandardScheme<registerFrontend_result> {\n\n      public void read(org.apache.thrift.protocol.TProtocol iprot, registerFrontend_result struct) throws org.apache.thrift.TException {\n        org.apache.thrift.protocol.TField schemeField;\n        iprot.readStructBegin();\n        while (true)\n        {\n          schemeField = iprot.readFieldBegin();\n          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { \n            break;\n          }\n          switch (schemeField.id) {\n            case 0: // SUCCESS\n              if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {\n                struct.success = iprot.readBool();\n                struct.setSuccessIsSet(true);\n              } else { \n                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n              }\n              break;\n            default:\n              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n          }\n          iprot.readFieldEnd();\n        }\n        iprot.readStructEnd();\n\n        // check for required fields of primitive type, which can't be checked in the validate method\n        struct.validate();\n      }\n\n      public void write(org.apache.thrift.protocol.TProtocol oprot, registerFrontend_result struct) throws org.apache.thrift.TException {\n        struct.validate();\n\n        oprot.writeStructBegin(STRUCT_DESC);\n        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);\n        oprot.writeBool(struct.success);\n        oprot.writeFieldEnd();\n        oprot.writeFieldStop();\n        oprot.writeStructEnd();\n      }\n\n    }\n\n    private static class registerFrontend_resultTupleSchemeFactory implements SchemeFactory {\n      public registerFrontend_resultTupleScheme getScheme() {\n        return new registerFrontend_resultTupleScheme();\n      }\n    }\n\n    private static class registerFrontend_resultTupleScheme extends TupleScheme<registerFrontend_result> {\n\n      @Override\n      public void write(org.apache.thrift.protocol.TProtocol prot, registerFrontend_result struct) throws org.apache.thrift.TException {\n        TTupleProtocol oprot = (TTupleProtocol) prot;\n        BitSet optionals = new BitSet();\n        if (struct.isSetSuccess()) {\n          optionals.set(0);\n        }\n        oprot.writeBitSet(optionals, 1);\n        if (struct.isSetSuccess()) {\n          oprot.writeBool(struct.success);\n        }\n      }\n\n      @Override\n      public void read(org.apache.thrift.protocol.TProtocol prot, registerFrontend_result struct) throws org.apache.thrift.TException {\n        TTupleProtocol iprot = (TTupleProtocol) prot;\n        BitSet incoming = iprot.readBitSet(1);\n        if (incoming.get(0)) {\n          struct.success = iprot.readBool();\n          struct.setSuccessIsSet(true);\n        }\n      }\n    }\n\n  }\n\n  public static class submitJob_args implements org.apache.thrift.TBase<submitJob_args, submitJob_args._Fields>, java.io.Serializable, Cloneable   {\n    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct(\"submitJob_args\");\n\n    private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField(\"req\", org.apache.thrift.protocol.TType.STRUCT, (short)1);\n\n    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();\n    static {\n      schemes.put(StandardScheme.class, new submitJob_argsStandardSchemeFactory());\n      schemes.put(TupleScheme.class, new submitJob_argsTupleSchemeFactory());\n    }\n\n    public edu.berkeley.sparrow.thrift.TSchedulingRequest req; // required\n\n    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */\n    public enum _Fields implements org.apache.thrift.TFieldIdEnum {\n      REQ((short)1, \"req\");\n\n      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();\n\n      static {\n        for (_Fields field : EnumSet.allOf(_Fields.class)) {\n          byName.put(field.getFieldName(), field);\n        }\n      }\n\n      /**\n       * Find the _Fields constant that matches fieldId, or null if its not found.\n       */\n      public static _Fields findByThriftId(int fieldId) {\n        switch(fieldId) {\n          case 1: // REQ\n            return REQ;\n          default:\n            return null;\n        }\n      }\n\n      /**\n       * Find the _Fields constant that matches fieldId, throwing an exception\n       * if it is not found.\n       */\n      public static _Fields findByThriftIdOrThrow(int fieldId) {\n        _Fields fields = findByThriftId(fieldId);\n        if (fields == null) throw new IllegalArgumentException(\"Field \" + fieldId + \" doesn't exist!\");\n        return fields;\n      }\n\n      /**\n       * Find the _Fields constant that matches name, or null if its not found.\n       */\n      public static _Fields findByName(String name) {\n        return byName.get(name);\n      }\n\n      private final short _thriftId;\n      private final String _fieldName;\n\n      _Fields(short thriftId, String fieldName) {\n        _thriftId = thriftId;\n        _fieldName = fieldName;\n      }\n\n      public short getThriftFieldId() {\n        return _thriftId;\n      }\n\n      public String getFieldName() {\n        return _fieldName;\n      }\n    }\n\n    // isset id assignments\n    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;\n    static {\n      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);\n      tmpMap.put(_Fields.REQ, new org.apache.thrift.meta_data.FieldMetaData(\"req\", org.apache.thrift.TFieldRequirementType.DEFAULT, \n          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, edu.berkeley.sparrow.thrift.TSchedulingRequest.class)));\n      metaDataMap = Collections.unmodifiableMap(tmpMap);\n      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(submitJob_args.class, metaDataMap);\n    }\n\n    public submitJob_args() {\n    }\n\n    public submitJob_args(\n      edu.berkeley.sparrow.thrift.TSchedulingRequest req)\n    {\n      this();\n      this.req = req;\n    }\n\n    /**\n     * Performs a deep copy on <i>other</i>.\n     */\n    public submitJob_args(submitJob_args other) {\n      if (other.isSetReq()) {\n        this.req = new edu.berkeley.sparrow.thrift.TSchedulingRequest(other.req);\n      }\n    }\n\n    public submitJob_args deepCopy() {\n      return new submitJob_args(this);\n    }\n\n    public void clear() {\n      this.req = null;\n    }\n\n    public edu.berkeley.sparrow.thrift.TSchedulingRequest getReq() {\n      return this.req;\n    }\n\n    public submitJob_args setReq(edu.berkeley.sparrow.thrift.TSchedulingRequest req) {\n      this.req = req;\n      return this;\n    }\n\n    public void unsetReq() {\n      this.req = null;\n    }\n\n    /** Returns true if field req is set (has been assigned a value) and false otherwise */\n    public boolean isSetReq() {\n      return this.req != null;\n    }\n\n    public void setReqIsSet(boolean value) {\n      if (!value) {\n        this.req = null;\n      }\n    }\n\n    public void setFieldValue(_Fields field, Object value) {\n      switch (field) {\n      case REQ:\n        if (value == null) {\n          unsetReq();\n        } else {\n          setReq((edu.berkeley.sparrow.thrift.TSchedulingRequest)value);\n        }\n        break;\n\n      }\n    }\n\n    public Object getFieldValue(_Fields field) {\n      switch (field) {\n      case REQ:\n        return getReq();\n\n      }\n      throw new IllegalStateException();\n    }\n\n    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */\n    public boolean isSet(_Fields field) {\n      if (field == null) {\n        throw new IllegalArgumentException();\n      }\n\n      switch (field) {\n      case REQ:\n        return isSetReq();\n      }\n      throw new IllegalStateException();\n    }\n\n    @Override\n    public boolean equals(Object that) {\n      if (that == null)\n        return false;\n      if (that instanceof submitJob_args)\n        return this.equals((submitJob_args)that);\n      return false;\n    }\n\n    public boolean equals(submitJob_args that) {\n      if (that == null)\n        return false;\n\n      boolean this_present_req = true && this.isSetReq();\n      boolean that_present_req = true && that.isSetReq();\n      if (this_present_req || that_present_req) {\n        if (!(this_present_req && that_present_req))\n          return false;\n        if (!this.req.equals(that.req))\n          return false;\n      }\n\n      return true;\n    }\n\n    @Override\n    public int hashCode() {\n      return 0;\n    }\n\n    public int compareTo(submitJob_args other) {\n      if (!getClass().equals(other.getClass())) {\n        return getClass().getName().compareTo(other.getClass().getName());\n      }\n\n      int lastComparison = 0;\n      submitJob_args typedOther = (submitJob_args)other;\n\n      lastComparison = Boolean.valueOf(isSetReq()).compareTo(typedOther.isSetReq());\n      if (lastComparison != 0) {\n        return lastComparison;\n      }\n      if (isSetReq()) {\n        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, typedOther.req);\n        if (lastComparison != 0) {\n          return lastComparison;\n        }\n      }\n      return 0;\n    }\n\n    public _Fields fieldForId(int fieldId) {\n      return _Fields.findByThriftId(fieldId);\n    }\n\n    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {\n      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);\n    }\n\n    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {\n      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);\n    }\n\n    @Override\n    public String toString() {\n      StringBuilder sb = new StringBuilder(\"submitJob_args(\");\n      boolean first = true;\n\n      sb.append(\"req:\");\n      if (this.req == null) {\n        sb.append(\"null\");\n      } else {\n        sb.append(this.req);\n      }\n      first = false;\n      sb.append(\")\");\n      return sb.toString();\n    }\n\n    public void validate() throws org.apache.thrift.TException {\n      // check for required fields\n    }\n\n    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {\n      try {\n        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));\n      } catch (org.apache.thrift.TException te) {\n        throw new java.io.IOException(te.getMessage());\n      }\n    }\n\n    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {\n      try {\n        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));\n      } catch (org.apache.thrift.TException te) {\n        throw new java.io.IOException(te.getMessage());\n      }\n    }\n\n    private static class submitJob_argsStandardSchemeFactory implements SchemeFactory {\n      public submitJob_argsStandardScheme getScheme() {\n        return new submitJob_argsStandardScheme();\n      }\n    }\n\n    private static class submitJob_argsStandardScheme extends StandardScheme<submitJob_args> {\n\n      public void read(org.apache.thrift.protocol.TProtocol iprot, submitJob_args struct) throws org.apache.thrift.TException {\n        org.apache.thrift.protocol.TField schemeField;\n        iprot.readStructBegin();\n        while (true)\n        {\n          schemeField = iprot.readFieldBegin();\n          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { \n            break;\n          }\n          switch (schemeField.id) {\n            case 1: // REQ\n              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {\n                struct.req = new edu.berkeley.sparrow.thrift.TSchedulingRequest();\n                struct.req.read(iprot);\n                struct.setReqIsSet(true);\n              } else { \n                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n              }\n              break;\n            default:\n              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n          }\n          iprot.readFieldEnd();\n        }\n        iprot.readStructEnd();\n\n        // check for required fields of primitive type, which can't be checked in the validate method\n        struct.validate();\n      }\n\n      public void write(org.apache.thrift.protocol.TProtocol oprot, submitJob_args struct) throws org.apache.thrift.TException {\n        struct.validate();\n\n        oprot.writeStructBegin(STRUCT_DESC);\n        if (struct.req != null) {\n          oprot.writeFieldBegin(REQ_FIELD_DESC);\n          struct.req.write(oprot);\n          oprot.writeFieldEnd();\n        }\n        oprot.writeFieldStop();\n        oprot.writeStructEnd();\n      }\n\n    }\n\n    private static class submitJob_argsTupleSchemeFactory implements SchemeFactory {\n      public submitJob_argsTupleScheme getScheme() {\n        return new submitJob_argsTupleScheme();\n      }\n    }\n\n    private static class submitJob_argsTupleScheme extends TupleScheme<submitJob_args> {\n\n      @Override\n      public void write(org.apache.thrift.protocol.TProtocol prot, submitJob_args struct) throws org.apache.thrift.TException {\n        TTupleProtocol oprot = (TTupleProtocol) prot;\n        BitSet optionals = new BitSet();\n        if (struct.isSetReq()) {\n          optionals.set(0);\n        }\n        oprot.writeBitSet(optionals, 1);\n        if (struct.isSetReq()) {\n          struct.req.write(oprot);\n        }\n      }\n\n      @Override\n      public void read(org.apache.thrift.protocol.TProtocol prot, submitJob_args struct) throws org.apache.thrift.TException {\n        TTupleProtocol iprot = (TTupleProtocol) prot;\n        BitSet incoming = iprot.readBitSet(1);\n        if (incoming.get(0)) {\n          struct.req = new edu.berkeley.sparrow.thrift.TSchedulingRequest();\n          struct.req.read(iprot);\n          struct.setReqIsSet(true);\n        }\n      }\n    }\n\n  }\n\n  public static class submitJob_result implements org.apache.thrift.TBase<submitJob_result, submitJob_result._Fields>, java.io.Serializable, Cloneable   {\n    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct(\"submitJob_result\");\n\n    private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField(\"e\", org.apache.thrift.protocol.TType.STRUCT, (short)1);\n\n    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();\n    static {\n      schemes.put(StandardScheme.class, new submitJob_resultStandardSchemeFactory());\n      schemes.put(TupleScheme.class, new submitJob_resultTupleSchemeFactory());\n    }\n\n    public edu.berkeley.sparrow.thrift.IncompleteRequestException e; // required\n\n    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */\n    public enum _Fields implements org.apache.thrift.TFieldIdEnum {\n      E((short)1, \"e\");\n\n      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();\n\n      static {\n        for (_Fields field : EnumSet.allOf(_Fields.class)) {\n          byName.put(field.getFieldName(), field);\n        }\n      }\n\n      /**\n       * Find the _Fields constant that matches fieldId, or null if its not found.\n       */\n      public static _Fields findByThriftId(int fieldId) {\n        switch(fieldId) {\n          case 1: // E\n            return E;\n          default:\n            return null;\n        }\n      }\n\n      /**\n       * Find the _Fields constant that matches fieldId, throwing an exception\n       * if it is not found.\n       */\n      public static _Fields findByThriftIdOrThrow(int fieldId) {\n        _Fields fields = findByThriftId(fieldId);\n        if (fields == null) throw new IllegalArgumentException(\"Field \" + fieldId + \" doesn't exist!\");\n        return fields;\n      }\n\n      /**\n       * Find the _Fields constant that matches name, or null if its not found.\n       */\n      public static _Fields findByName(String name) {\n        return byName.get(name);\n      }\n\n      private final short _thriftId;\n      private final String _fieldName;\n\n      _Fields(short thriftId, String fieldName) {\n        _thriftId = thriftId;\n        _fieldName = fieldName;\n      }\n\n      public short getThriftFieldId() {\n        return _thriftId;\n      }\n\n      public String getFieldName() {\n        return _fieldName;\n      }\n    }\n\n    // isset id assignments\n    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;\n    static {\n      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);\n      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData(\"e\", org.apache.thrift.TFieldRequirementType.DEFAULT, \n          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));\n      metaDataMap = Collections.unmodifiableMap(tmpMap);\n      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(submitJob_result.class, metaDataMap);\n    }\n\n    public submitJob_result() {\n    }\n\n    public submitJob_result(\n      edu.berkeley.sparrow.thrift.IncompleteRequestException e)\n    {\n      this();\n      this.e = e;\n    }\n\n    /**\n     * Performs a deep copy on <i>other</i>.\n     */\n    public submitJob_result(submitJob_result other) {\n      if (other.isSetE()) {\n        this.e = new edu.berkeley.sparrow.thrift.IncompleteRequestException(other.e);\n      }\n    }\n\n    public submitJob_result deepCopy() {\n      return new submitJob_result(this);\n    }\n\n    public void clear() {\n      this.e = null;\n    }\n\n    public edu.berkeley.sparrow.thrift.IncompleteRequestException getE() {\n      return this.e;\n    }\n\n    public submitJob_result setE(edu.berkeley.sparrow.thrift.IncompleteRequestException e) {\n      this.e = e;\n      return this;\n    }\n\n    public void unsetE() {\n      this.e = null;\n    }\n\n    /** Returns true if field e is set (has been assigned a value) and false otherwise */\n    public boolean isSetE() {\n      return this.e != null;\n    }\n\n    public void setEIsSet(boolean value) {\n      if (!value) {\n        this.e = null;\n      }\n    }\n\n    public void setFieldValue(_Fields field, Object value) {\n      switch (field) {\n      case E:\n        if (value == null) {\n          unsetE();\n        } else {\n          setE((edu.berkeley.sparrow.thrift.IncompleteRequestException)value);\n        }\n        break;\n\n      }\n    }\n\n    public Object getFieldValue(_Fields field) {\n      switch (field) {\n      case E:\n        return getE();\n\n      }\n      throw new IllegalStateException();\n    }\n\n    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */\n    public boolean isSet(_Fields field) {\n      if (field == null) {\n        throw new IllegalArgumentException();\n      }\n\n      switch (field) {\n      case E:\n        return isSetE();\n      }\n      throw new IllegalStateException();\n    }\n\n    @Override\n    public boolean equals(Object that) {\n      if (that == null)\n        return false;\n      if (that instanceof submitJob_result)\n        return this.equals((submitJob_result)that);\n      return false;\n    }\n\n    public boolean equals(submitJob_result that) {\n      if (that == null)\n        return false;\n\n      boolean this_present_e = true && this.isSetE();\n      boolean that_present_e = true && that.isSetE();\n      if (this_present_e || that_present_e) {\n        if (!(this_present_e && that_present_e))\n          return false;\n        if (!this.e.equals(that.e))\n          return false;\n      }\n\n      return true;\n    }\n\n    @Override\n    public int hashCode() {\n      return 0;\n    }\n\n    public int compareTo(submitJob_result other) {\n      if (!getClass().equals(other.getClass())) {\n        return getClass().getName().compareTo(other.getClass().getName());\n      }\n\n      int lastComparison = 0;\n      submitJob_result typedOther = (submitJob_result)other;\n\n      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());\n      if (lastComparison != 0) {\n        return lastComparison;\n      }\n      if (isSetE()) {\n        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);\n        if (lastComparison != 0) {\n          return lastComparison;\n        }\n      }\n      return 0;\n    }\n\n    public _Fields fieldForId(int fieldId) {\n      return _Fields.findByThriftId(fieldId);\n    }\n\n    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {\n      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);\n    }\n\n    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {\n      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);\n      }\n\n    @Override\n    public String toString() {\n      StringBuilder sb = new StringBuilder(\"submitJob_result(\");\n      boolean first = true;\n\n      sb.append(\"e:\");\n      if (this.e == null) {\n        sb.append(\"null\");\n      } else {\n        sb.append(this.e);\n      }\n      first = false;\n      sb.append(\")\");\n      return sb.toString();\n    }\n\n    public void validate() throws org.apache.thrift.TException {\n      // check for required fields\n    }\n\n    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {\n      try {\n        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));\n      } catch (org.apache.thrift.TException te) {\n        throw new java.io.IOException(te.getMessage());\n      }\n    }\n\n    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {\n      try {\n        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));\n      } catch (org.apache.thrift.TException te) {\n        throw new java.io.IOException(te.getMessage());\n      }\n    }\n\n    private static class submitJob_resultStandardSchemeFactory implements SchemeFactory {\n      public submitJob_resultStandardScheme getScheme() {\n        return new submitJob_resultStandardScheme();\n      }\n    }\n\n    private static class submitJob_resultStandardScheme extends StandardScheme<submitJob_result> {\n\n      public void read(org.apache.thrift.protocol.TProtocol iprot, submitJob_result struct) throws org.apache.thrift.TException {\n        org.apache.thrift.protocol.TField schemeField;\n        iprot.readStructBegin();\n        while (true)\n        {\n          schemeField = iprot.readFieldBegin();\n          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { \n            break;\n          }\n          switch (schemeField.id) {\n            case 1: // E\n              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {\n                struct.e = new edu.berkeley.sparrow.thrift.IncompleteRequestException();\n                struct.e.read(iprot);\n                struct.setEIsSet(true);\n              } else { \n                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n              }\n              break;\n            default:\n              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n          }\n          iprot.readFieldEnd();\n        }\n        iprot.readStructEnd();\n\n        // check for required fields of primitive type, which can't be checked in the validate method\n        struct.validate();\n      }\n\n      public void write(org.apache.thrift.protocol.TProtocol oprot, submitJob_result struct) throws org.apache.thrift.TException {\n        struct.validate();\n\n        oprot.writeStructBegin(STRUCT_DESC);\n        if (struct.e != null) {\n          oprot.writeFieldBegin(E_FIELD_DESC);\n          struct.e.write(oprot);\n          oprot.writeFieldEnd();\n        }\n        oprot.writeFieldStop();\n        oprot.writeStructEnd();\n      }\n\n    }\n\n    private static class submitJob_resultTupleSchemeFactory implements SchemeFactory {\n      public submitJob_resultTupleScheme getScheme() {\n        return new submitJob_resultTupleScheme();\n      }\n    }\n\n    private static class submitJob_resultTupleScheme extends TupleScheme<submitJob_result> {\n\n      @Override\n      public void write(org.apache.thrift.protocol.TProtocol prot, submitJob_result struct) throws org.apache.thrift.TException {\n        TTupleProtocol oprot = (TTupleProtocol) prot;\n        BitSet optionals = new BitSet();\n        if (struct.isSetE()) {\n          optionals.set(0);\n        }\n        oprot.writeBitSet(optionals, 1);\n        if (struct.isSetE()) {\n          struct.e.write(oprot);\n        }\n      }\n\n      @Override\n      public void read(org.apache.thrift.protocol.TProtocol prot, submitJob_result struct) throws org.apache.thrift.TException {\n        TTupleProtocol iprot = (TTupleProtocol) prot;\n        BitSet incoming = iprot.readBitSet(1);\n        if (incoming.get(0)) {\n          struct.e = new edu.berkeley.sparrow.thrift.IncompleteRequestException();\n          struct.e.read(iprot);\n          struct.setEIsSet(true);\n        }\n      }\n    }\n\n  }\n\n  public static class sendFrontendMessage_args implements org.apache.thrift.TBase<sendFrontendMessage_args, sendFrontendMessage_args._Fields>, java.io.Serializable, Cloneable   {\n    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct(\"sendFrontendMessage_args\");\n\n    private static final org.apache.thrift.protocol.TField APP_FIELD_DESC = new org.apache.thrift.protocol.TField(\"app\", org.apache.thrift.protocol.TType.STRING, (short)1);\n    private static final org.apache.thrift.protocol.TField TASK_ID_FIELD_DESC = new org.apache.thrift.protocol.TField(\"taskId\", org.apache.thrift.protocol.TType.STRUCT, (short)2);\n    private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField(\"status\", org.apache.thrift.protocol.TType.I32, (short)3);\n    private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField(\"message\", org.apache.thrift.protocol.TType.STRING, (short)4);\n\n    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();\n    static {\n      schemes.put(StandardScheme.class, new sendFrontendMessage_argsStandardSchemeFactory());\n      schemes.put(TupleScheme.class, new sendFrontendMessage_argsTupleSchemeFactory());\n    }\n\n    public String app; // required\n    public edu.berkeley.sparrow.thrift.TFullTaskId taskId; // required\n    public int status; // required\n    public ByteBuffer message; // required\n\n    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */\n    public enum _Fields implements org.apache.thrift.TFieldIdEnum {\n      APP((short)1, \"app\"),\n      TASK_ID((short)2, \"taskId\"),\n      STATUS((short)3, \"status\"),\n      MESSAGE((short)4, \"message\");\n\n      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();\n\n      static {\n        for (_Fields field : EnumSet.allOf(_Fields.class)) {\n          byName.put(field.getFieldName(), field);\n        }\n      }\n\n      /**\n       * Find the _Fields constant that matches fieldId, or null if its not found.\n       */\n      public static _Fields findByThriftId(int fieldId) {\n        switch(fieldId) {\n          case 1: // APP\n            return APP;\n          case 2: // TASK_ID\n            return TASK_ID;\n          case 3: // STATUS\n            return STATUS;\n          case 4: // MESSAGE\n            return MESSAGE;\n          default:\n            return null;\n        }\n      }\n\n      /**\n       * Find the _Fields constant that matches fieldId, throwing an exception\n       * if it is not found.\n       */\n      public static _Fields findByThriftIdOrThrow(int fieldId) {\n        _Fields fields = findByThriftId(fieldId);\n        if (fields == null) throw new IllegalArgumentException(\"Field \" + fieldId + \" doesn't exist!\");\n        return fields;\n      }\n\n      /**\n       * Find the _Fields constant that matches name, or null if its not found.\n       */\n      public static _Fields findByName(String name) {\n        return byName.get(name);\n      }\n\n      private final short _thriftId;\n      private final String _fieldName;\n\n      _Fields(short thriftId, String fieldName) {\n        _thriftId = thriftId;\n        _fieldName = fieldName;\n      }\n\n      public short getThriftFieldId() {\n        return _thriftId;\n      }\n\n      public String getFieldName() {\n        return _fieldName;\n      }\n    }\n\n    // isset id assignments\n    private static final int __STATUS_ISSET_ID = 0;\n    private BitSet __isset_bit_vector = new BitSet(1);\n    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;\n    static {\n      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);\n      tmpMap.put(_Fields.APP, new org.apache.thrift.meta_data.FieldMetaData(\"app\", org.apache.thrift.TFieldRequirementType.DEFAULT, \n          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));\n      tmpMap.put(_Fields.TASK_ID, new org.apache.thrift.meta_data.FieldMetaData(\"taskId\", org.apache.thrift.TFieldRequirementType.DEFAULT, \n          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, edu.berkeley.sparrow.thrift.TFullTaskId.class)));\n      tmpMap.put(_Fields.STATUS, new org.apache.thrift.meta_data.FieldMetaData(\"status\", org.apache.thrift.TFieldRequirementType.DEFAULT, \n          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));\n      tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData(\"message\", org.apache.thrift.TFieldRequirementType.DEFAULT, \n          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING          , true)));\n      metaDataMap = Collections.unmodifiableMap(tmpMap);\n      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(sendFrontendMessage_args.class, metaDataMap);\n    }\n\n    public sendFrontendMessage_args() {\n    }\n\n    public sendFrontendMessage_args(\n      String app,\n      edu.berkeley.sparrow.thrift.TFullTaskId taskId,\n      int status,\n      ByteBuffer message)\n    {\n      this();\n      this.app = app;\n      this.taskId = taskId;\n      this.status = status;\n      setStatusIsSet(true);\n      this.message = message;\n    }\n\n    /**\n     * Performs a deep copy on <i>other</i>.\n     */\n    public sendFrontendMessage_args(sendFrontendMessage_args other) {\n      __isset_bit_vector.clear();\n      __isset_bit_vector.or(other.__isset_bit_vector);\n      if (other.isSetApp()) {\n        this.app = other.app;\n      }\n      if (other.isSetTaskId()) {\n        this.taskId = new edu.berkeley.sparrow.thrift.TFullTaskId(other.taskId);\n      }\n      this.status = other.status;\n      if (other.isSetMessage()) {\n        this.message = org.apache.thrift.TBaseHelper.copyBinary(other.message);\n;\n      }\n    }\n\n    public sendFrontendMessage_args deepCopy() {\n      return new sendFrontendMessage_args(this);\n    }\n\n    public void clear() {\n      this.app = null;\n      this.taskId = null;\n      setStatusIsSet(false);\n      this.status = 0;\n      this.message = null;\n    }\n\n    public String getApp() {\n      return this.app;\n    }\n\n    public sendFrontendMessage_args setApp(String app) {\n      this.app = app;\n      return this;\n    }\n\n    public void unsetApp() {\n      this.app = null;\n    }\n\n    /** Returns true if field app is set (has been assigned a value) and false otherwise */\n    public boolean isSetApp() {\n      return this.app != null;\n    }\n\n    public void setAppIsSet(boolean value) {\n      if (!value) {\n        this.app = null;\n      }\n    }\n\n    public edu.berkeley.sparrow.thrift.TFullTaskId getTaskId() {\n      return this.taskId;\n    }\n\n    public sendFrontendMessage_args setTaskId(edu.berkeley.sparrow.thrift.TFullTaskId taskId) {\n      this.taskId = taskId;\n      return this;\n    }\n\n    public void unsetTaskId() {\n      this.taskId = null;\n    }\n\n    /** Returns true if field taskId is set (has been assigned a value) and false otherwise */\n    public boolean isSetTaskId() {\n      return this.taskId != null;\n    }\n\n    public void setTaskIdIsSet(boolean value) {\n      if (!value) {\n        this.taskId = null;\n      }\n    }\n\n    public int getStatus() {\n      return this.status;\n    }\n\n    public sendFrontendMessage_args setStatus(int status) {\n      this.status = status;\n      setStatusIsSet(true);\n      return this;\n    }\n\n    public void unsetStatus() {\n      __isset_bit_vector.clear(__STATUS_ISSET_ID);\n    }\n\n    /** Returns true if field status is set (has been assigned a value) and false otherwise */\n    public boolean isSetStatus() {\n      return __isset_bit_vector.get(__STATUS_ISSET_ID);\n    }\n\n    public void setStatusIsSet(boolean value) {\n      __isset_bit_vector.set(__STATUS_ISSET_ID, value);\n    }\n\n    public byte[] getMessage() {\n      setMessage(org.apache.thrift.TBaseHelper.rightSize(message));\n      return message == null ? null : message.array();\n    }\n\n    public ByteBuffer bufferForMessage() {\n      return message;\n    }\n\n    public sendFrontendMessage_args setMessage(byte[] message) {\n      setMessage(message == null ? (ByteBuffer)null : ByteBuffer.wrap(message));\n      return this;\n    }\n\n    public sendFrontendMessage_args setMessage(ByteBuffer message) {\n      this.message = message;\n      return this;\n    }\n\n    public void unsetMessage() {\n      this.message = null;\n    }\n\n    /** Returns true if field message is set (has been assigned a value) and false otherwise */\n    public boolean isSetMessage() {\n      return this.message != null;\n    }\n\n    public void setMessageIsSet(boolean value) {\n      if (!value) {\n        this.message = null;\n      }\n    }\n\n    public void setFieldValue(_Fields field, Object value) {\n      switch (field) {\n      case APP:\n        if (value == null) {\n          unsetApp();\n        } else {\n          setApp((String)value);\n        }\n        break;\n\n      case TASK_ID:\n        if (value == null) {\n          unsetTaskId();\n        } else {\n          setTaskId((edu.berkeley.sparrow.thrift.TFullTaskId)value);\n        }\n        break;\n\n      case STATUS:\n        if (value == null) {\n          unsetStatus();\n        } else {\n          setStatus((Integer)value);\n        }\n        break;\n\n      case MESSAGE:\n        if (value == null) {\n          unsetMessage();\n        } else {\n          setMessage((ByteBuffer)value);\n        }\n        break;\n\n      }\n    }\n\n    public Object getFieldValue(_Fields field) {\n      switch (field) {\n      case APP:\n        return getApp();\n\n      case TASK_ID:\n        return getTaskId();\n\n      case STATUS:\n        return Integer.valueOf(getStatus());\n\n      case MESSAGE:\n        return getMessage();\n\n      }\n      throw new IllegalStateException();\n    }\n\n    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */\n    public boolean isSet(_Fields field) {\n      if (field == null) {\n        throw new IllegalArgumentException();\n      }\n\n      switch (field) {\n      case APP:\n        return isSetApp();\n      case TASK_ID:\n        return isSetTaskId();\n      case STATUS:\n        return isSetStatus();\n      case MESSAGE:\n        return isSetMessage();\n      }\n      throw new IllegalStateException();\n    }\n\n    @Override\n    public boolean equals(Object that) {\n      if (that == null)\n        return false;\n      if (that instanceof sendFrontendMessage_args)\n        return this.equals((sendFrontendMessage_args)that);\n      return false;\n    }\n\n    public boolean equals(sendFrontendMessage_args that) {\n      if (that == null)\n        return false;\n\n      boolean this_present_app = true && this.isSetApp();\n      boolean that_present_app = true && that.isSetApp();\n      if (this_present_app || that_present_app) {\n        if (!(this_present_app && that_present_app))\n          return false;\n        if (!this.app.equals(that.app))\n          return false;\n      }\n\n      boolean this_present_taskId = true && this.isSetTaskId();\n      boolean that_present_taskId = true && that.isSetTaskId();\n      if (this_present_taskId || that_present_taskId) {\n        if (!(this_present_taskId && that_present_taskId))\n          return false;\n        if (!this.taskId.equals(that.taskId))\n          return false;\n      }\n\n      boolean this_present_status = true;\n      boolean that_present_status = true;\n      if (this_present_status || that_present_status) {\n        if (!(this_present_status && that_present_status))\n          return false;\n        if (this.status != that.status)\n          return false;\n      }\n\n      boolean this_present_message = true && this.isSetMessage();\n      boolean that_present_message = true && that.isSetMessage();\n      if (this_present_message || that_present_message) {\n        if (!(this_present_message && that_present_message))\n          return false;\n        if (!this.message.equals(that.message))\n          return false;\n      }\n\n      return true;\n    }\n\n    @Override\n    public int hashCode() {\n      return 0;\n    }\n\n    public int compareTo(sendFrontendMessage_args other) {\n      if (!getClass().equals(other.getClass())) {\n        return getClass().getName().compareTo(other.getClass().getName());\n      }\n\n      int lastComparison = 0;\n      sendFrontendMessage_args typedOther = (sendFrontendMessage_args)other;\n\n      lastComparison = Boolean.valueOf(isSetApp()).compareTo(typedOther.isSetApp());\n      if (lastComparison != 0) {\n        return lastComparison;\n      }\n      if (isSetApp()) {\n        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.app, typedOther.app);\n        if (lastComparison != 0) {\n          return lastComparison;\n        }\n      }\n      lastComparison = Boolean.valueOf(isSetTaskId()).compareTo(typedOther.isSetTaskId());\n      if (lastComparison != 0) {\n        return lastComparison;\n      }\n      if (isSetTaskId()) {\n        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.taskId, typedOther.taskId);\n        if (lastComparison != 0) {\n          return lastComparison;\n        }\n      }\n      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus());\n      if (lastComparison != 0) {\n        return lastComparison;\n      }\n      if (isSetStatus()) {\n        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status);\n        if (lastComparison != 0) {\n          return lastComparison;\n        }\n      }\n      lastComparison = Boolean.valueOf(isSetMessage()).compareTo(typedOther.isSetMessage());\n      if (lastComparison != 0) {\n        return lastComparison;\n      }\n      if (isSetMessage()) {\n        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, typedOther.message);\n        if (lastComparison != 0) {\n          return lastComparison;\n        }\n      }\n      return 0;\n    }\n\n    public _Fields fieldForId(int fieldId) {\n      return _Fields.findByThriftId(fieldId);\n    }\n\n    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {\n      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);\n    }\n\n    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {\n      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);\n    }\n\n    @Override\n    public String toString() {\n      StringBuilder sb = new StringBuilder(\"sendFrontendMessage_args(\");\n      boolean first = true;\n\n      sb.append(\"app:\");\n      if (this.app == null) {\n        sb.append(\"null\");\n      } else {\n        sb.append(this.app);\n      }\n      first = false;\n      if (!first) sb.append(\", \");\n      sb.append(\"taskId:\");\n      if (this.taskId == null) {\n        sb.append(\"null\");\n      } else {\n        sb.append(this.taskId);\n      }\n      first = false;\n      if (!first) sb.append(\", \");\n      sb.append(\"status:\");\n      sb.append(this.status);\n      first = false;\n      if (!first) sb.append(\", \");\n      sb.append(\"message:\");\n      if (this.message == null) {\n        sb.append(\"null\");\n      } else {\n        org.apache.thrift.TBaseHelper.toString(this.message, sb);\n      }\n      first = false;\n      sb.append(\")\");\n      return sb.toString();\n    }\n\n    public void validate() throws org.apache.thrift.TException {\n      // check for required fields\n    }\n\n    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {\n      try {\n        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));\n      } catch (org.apache.thrift.TException te) {\n        throw new java.io.IOException(te.getMessage());\n      }\n    }\n\n    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {\n      try {\n        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.\n        __isset_bit_vector = new BitSet(1);\n        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));\n      } catch (org.apache.thrift.TException te) {\n        throw new java.io.IOException(te.getMessage());\n      }\n    }\n\n    private static class sendFrontendMessage_argsStandardSchemeFactory implements SchemeFactory {\n      public sendFrontendMessage_argsStandardScheme getScheme() {\n        return new sendFrontendMessage_argsStandardScheme();\n      }\n    }\n\n    private static class sendFrontendMessage_argsStandardScheme extends StandardScheme<sendFrontendMessage_args> {\n\n      public void read(org.apache.thrift.protocol.TProtocol iprot, sendFrontendMessage_args struct) throws org.apache.thrift.TException {\n        org.apache.thrift.protocol.TField schemeField;\n        iprot.readStructBegin();\n        while (true)\n        {\n          schemeField = iprot.readFieldBegin();\n          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { \n            break;\n          }\n          switch (schemeField.id) {\n            case 1: // APP\n              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {\n                struct.app = iprot.readString();\n                struct.setAppIsSet(true);\n              } else { \n                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n              }\n              break;\n            case 2: // TASK_ID\n              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {\n                struct.taskId = new edu.berkeley.sparrow.thrift.TFullTaskId();\n                struct.taskId.read(iprot);\n                struct.setTaskIdIsSet(true);\n              } else { \n                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n              }\n              break;\n            case 3: // STATUS\n              if (schemeField.type == org.apache.thrift.protocol.TType.I32) {\n                struct.status = iprot.readI32();\n                struct.setStatusIsSet(true);\n              } else { \n                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n              }\n              break;\n            case 4: // MESSAGE\n              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {\n                struct.message = iprot.readBinary();\n                struct.setMessageIsSet(true);\n              } else { \n                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n              }\n              break;\n            default:\n              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n          }\n          iprot.readFieldEnd();\n        }\n        iprot.readStructEnd();\n\n        // check for required fields of primitive type, which can't be checked in the validate method\n        struct.validate();\n      }\n\n      public void write(org.apache.thrift.protocol.TProtocol oprot, sendFrontendMessage_args struct) throws org.apache.thrift.TException {\n        struct.validate();\n\n        oprot.writeStructBegin(STRUCT_DESC);\n        if (struct.app != null) {\n          oprot.writeFieldBegin(APP_FIELD_DESC);\n          oprot.writeString(struct.app);\n          oprot.writeFieldEnd();\n        }\n        if (struct.taskId != null) {\n          oprot.writeFieldBegin(TASK_ID_FIELD_DESC);\n          struct.taskId.write(oprot);\n          oprot.writeFieldEnd();\n        }\n        oprot.writeFieldBegin(STATUS_FIELD_DESC);\n        oprot.writeI32(struct.status);\n        oprot.writeFieldEnd();\n        if (struct.message != null) {\n          oprot.writeFieldBegin(MESSAGE_FIELD_DESC);\n          oprot.writeBinary(struct.message);\n          oprot.writeFieldEnd();\n        }\n        oprot.writeFieldStop();\n        oprot.writeStructEnd();\n      }\n\n    }\n\n    private static class sendFrontendMessage_argsTupleSchemeFactory implements SchemeFactory {\n      public sendFrontendMessage_argsTupleScheme getScheme() {\n        return new sendFrontendMessage_argsTupleScheme();\n      }\n    }\n\n    private static class sendFrontendMessage_argsTupleScheme extends TupleScheme<sendFrontendMessage_args> {\n\n      @Override\n      public void write(org.apache.thrift.protocol.TProtocol prot, sendFrontendMessage_args struct) throws org.apache.thrift.TException {\n        TTupleProtocol oprot = (TTupleProtocol) prot;\n        BitSet optionals = new BitSet();\n        if (struct.isSetApp()) {\n          optionals.set(0);\n        }\n        if (struct.isSetTaskId()) {\n          optionals.set(1);\n        }\n        if (struct.isSetStatus()) {\n          optionals.set(2);\n        }\n        if (struct.isSetMessage()) {\n          optionals.set(3);\n        }\n        oprot.writeBitSet(optionals, 4);\n        if (struct.isSetApp()) {\n          oprot.writeString(struct.app);\n        }\n        if (struct.isSetTaskId()) {\n          struct.taskId.write(oprot);\n        }\n        if (struct.isSetStatus()) {\n          oprot.writeI32(struct.status);\n        }\n        if (struct.isSetMessage()) {\n          oprot.writeBinary(struct.message);\n        }\n      }\n\n      @Override\n      public void read(org.apache.thrift.protocol.TProtocol prot, sendFrontendMessage_args struct) throws org.apache.thrift.TException {\n        TTupleProtocol iprot = (TTupleProtocol) prot;\n        BitSet incoming = iprot.readBitSet(4);\n        if (incoming.get(0)) {\n          struct.app = iprot.readString();\n          struct.setAppIsSet(true);\n        }\n        if (incoming.get(1)) {\n          struct.taskId = new edu.berkeley.sparrow.thrift.TFullTaskId();\n          struct.taskId.read(iprot);\n          struct.setTaskIdIsSet(true);\n        }\n        if (incoming.get(2)) {\n          struct.status = iprot.readI32();\n          struct.setStatusIsSet(true);\n        }\n        if (incoming.get(3)) {\n          struct.message = iprot.readBinary();\n          struct.setMessageIsSet(true);\n        }\n      }\n    }\n\n  }\n\n  public static class sendFrontendMessage_result implements org.apache.thrift.TBase<sendFrontendMessage_result, sendFrontendMessage_result._Fields>, java.io.Serializable, Cloneable   {\n    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct(\"sendFrontendMessage_result\");\n\n\n    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();\n    static {\n      schemes.put(StandardScheme.class, new sendFrontendMessage_resultStandardSchemeFactory());\n      schemes.put(TupleScheme.class, new sendFrontendMessage_resultTupleSchemeFactory());\n    }\n\n\n    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */\n    public enum _Fields implements org.apache.thrift.TFieldIdEnum {\n;\n\n      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();\n\n      static {\n        for (_Fields field : EnumSet.allOf(_Fields.class)) {\n          byName.put(field.getFieldName(), field);\n        }\n      }\n\n      /**\n       * Find the _Fields constant that matches fieldId, or null if its not found.\n       */\n      public static _Fields findByThriftId(int fieldId) {\n        switch(fieldId) {\n          default:\n            return null;\n        }\n      }\n\n      /**\n       * Find the _Fields constant that matches fieldId, throwing an exception\n       * if it is not found.\n       */\n      public static _Fields findByThriftIdOrThrow(int fieldId) {\n        _Fields fields = findByThriftId(fieldId);\n        if (fields == null) throw new IllegalArgumentException(\"Field \" + fieldId + \" doesn't exist!\");\n        return fields;\n      }\n\n      /**\n       * Find the _Fields constant that matches name, or null if its not found.\n       */\n      public static _Fields findByName(String name) {\n        return byName.get(name);\n      }\n\n      private final short _thriftId;\n      private final String _fieldName;\n\n      _Fields(short thriftId, String fieldName) {\n        _thriftId = thriftId;\n        _fieldName = fieldName;\n      }\n\n      public short getThriftFieldId() {\n        return _thriftId;\n      }\n\n      public String getFieldName() {\n        return _fieldName;\n      }\n    }\n    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;\n    static {\n      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);\n      metaDataMap = Collections.unmodifiableMap(tmpMap);\n      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(sendFrontendMessage_result.class, metaDataMap);\n    }\n\n    public sendFrontendMessage_result() {\n    }\n\n    /**\n     * Performs a deep copy on <i>other</i>.\n     */\n    public sendFrontendMessage_result(sendFrontendMessage_result other) {\n    }\n\n    public sendFrontendMessage_result deepCopy() {\n      return new sendFrontendMessage_result(this);\n    }\n\n    public void clear() {\n    }\n\n    public void setFieldValue(_Fields field, Object value) {\n      switch (field) {\n      }\n    }\n\n    public Object getFieldValue(_Fields field) {\n      switch (field) {\n      }\n      throw new IllegalStateException();\n    }\n\n    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */\n    public boolean isSet(_Fields field) {\n      if (field == null) {\n        throw new IllegalArgumentException();\n      }\n\n      switch (field) {\n      }\n      throw new IllegalStateException();\n    }\n\n    @Override\n    public boolean equals(Object that) {\n      if (that == null)\n        return false;\n      if (that instanceof sendFrontendMessage_result)\n        return this.equals((sendFrontendMessage_result)that);\n      return false;\n    }\n\n    public boolean equals(sendFrontendMessage_result that) {\n      if (that == null)\n        return false;\n\n      return true;\n    }\n\n    @Override\n    public int hashCode() {\n      return 0;\n    }\n\n    public int compareTo(sendFrontendMessage_result other) {\n      if (!getClass().equals(other.getClass())) {\n        return getClass().getName().compareTo(other.getClass().getName());\n      }\n\n      int lastComparison = 0;\n      sendFrontendMessage_result typedOther = (sendFrontendMessage_result)other;\n\n      return 0;\n    }\n\n    public _Fields fieldForId(int fieldId) {\n      return _Fields.findByThriftId(fieldId);\n    }\n\n    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {\n      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);\n    }\n\n    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {\n      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);\n      }\n\n    @Override\n    public String toString() {\n      StringBuilder sb = new StringBuilder(\"sendFrontendMessage_result(\");\n      boolean first = true;\n\n      sb.append(\")\");\n      return sb.toString();\n    }\n\n    public void validate() throws org.apache.thrift.TException {\n      // check for required fields\n    }\n\n    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {\n      try {\n        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));\n      } catch (org.apache.thrift.TException te) {\n        throw new java.io.IOException(te.getMessage());\n      }\n    }\n\n    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {\n      try {\n        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));\n      } catch (org.apache.thrift.TException te) {\n        throw new java.io.IOException(te.getMessage());\n      }\n    }\n\n    private static class sendFrontendMessage_resultStandardSchemeFactory implements SchemeFactory {\n      public sendFrontendMessage_resultStandardScheme getScheme() {\n        return new sendFrontendMessage_resultStandardScheme();\n      }\n    }\n\n    private static class sendFrontendMessage_resultStandardScheme extends StandardScheme<sendFrontendMessage_result> {\n\n      public void read(org.apache.thrift.protocol.TProtocol iprot, sendFrontendMessage_result struct) throws org.apache.thrift.TException {\n        org.apache.thrift.protocol.TField schemeField;\n        iprot.readStructBegin();\n        while (true)\n        {\n          schemeField = iprot.readFieldBegin();\n          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { \n            break;\n          }\n          switch (schemeField.id) {\n            default:\n              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n          }\n          iprot.readFieldEnd();\n        }\n        iprot.readStructEnd();\n\n        // check for required fields of primitive type, which can't be checked in the validate method\n        struct.validate();\n      }\n\n      public void write(org.apache.thrift.protocol.TProtocol oprot, sendFrontendMessage_result struct) throws org.apache.thrift.TException {\n        struct.validate();\n\n        oprot.writeStructBegin(STRUCT_DESC);\n        oprot.writeFieldStop();\n        oprot.writeStructEnd();\n      }\n\n    }\n\n    private static class sendFrontendMessage_resultTupleSchemeFactory implements SchemeFactory {\n      public sendFrontendMessage_resultTupleScheme getScheme() {\n        return new sendFrontendMessage_resultTupleScheme();\n      }\n    }\n\n    private static class sendFrontendMessage_resultTupleScheme extends TupleScheme<sendFrontendMessage_result> {\n\n      @Override\n      public void write(org.apache.thrift.protocol.TProtocol prot, sendFrontendMessage_result struct) throws org.apache.thrift.TException {\n        TTupleProtocol oprot = (TTupleProtocol) prot;\n      }\n\n      @Override\n      public void read(org.apache.thrift.protocol.TProtocol prot, sendFrontendMessage_result struct) throws org.apache.thrift.TException {\n        TTupleProtocol iprot = (TTupleProtocol) prot;\n      }\n    }\n\n  }\n\n}\n"
  },
  {
    "path": "src/main/gen-java/edu/berkeley/sparrow/thrift/SchedulerStateStoreService.java",
    "content": "/**\n * Autogenerated by Thrift Compiler (0.8.0)\n *\n * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING\n *  @generated\n */\npackage edu.berkeley.sparrow.thrift;\n\nimport org.apache.thrift.scheme.IScheme;\nimport org.apache.thrift.scheme.SchemeFactory;\nimport org.apache.thrift.scheme.StandardScheme;\n\nimport org.apache.thrift.scheme.TupleScheme;\nimport org.apache.thrift.protocol.TTupleProtocol;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.util.HashMap;\nimport java.util.EnumMap;\nimport java.util.Set;\nimport java.util.HashSet;\nimport java.util.EnumSet;\nimport java.util.Collections;\nimport java.util.BitSet;\nimport java.nio.ByteBuffer;\nimport java.util.Arrays;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\npublic class SchedulerStateStoreService {\n\n  public interface Iface {\n\n    public void updateNodeState(Map<String,edu.berkeley.sparrow.thrift.TNodeState> snapshot) throws org.apache.thrift.TException;\n\n  }\n\n  public interface AsyncIface {\n\n    public void updateNodeState(Map<String,edu.berkeley.sparrow.thrift.TNodeState> snapshot, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.updateNodeState_call> resultHandler) throws org.apache.thrift.TException;\n\n  }\n\n  public static class Client extends org.apache.thrift.TServiceClient implements Iface {\n    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {\n      public Factory() {}\n      public Client getClient(org.apache.thrift.protocol.TProtocol prot) {\n        return new Client(prot);\n      }\n      public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {\n        return new Client(iprot, oprot);\n      }\n    }\n\n    public Client(org.apache.thrift.protocol.TProtocol prot)\n    {\n      super(prot, prot);\n    }\n\n    public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {\n      super(iprot, oprot);\n    }\n\n    public void updateNodeState(Map<String,edu.berkeley.sparrow.thrift.TNodeState> snapshot) throws org.apache.thrift.TException\n    {\n      send_updateNodeState(snapshot);\n      recv_updateNodeState();\n    }\n\n    public void send_updateNodeState(Map<String,edu.berkeley.sparrow.thrift.TNodeState> snapshot) throws org.apache.thrift.TException\n    {\n      updateNodeState_args args = new updateNodeState_args();\n      args.setSnapshot(snapshot);\n      sendBase(\"updateNodeState\", args);\n    }\n\n    public void recv_updateNodeState() throws org.apache.thrift.TException\n    {\n      updateNodeState_result result = new updateNodeState_result();\n      receiveBase(result, \"updateNodeState\");\n      return;\n    }\n\n  }\n  public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface {\n    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {\n      private org.apache.thrift.async.TAsyncClientManager clientManager;\n      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;\n      public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {\n        this.clientManager = clientManager;\n        this.protocolFactory = protocolFactory;\n      }\n      public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {\n        return new AsyncClient(protocolFactory, clientManager, transport);\n      }\n    }\n\n    public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {\n      super(protocolFactory, clientManager, transport);\n    }\n\n    public void updateNodeState(Map<String,edu.berkeley.sparrow.thrift.TNodeState> snapshot, org.apache.thrift.async.AsyncMethodCallback<updateNodeState_call> resultHandler) throws org.apache.thrift.TException {\n      checkReady();\n      updateNodeState_call method_call = new updateNodeState_call(snapshot, resultHandler, this, ___protocolFactory, ___transport);\n      this.___currentMethod = method_call;\n      ___manager.call(method_call);\n    }\n\n    public static class updateNodeState_call extends org.apache.thrift.async.TAsyncMethodCall {\n      private Map<String,edu.berkeley.sparrow.thrift.TNodeState> snapshot;\n      public updateNodeState_call(Map<String,edu.berkeley.sparrow.thrift.TNodeState> snapshot, org.apache.thrift.async.AsyncMethodCallback<updateNodeState_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {\n        super(client, protocolFactory, transport, resultHandler, false);\n        this.snapshot = snapshot;\n      }\n\n      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {\n        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage(\"updateNodeState\", org.apache.thrift.protocol.TMessageType.CALL, 0));\n        updateNodeState_args args = new updateNodeState_args();\n        args.setSnapshot(snapshot);\n        args.write(prot);\n        prot.writeMessageEnd();\n      }\n\n      public void getResult() throws org.apache.thrift.TException {\n        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {\n          throw new IllegalStateException(\"Method call not finished!\");\n        }\n        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());\n        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);\n        (new Client(prot)).recv_updateNodeState();\n      }\n    }\n\n  }\n\n  public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor {\n    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());\n    public Processor(I iface) {\n      super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));\n    }\n\n    protected Processor(I iface, Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {\n      super(iface, getProcessMap(processMap));\n    }\n\n    private static <I extends Iface> Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> getProcessMap(Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {\n      processMap.put(\"updateNodeState\", new updateNodeState());\n      return processMap;\n    }\n\n    private static class updateNodeState<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updateNodeState_args> {\n      public updateNodeState() {\n        super(\"updateNodeState\");\n      }\n\n      protected updateNodeState_args getEmptyArgsInstance() {\n        return new updateNodeState_args();\n      }\n\n      protected updateNodeState_result getResult(I iface, updateNodeState_args args) throws org.apache.thrift.TException {\n        updateNodeState_result result = new updateNodeState_result();\n        iface.updateNodeState(args.snapshot);\n        return result;\n      }\n    }\n\n  }\n\n  public static class updateNodeState_args implements org.apache.thrift.TBase<updateNodeState_args, updateNodeState_args._Fields>, java.io.Serializable, Cloneable   {\n    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct(\"updateNodeState_args\");\n\n    private static final org.apache.thrift.protocol.TField SNAPSHOT_FIELD_DESC = new org.apache.thrift.protocol.TField(\"snapshot\", org.apache.thrift.protocol.TType.MAP, (short)1);\n\n    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();\n    static {\n      schemes.put(StandardScheme.class, new updateNodeState_argsStandardSchemeFactory());\n      schemes.put(TupleScheme.class, new updateNodeState_argsTupleSchemeFactory());\n    }\n\n    public Map<String,edu.berkeley.sparrow.thrift.TNodeState> snapshot; // required\n\n    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */\n    public enum _Fields implements org.apache.thrift.TFieldIdEnum {\n      SNAPSHOT((short)1, \"snapshot\");\n\n      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();\n\n      static {\n        for (_Fields field : EnumSet.allOf(_Fields.class)) {\n          byName.put(field.getFieldName(), field);\n        }\n      }\n\n      /**\n       * Find the _Fields constant that matches fieldId, or null if its not found.\n       */\n      public static _Fields findByThriftId(int fieldId) {\n        switch(fieldId) {\n          case 1: // SNAPSHOT\n            return SNAPSHOT;\n          default:\n            return null;\n        }\n      }\n\n      /**\n       * Find the _Fields constant that matches fieldId, throwing an exception\n       * if it is not found.\n       */\n      public static _Fields findByThriftIdOrThrow(int fieldId) {\n        _Fields fields = findByThriftId(fieldId);\n        if (fields == null) throw new IllegalArgumentException(\"Field \" + fieldId + \" doesn't exist!\");\n        return fields;\n      }\n\n      /**\n       * Find the _Fields constant that matches name, or null if its not found.\n       */\n      public static _Fields findByName(String name) {\n        return byName.get(name);\n      }\n\n      private final short _thriftId;\n      private final String _fieldName;\n\n      _Fields(short thriftId, String fieldName) {\n        _thriftId = thriftId;\n        _fieldName = fieldName;\n      }\n\n      public short getThriftFieldId() {\n        return _thriftId;\n      }\n\n      public String getFieldName() {\n        return _fieldName;\n      }\n    }\n\n    // isset id assignments\n    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;\n    static {\n      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);\n      tmpMap.put(_Fields.SNAPSHOT, new org.apache.thrift.meta_data.FieldMetaData(\"snapshot\", org.apache.thrift.TFieldRequirementType.DEFAULT, \n          new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, \n              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), \n              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, edu.berkeley.sparrow.thrift.TNodeState.class))));\n      metaDataMap = Collections.unmodifiableMap(tmpMap);\n      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateNodeState_args.class, metaDataMap);\n    }\n\n    public updateNodeState_args() {\n    }\n\n    public updateNodeState_args(\n      Map<String,edu.berkeley.sparrow.thrift.TNodeState> snapshot)\n    {\n      this();\n      this.snapshot = snapshot;\n    }\n\n    /**\n     * Performs a deep copy on <i>other</i>.\n     */\n    public updateNodeState_args(updateNodeState_args other) {\n      if (other.isSetSnapshot()) {\n        Map<String,edu.berkeley.sparrow.thrift.TNodeState> __this__snapshot = new HashMap<String,edu.berkeley.sparrow.thrift.TNodeState>();\n        for (Map.Entry<String, edu.berkeley.sparrow.thrift.TNodeState> other_element : other.snapshot.entrySet()) {\n\n          String other_element_key = other_element.getKey();\n          edu.berkeley.sparrow.thrift.TNodeState other_element_value = other_element.getValue();\n\n          String __this__snapshot_copy_key = other_element_key;\n\n          edu.berkeley.sparrow.thrift.TNodeState __this__snapshot_copy_value = new edu.berkeley.sparrow.thrift.TNodeState(other_element_value);\n\n          __this__snapshot.put(__this__snapshot_copy_key, __this__snapshot_copy_value);\n        }\n        this.snapshot = __this__snapshot;\n      }\n    }\n\n    public updateNodeState_args deepCopy() {\n      return new updateNodeState_args(this);\n    }\n\n    public void clear() {\n      this.snapshot = null;\n    }\n\n    public int getSnapshotSize() {\n      return (this.snapshot == null) ? 0 : this.snapshot.size();\n    }\n\n    public void putToSnapshot(String key, edu.berkeley.sparrow.thrift.TNodeState val) {\n      if (this.snapshot == null) {\n        this.snapshot = new HashMap<String,edu.berkeley.sparrow.thrift.TNodeState>();\n      }\n      this.snapshot.put(key, val);\n    }\n\n    public Map<String,edu.berkeley.sparrow.thrift.TNodeState> getSnapshot() {\n      return this.snapshot;\n    }\n\n    public updateNodeState_args setSnapshot(Map<String,edu.berkeley.sparrow.thrift.TNodeState> snapshot) {\n      this.snapshot = snapshot;\n      return this;\n    }\n\n    public void unsetSnapshot() {\n      this.snapshot = null;\n    }\n\n    /** Returns true if field snapshot is set (has been assigned a value) and false otherwise */\n    public boolean isSetSnapshot() {\n      return this.snapshot != null;\n    }\n\n    public void setSnapshotIsSet(boolean value) {\n      if (!value) {\n        this.snapshot = null;\n      }\n    }\n\n    public void setFieldValue(_Fields field, Object value) {\n      switch (field) {\n      case SNAPSHOT:\n        if (value == null) {\n          unsetSnapshot();\n        } else {\n          setSnapshot((Map<String,edu.berkeley.sparrow.thrift.TNodeState>)value);\n        }\n        break;\n\n      }\n    }\n\n    public Object getFieldValue(_Fields field) {\n      switch (field) {\n      case SNAPSHOT:\n        return getSnapshot();\n\n      }\n      throw new IllegalStateException();\n    }\n\n    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */\n    public boolean isSet(_Fields field) {\n      if (field == null) {\n        throw new IllegalArgumentException();\n      }\n\n      switch (field) {\n      case SNAPSHOT:\n        return isSetSnapshot();\n      }\n      throw new IllegalStateException();\n    }\n\n    @Override\n    public boolean equals(Object that) {\n      if (that == null)\n        return false;\n      if (that instanceof updateNodeState_args)\n        return this.equals((updateNodeState_args)that);\n      return false;\n    }\n\n    public boolean equals(updateNodeState_args that) {\n      if (that == null)\n        return false;\n\n      boolean this_present_snapshot = true && this.isSetSnapshot();\n      boolean that_present_snapshot = true && that.isSetSnapshot();\n      if (this_present_snapshot || that_present_snapshot) {\n        if (!(this_present_snapshot && that_present_snapshot))\n          return false;\n        if (!this.snapshot.equals(that.snapshot))\n          return false;\n      }\n\n      return true;\n    }\n\n    @Override\n    public int hashCode() {\n      return 0;\n    }\n\n    public int compareTo(updateNodeState_args other) {\n      if (!getClass().equals(other.getClass())) {\n        return getClass().getName().compareTo(other.getClass().getName());\n      }\n\n      int lastComparison = 0;\n      updateNodeState_args typedOther = (updateNodeState_args)other;\n\n      lastComparison = Boolean.valueOf(isSetSnapshot()).compareTo(typedOther.isSetSnapshot());\n      if (lastComparison != 0) {\n        return lastComparison;\n      }\n      if (isSetSnapshot()) {\n        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.snapshot, typedOther.snapshot);\n        if (lastComparison != 0) {\n          return lastComparison;\n        }\n      }\n      return 0;\n    }\n\n    public _Fields fieldForId(int fieldId) {\n      return _Fields.findByThriftId(fieldId);\n    }\n\n    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {\n      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);\n    }\n\n    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {\n      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);\n    }\n\n    @Override\n    public String toString() {\n      StringBuilder sb = new StringBuilder(\"updateNodeState_args(\");\n      boolean first = true;\n\n      sb.append(\"snapshot:\");\n      if (this.snapshot == null) {\n        sb.append(\"null\");\n      } else {\n        sb.append(this.snapshot);\n      }\n      first = false;\n      sb.append(\")\");\n      return sb.toString();\n    }\n\n    public void validate() throws org.apache.thrift.TException {\n      // check for required fields\n    }\n\n    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {\n      try {\n        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));\n      } catch (org.apache.thrift.TException te) {\n        throw new java.io.IOException(te.getMessage());\n      }\n    }\n\n    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {\n      try {\n        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));\n      } catch (org.apache.thrift.TException te) {\n        throw new java.io.IOException(te.getMessage());\n      }\n    }\n\n    private static class updateNodeState_argsStandardSchemeFactory implements SchemeFactory {\n      public updateNodeState_argsStandardScheme getScheme() {\n        return new updateNodeState_argsStandardScheme();\n      }\n    }\n\n    private static class updateNodeState_argsStandardScheme extends StandardScheme<updateNodeState_args> {\n\n      public void read(org.apache.thrift.protocol.TProtocol iprot, updateNodeState_args struct) throws org.apache.thrift.TException {\n        org.apache.thrift.protocol.TField schemeField;\n        iprot.readStructBegin();\n        while (true)\n        {\n          schemeField = iprot.readFieldBegin();\n          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { \n            break;\n          }\n          switch (schemeField.id) {\n            case 1: // SNAPSHOT\n              if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {\n                {\n                  org.apache.thrift.protocol.TMap _map16 = iprot.readMapBegin();\n                  struct.snapshot = new HashMap<String,edu.berkeley.sparrow.thrift.TNodeState>(2*_map16.size);\n                  for (int _i17 = 0; _i17 < _map16.size; ++_i17)\n                  {\n                    String _key18; // required\n                    edu.berkeley.sparrow.thrift.TNodeState _val19; // required\n                    _key18 = iprot.readString();\n                    _val19 = new edu.berkeley.sparrow.thrift.TNodeState();\n                    _val19.read(iprot);\n                    struct.snapshot.put(_key18, _val19);\n                  }\n                  iprot.readMapEnd();\n                }\n                struct.setSnapshotIsSet(true);\n              } else { \n                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n              }\n              break;\n            default:\n              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n          }\n          iprot.readFieldEnd();\n        }\n        iprot.readStructEnd();\n\n        // check for required fields of primitive type, which can't be checked in the validate method\n        struct.validate();\n      }\n\n      public void write(org.apache.thrift.protocol.TProtocol oprot, updateNodeState_args struct) throws org.apache.thrift.TException {\n        struct.validate();\n\n        oprot.writeStructBegin(STRUCT_DESC);\n        if (struct.snapshot != null) {\n          oprot.writeFieldBegin(SNAPSHOT_FIELD_DESC);\n          {\n            oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, struct.snapshot.size()));\n            for (Map.Entry<String, edu.berkeley.sparrow.thrift.TNodeState> _iter20 : struct.snapshot.entrySet())\n            {\n              oprot.writeString(_iter20.getKey());\n              _iter20.getValue().write(oprot);\n            }\n            oprot.writeMapEnd();\n          }\n          oprot.writeFieldEnd();\n        }\n        oprot.writeFieldStop();\n        oprot.writeStructEnd();\n      }\n\n    }\n\n    private static class updateNodeState_argsTupleSchemeFactory implements SchemeFactory {\n      public updateNodeState_argsTupleScheme getScheme() {\n        return new updateNodeState_argsTupleScheme();\n      }\n    }\n\n    private static class updateNodeState_argsTupleScheme extends TupleScheme<updateNodeState_args> {\n\n      @Override\n      public void write(org.apache.thrift.protocol.TProtocol prot, updateNodeState_args struct) throws org.apache.thrift.TException {\n        TTupleProtocol oprot = (TTupleProtocol) prot;\n        BitSet optionals = new BitSet();\n        if (struct.isSetSnapshot()) {\n          optionals.set(0);\n        }\n        oprot.writeBitSet(optionals, 1);\n        if (struct.isSetSnapshot()) {\n          {\n            oprot.writeI32(struct.snapshot.size());\n            for (Map.Entry<String, edu.berkeley.sparrow.thrift.TNodeState> _iter21 : struct.snapshot.entrySet())\n            {\n              oprot.writeString(_iter21.getKey());\n              _iter21.getValue().write(oprot);\n            }\n          }\n        }\n      }\n\n      @Override\n      public void read(org.apache.thrift.protocol.TProtocol prot, updateNodeState_args struct) throws org.apache.thrift.TException {\n        TTupleProtocol iprot = (TTupleProtocol) prot;\n        BitSet incoming = iprot.readBitSet(1);\n        if (incoming.get(0)) {\n          {\n            org.apache.thrift.protocol.TMap _map22 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());\n            struct.snapshot = new HashMap<String,edu.berkeley.sparrow.thrift.TNodeState>(2*_map22.size);\n            for (int _i23 = 0; _i23 < _map22.size; ++_i23)\n            {\n              String _key24; // required\n              edu.berkeley.sparrow.thrift.TNodeState _val25; // required\n              _key24 = iprot.readString();\n              _val25 = new edu.berkeley.sparrow.thrift.TNodeState();\n              _val25.read(iprot);\n              struct.snapshot.put(_key24, _val25);\n            }\n          }\n          struct.setSnapshotIsSet(true);\n        }\n      }\n    }\n\n  }\n\n  public static class updateNodeState_result implements org.apache.thrift.TBase<updateNodeState_result, updateNodeState_result._Fields>, java.io.Serializable, Cloneable   {\n    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct(\"updateNodeState_result\");\n\n\n    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();\n    static {\n      schemes.put(StandardScheme.class, new updateNodeState_resultStandardSchemeFactory());\n      schemes.put(TupleScheme.class, new updateNodeState_resultTupleSchemeFactory());\n    }\n\n\n    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */\n    public enum _Fields implements org.apache.thrift.TFieldIdEnum {\n;\n\n      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();\n\n      static {\n        for (_Fields field : EnumSet.allOf(_Fields.class)) {\n          byName.put(field.getFieldName(), field);\n        }\n      }\n\n      /**\n       * Find the _Fields constant that matches fieldId, or null if its not found.\n       */\n      public static _Fields findByThriftId(int fieldId) {\n        switch(fieldId) {\n          default:\n            return null;\n        }\n      }\n\n      /**\n       * Find the _Fields constant that matches fieldId, throwing an exception\n       * if it is not found.\n       */\n      public static _Fields findByThriftIdOrThrow(int fieldId) {\n        _Fields fields = findByThriftId(fieldId);\n        if (fields == null) throw new IllegalArgumentException(\"Field \" + fieldId + \" doesn't exist!\");\n        return fields;\n      }\n\n      /**\n       * Find the _Fields constant that matches name, or null if its not found.\n       */\n      public static _Fields findByName(String name) {\n        return byName.get(name);\n      }\n\n      private final short _thriftId;\n      private final String _fieldName;\n\n      _Fields(short thriftId, String fieldName) {\n        _thriftId = thriftId;\n        _fieldName = fieldName;\n      }\n\n      public short getThriftFieldId() {\n        return _thriftId;\n      }\n\n      public String getFieldName() {\n        return _fieldName;\n      }\n    }\n    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;\n    static {\n      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);\n      metaDataMap = Collections.unmodifiableMap(tmpMap);\n      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateNodeState_result.class, metaDataMap);\n    }\n\n    public updateNodeState_result() {\n    }\n\n    /**\n     * Performs a deep copy on <i>other</i>.\n     */\n    public updateNodeState_result(updateNodeState_result other) {\n    }\n\n    public updateNodeState_result deepCopy() {\n      return new updateNodeState_result(this);\n    }\n\n    public void clear() {\n    }\n\n    public void setFieldValue(_Fields field, Object value) {\n      switch (field) {\n      }\n    }\n\n    public Object getFieldValue(_Fields field) {\n      switch (field) {\n      }\n      throw new IllegalStateException();\n    }\n\n    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */\n    public boolean isSet(_Fields field) {\n      if (field == null) {\n        throw new IllegalArgumentException();\n      }\n\n      switch (field) {\n      }\n      throw new IllegalStateException();\n    }\n\n    @Override\n    public boolean equals(Object that) {\n      if (that == null)\n        return false;\n      if (that instanceof updateNodeState_result)\n        return this.equals((updateNodeState_result)that);\n      return false;\n    }\n\n    public boolean equals(updateNodeState_result that) {\n      if (that == null)\n        return false;\n\n      return true;\n    }\n\n    @Override\n    public int hashCode() {\n      return 0;\n    }\n\n    public int compareTo(updateNodeState_result other) {\n      if (!getClass().equals(other.getClass())) {\n        return getClass().getName().compareTo(other.getClass().getName());\n      }\n\n      int lastComparison = 0;\n      updateNodeState_result typedOther = (updateNodeState_result)other;\n\n      return 0;\n    }\n\n    public _Fields fieldForId(int fieldId) {\n      return _Fields.findByThriftId(fieldId);\n    }\n\n    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {\n      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);\n    }\n\n    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {\n      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);\n      }\n\n    @Override\n    public String toString() {\n      StringBuilder sb = new StringBuilder(\"updateNodeState_result(\");\n      boolean first = true;\n\n      sb.append(\")\");\n      return sb.toString();\n    }\n\n    public void validate() throws org.apache.thrift.TException {\n      // check for required fields\n    }\n\n    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {\n      try {\n        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));\n      } catch (org.apache.thrift.TException te) {\n        throw new java.io.IOException(te.getMessage());\n      }\n    }\n\n    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {\n      try {\n        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));\n      } catch (org.apache.thrift.TException te) {\n        throw new java.io.IOException(te.getMessage());\n      }\n    }\n\n    private static class updateNodeState_resultStandardSchemeFactory implements SchemeFactory {\n      public updateNodeState_resultStandardScheme getScheme() {\n        return new updateNodeState_resultStandardScheme();\n      }\n    }\n\n    private static class updateNodeState_resultStandardScheme extends StandardScheme<updateNodeState_result> {\n\n      public void read(org.apache.thrift.protocol.TProtocol iprot, updateNodeState_result struct) throws org.apache.thrift.TException {\n        org.apache.thrift.protocol.TField schemeField;\n        iprot.readStructBegin();\n        while (true)\n        {\n          schemeField = iprot.readFieldBegin();\n          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { \n            break;\n          }\n          switch (schemeField.id) {\n            default:\n              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n          }\n          iprot.readFieldEnd();\n        }\n        iprot.readStructEnd();\n\n        // check for required fields of primitive type, which can't be checked in the validate method\n        struct.validate();\n      }\n\n      public void write(org.apache.thrift.protocol.TProtocol oprot, updateNodeState_result struct) throws org.apache.thrift.TException {\n        struct.validate();\n\n        oprot.writeStructBegin(STRUCT_DESC);\n        oprot.writeFieldStop();\n        oprot.writeStructEnd();\n      }\n\n    }\n\n    private static class updateNodeState_resultTupleSchemeFactory implements SchemeFactory {\n      public updateNodeState_resultTupleScheme getScheme() {\n        return new updateNodeState_resultTupleScheme();\n      }\n    }\n\n    private static class updateNodeState_resultTupleScheme extends TupleScheme<updateNodeState_result> {\n\n      @Override\n      public void write(org.apache.thrift.protocol.TProtocol prot, updateNodeState_result struct) throws org.apache.thrift.TException {\n        TTupleProtocol oprot = (TTupleProtocol) prot;\n      }\n\n      @Override\n      public void read(org.apache.thrift.protocol.TProtocol prot, updateNodeState_result struct) throws org.apache.thrift.TException {\n        TTupleProtocol iprot = (TTupleProtocol) prot;\n      }\n    }\n\n  }\n\n}\n"
  },
  {
    "path": "src/main/gen-java/edu/berkeley/sparrow/thrift/StateStoreService.java",
    "content": "/**\n * Autogenerated by Thrift Compiler (0.8.0)\n *\n * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING\n *  @generated\n */\npackage edu.berkeley.sparrow.thrift;\n\nimport org.apache.thrift.scheme.IScheme;\nimport org.apache.thrift.scheme.SchemeFactory;\nimport org.apache.thrift.scheme.StandardScheme;\n\nimport org.apache.thrift.scheme.TupleScheme;\nimport org.apache.thrift.protocol.TTupleProtocol;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.util.HashMap;\nimport java.util.EnumMap;\nimport java.util.Set;\nimport java.util.HashSet;\nimport java.util.EnumSet;\nimport java.util.Collections;\nimport java.util.BitSet;\nimport java.nio.ByteBuffer;\nimport java.util.Arrays;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\npublic class StateStoreService {\n\n  public interface Iface {\n\n    public void registerScheduler(String schedulerAddress) throws org.apache.thrift.TException;\n\n    public void registerNodeMonitor(String nodeMonitorAddress) throws org.apache.thrift.TException;\n\n  }\n\n  public interface AsyncIface {\n\n    public void registerScheduler(String schedulerAddress, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.registerScheduler_call> resultHandler) throws org.apache.thrift.TException;\n\n    public void registerNodeMonitor(String nodeMonitorAddress, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.registerNodeMonitor_call> resultHandler) throws org.apache.thrift.TException;\n\n  }\n\n  public static class Client extends org.apache.thrift.TServiceClient implements Iface {\n    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {\n      public Factory() {}\n      public Client getClient(org.apache.thrift.protocol.TProtocol prot) {\n        return new Client(prot);\n      }\n      public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {\n        return new Client(iprot, oprot);\n      }\n    }\n\n    public Client(org.apache.thrift.protocol.TProtocol prot)\n    {\n      super(prot, prot);\n    }\n\n    public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {\n      super(iprot, oprot);\n    }\n\n    public void registerScheduler(String schedulerAddress) throws org.apache.thrift.TException\n    {\n      send_registerScheduler(schedulerAddress);\n      recv_registerScheduler();\n    }\n\n    public void send_registerScheduler(String schedulerAddress) throws org.apache.thrift.TException\n    {\n      registerScheduler_args args = new registerScheduler_args();\n      args.setSchedulerAddress(schedulerAddress);\n      sendBase(\"registerScheduler\", args);\n    }\n\n    public void recv_registerScheduler() throws org.apache.thrift.TException\n    {\n      registerScheduler_result result = new registerScheduler_result();\n      receiveBase(result, \"registerScheduler\");\n      return;\n    }\n\n    public void registerNodeMonitor(String nodeMonitorAddress) throws org.apache.thrift.TException\n    {\n      send_registerNodeMonitor(nodeMonitorAddress);\n      recv_registerNodeMonitor();\n    }\n\n    public void send_registerNodeMonitor(String nodeMonitorAddress) throws org.apache.thrift.TException\n    {\n      registerNodeMonitor_args args = new registerNodeMonitor_args();\n      args.setNodeMonitorAddress(nodeMonitorAddress);\n      sendBase(\"registerNodeMonitor\", args);\n    }\n\n    public void recv_registerNodeMonitor() throws org.apache.thrift.TException\n    {\n      registerNodeMonitor_result result = new registerNodeMonitor_result();\n      receiveBase(result, \"registerNodeMonitor\");\n      return;\n    }\n\n  }\n  public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface {\n    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {\n      private org.apache.thrift.async.TAsyncClientManager clientManager;\n      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;\n      public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {\n        this.clientManager = clientManager;\n        this.protocolFactory = protocolFactory;\n      }\n      public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {\n        return new AsyncClient(protocolFactory, clientManager, transport);\n      }\n    }\n\n    public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {\n      super(protocolFactory, clientManager, transport);\n    }\n\n    public void registerScheduler(String schedulerAddress, org.apache.thrift.async.AsyncMethodCallback<registerScheduler_call> resultHandler) throws org.apache.thrift.TException {\n      checkReady();\n      registerScheduler_call method_call = new registerScheduler_call(schedulerAddress, resultHandler, this, ___protocolFactory, ___transport);\n      this.___currentMethod = method_call;\n      ___manager.call(method_call);\n    }\n\n    public static class registerScheduler_call extends org.apache.thrift.async.TAsyncMethodCall {\n      private String schedulerAddress;\n      public registerScheduler_call(String schedulerAddress, org.apache.thrift.async.AsyncMethodCallback<registerScheduler_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {\n        super(client, protocolFactory, transport, resultHandler, false);\n        this.schedulerAddress = schedulerAddress;\n      }\n\n      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {\n        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage(\"registerScheduler\", org.apache.thrift.protocol.TMessageType.CALL, 0));\n        registerScheduler_args args = new registerScheduler_args();\n        args.setSchedulerAddress(schedulerAddress);\n        args.write(prot);\n        prot.writeMessageEnd();\n      }\n\n      public void getResult() throws org.apache.thrift.TException {\n        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {\n          throw new IllegalStateException(\"Method call not finished!\");\n        }\n        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());\n        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);\n        (new Client(prot)).recv_registerScheduler();\n      }\n    }\n\n    public void registerNodeMonitor(String nodeMonitorAddress, org.apache.thrift.async.AsyncMethodCallback<registerNodeMonitor_call> resultHandler) throws org.apache.thrift.TException {\n      checkReady();\n      registerNodeMonitor_call method_call = new registerNodeMonitor_call(nodeMonitorAddress, resultHandler, this, ___protocolFactory, ___transport);\n      this.___currentMethod = method_call;\n      ___manager.call(method_call);\n    }\n\n    public static class registerNodeMonitor_call extends org.apache.thrift.async.TAsyncMethodCall {\n      private String nodeMonitorAddress;\n      public registerNodeMonitor_call(String nodeMonitorAddress, org.apache.thrift.async.AsyncMethodCallback<registerNodeMonitor_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {\n        super(client, protocolFactory, transport, resultHandler, false);\n        this.nodeMonitorAddress = nodeMonitorAddress;\n      }\n\n      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {\n        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage(\"registerNodeMonitor\", org.apache.thrift.protocol.TMessageType.CALL, 0));\n        registerNodeMonitor_args args = new registerNodeMonitor_args();\n        args.setNodeMonitorAddress(nodeMonitorAddress);\n        args.write(prot);\n        prot.writeMessageEnd();\n      }\n\n      public void getResult() throws org.apache.thrift.TException {\n        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {\n          throw new IllegalStateException(\"Method call not finished!\");\n        }\n        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());\n        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);\n        (new Client(prot)).recv_registerNodeMonitor();\n      }\n    }\n\n  }\n\n  public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor {\n    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());\n    public Processor(I iface) {\n      super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));\n    }\n\n    protected Processor(I iface, Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {\n      super(iface, getProcessMap(processMap));\n    }\n\n    private static <I extends Iface> Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> getProcessMap(Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {\n      processMap.put(\"registerScheduler\", new registerScheduler());\n      processMap.put(\"registerNodeMonitor\", new registerNodeMonitor());\n      return processMap;\n    }\n\n    private static class registerScheduler<I extends Iface> extends org.apache.thrift.ProcessFunction<I, registerScheduler_args> {\n      public registerScheduler() {\n        super(\"registerScheduler\");\n      }\n\n      protected registerScheduler_args getEmptyArgsInstance() {\n        return new registerScheduler_args();\n      }\n\n      protected registerScheduler_result getResult(I iface, registerScheduler_args args) throws org.apache.thrift.TException {\n        registerScheduler_result result = new registerScheduler_result();\n        iface.registerScheduler(args.schedulerAddress);\n        return result;\n      }\n    }\n\n    private static class registerNodeMonitor<I extends Iface> extends org.apache.thrift.ProcessFunction<I, registerNodeMonitor_args> {\n      public registerNodeMonitor() {\n        super(\"registerNodeMonitor\");\n      }\n\n      protected registerNodeMonitor_args getEmptyArgsInstance() {\n        return new registerNodeMonitor_args();\n      }\n\n      protected registerNodeMonitor_result getResult(I iface, registerNodeMonitor_args args) throws org.apache.thrift.TException {\n        registerNodeMonitor_result result = new registerNodeMonitor_result();\n        iface.registerNodeMonitor(args.nodeMonitorAddress);\n        return result;\n      }\n    }\n\n  }\n\n  public static class registerScheduler_args implements org.apache.thrift.TBase<registerScheduler_args, registerScheduler_args._Fields>, java.io.Serializable, Cloneable   {\n    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct(\"registerScheduler_args\");\n\n    private static final org.apache.thrift.protocol.TField SCHEDULER_ADDRESS_FIELD_DESC = new org.apache.thrift.protocol.TField(\"schedulerAddress\", org.apache.thrift.protocol.TType.STRING, (short)1);\n\n    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();\n    static {\n      schemes.put(StandardScheme.class, new registerScheduler_argsStandardSchemeFactory());\n      schemes.put(TupleScheme.class, new registerScheduler_argsTupleSchemeFactory());\n    }\n\n    public String schedulerAddress; // required\n\n    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */\n    public enum _Fields implements org.apache.thrift.TFieldIdEnum {\n      SCHEDULER_ADDRESS((short)1, \"schedulerAddress\");\n\n      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();\n\n      static {\n        for (_Fields field : EnumSet.allOf(_Fields.class)) {\n          byName.put(field.getFieldName(), field);\n        }\n      }\n\n      /**\n       * Find the _Fields constant that matches fieldId, or null if its not found.\n       */\n      public static _Fields findByThriftId(int fieldId) {\n        switch(fieldId) {\n          case 1: // SCHEDULER_ADDRESS\n            return SCHEDULER_ADDRESS;\n          default:\n            return null;\n        }\n      }\n\n      /**\n       * Find the _Fields constant that matches fieldId, throwing an exception\n       * if it is not found.\n       */\n      public static _Fields findByThriftIdOrThrow(int fieldId) {\n        _Fields fields = findByThriftId(fieldId);\n        if (fields == null) throw new IllegalArgumentException(\"Field \" + fieldId + \" doesn't exist!\");\n        return fields;\n      }\n\n      /**\n       * Find the _Fields constant that matches name, or null if its not found.\n       */\n      public static _Fields findByName(String name) {\n        return byName.get(name);\n      }\n\n      private final short _thriftId;\n      private final String _fieldName;\n\n      _Fields(short thriftId, String fieldName) {\n        _thriftId = thriftId;\n        _fieldName = fieldName;\n      }\n\n      public short getThriftFieldId() {\n        return _thriftId;\n      }\n\n      public String getFieldName() {\n        return _fieldName;\n      }\n    }\n\n    // isset id assignments\n    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;\n    static {\n      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);\n      tmpMap.put(_Fields.SCHEDULER_ADDRESS, new org.apache.thrift.meta_data.FieldMetaData(\"schedulerAddress\", org.apache.thrift.TFieldRequirementType.DEFAULT, \n          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));\n      metaDataMap = Collections.unmodifiableMap(tmpMap);\n      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(registerScheduler_args.class, metaDataMap);\n    }\n\n    public registerScheduler_args() {\n    }\n\n    public registerScheduler_args(\n      String schedulerAddress)\n    {\n      this();\n      this.schedulerAddress = schedulerAddress;\n    }\n\n    /**\n     * Performs a deep copy on <i>other</i>.\n     */\n    public registerScheduler_args(registerScheduler_args other) {\n      if (other.isSetSchedulerAddress()) {\n        this.schedulerAddress = other.schedulerAddress;\n      }\n    }\n\n    public registerScheduler_args deepCopy() {\n      return new registerScheduler_args(this);\n    }\n\n    public void clear() {\n      this.schedulerAddress = null;\n    }\n\n    public String getSchedulerAddress() {\n      return this.schedulerAddress;\n    }\n\n    public registerScheduler_args setSchedulerAddress(String schedulerAddress) {\n      this.schedulerAddress = schedulerAddress;\n      return this;\n    }\n\n    public void unsetSchedulerAddress() {\n      this.schedulerAddress = null;\n    }\n\n    /** Returns true if field schedulerAddress is set (has been assigned a value) and false otherwise */\n    public boolean isSetSchedulerAddress() {\n      return this.schedulerAddress != null;\n    }\n\n    public void setSchedulerAddressIsSet(boolean value) {\n      if (!value) {\n        this.schedulerAddress = null;\n      }\n    }\n\n    public void setFieldValue(_Fields field, Object value) {\n      switch (field) {\n      case SCHEDULER_ADDRESS:\n        if (value == null) {\n          unsetSchedulerAddress();\n        } else {\n          setSchedulerAddress((String)value);\n        }\n        break;\n\n      }\n    }\n\n    public Object getFieldValue(_Fields field) {\n      switch (field) {\n      case SCHEDULER_ADDRESS:\n        return getSchedulerAddress();\n\n      }\n      throw new IllegalStateException();\n    }\n\n    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */\n    public boolean isSet(_Fields field) {\n      if (field == null) {\n        throw new IllegalArgumentException();\n      }\n\n      switch (field) {\n      case SCHEDULER_ADDRESS:\n        return isSetSchedulerAddress();\n      }\n      throw new IllegalStateException();\n    }\n\n    @Override\n    public boolean equals(Object that) {\n      if (that == null)\n        return false;\n      if (that instanceof registerScheduler_args)\n        return this.equals((registerScheduler_args)that);\n      return false;\n    }\n\n    public boolean equals(registerScheduler_args that) {\n      if (that == null)\n        return false;\n\n      boolean this_present_schedulerAddress = true && this.isSetSchedulerAddress();\n      boolean that_present_schedulerAddress = true && that.isSetSchedulerAddress();\n      if (this_present_schedulerAddress || that_present_schedulerAddress) {\n        if (!(this_present_schedulerAddress && that_present_schedulerAddress))\n          return false;\n        if (!this.schedulerAddress.equals(that.schedulerAddress))\n          return false;\n      }\n\n      return true;\n    }\n\n    @Override\n    public int hashCode() {\n      return 0;\n    }\n\n    public int compareTo(registerScheduler_args other) {\n      if (!getClass().equals(other.getClass())) {\n        return getClass().getName().compareTo(other.getClass().getName());\n      }\n\n      int lastComparison = 0;\n      registerScheduler_args typedOther = (registerScheduler_args)other;\n\n      lastComparison = Boolean.valueOf(isSetSchedulerAddress()).compareTo(typedOther.isSetSchedulerAddress());\n      if (lastComparison != 0) {\n        return lastComparison;\n      }\n      if (isSetSchedulerAddress()) {\n        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.schedulerAddress, typedOther.schedulerAddress);\n        if (lastComparison != 0) {\n          return lastComparison;\n        }\n      }\n      return 0;\n    }\n\n    public _Fields fieldForId(int fieldId) {\n      return _Fields.findByThriftId(fieldId);\n    }\n\n    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {\n      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);\n    }\n\n    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {\n      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);\n    }\n\n    @Override\n    public String toString() {\n      StringBuilder sb = new StringBuilder(\"registerScheduler_args(\");\n      boolean first = true;\n\n      sb.append(\"schedulerAddress:\");\n      if (this.schedulerAddress == null) {\n        sb.append(\"null\");\n      } else {\n        sb.append(this.schedulerAddress);\n      }\n      first = false;\n      sb.append(\")\");\n      return sb.toString();\n    }\n\n    public void validate() throws org.apache.thrift.TException {\n      // check for required fields\n    }\n\n    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {\n      try {\n        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));\n      } catch (org.apache.thrift.TException te) {\n        throw new java.io.IOException(te.getMessage());\n      }\n    }\n\n    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {\n      try {\n        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));\n      } catch (org.apache.thrift.TException te) {\n        throw new java.io.IOException(te.getMessage());\n      }\n    }\n\n    private static class registerScheduler_argsStandardSchemeFactory implements SchemeFactory {\n      public registerScheduler_argsStandardScheme getScheme() {\n        return new registerScheduler_argsStandardScheme();\n      }\n    }\n\n    private static class registerScheduler_argsStandardScheme extends StandardScheme<registerScheduler_args> {\n\n      public void read(org.apache.thrift.protocol.TProtocol iprot, registerScheduler_args struct) throws org.apache.thrift.TException {\n        org.apache.thrift.protocol.TField schemeField;\n        iprot.readStructBegin();\n        while (true)\n        {\n          schemeField = iprot.readFieldBegin();\n          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { \n            break;\n          }\n          switch (schemeField.id) {\n            case 1: // SCHEDULER_ADDRESS\n              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {\n                struct.schedulerAddress = iprot.readString();\n                struct.setSchedulerAddressIsSet(true);\n              } else { \n                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n              }\n              break;\n            default:\n              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n          }\n          iprot.readFieldEnd();\n        }\n        iprot.readStructEnd();\n\n        // check for required fields of primitive type, which can't be checked in the validate method\n        struct.validate();\n      }\n\n      public void write(org.apache.thrift.protocol.TProtocol oprot, registerScheduler_args struct) throws org.apache.thrift.TException {\n        struct.validate();\n\n        oprot.writeStructBegin(STRUCT_DESC);\n        if (struct.schedulerAddress != null) {\n          oprot.writeFieldBegin(SCHEDULER_ADDRESS_FIELD_DESC);\n          oprot.writeString(struct.schedulerAddress);\n          oprot.writeFieldEnd();\n        }\n        oprot.writeFieldStop();\n        oprot.writeStructEnd();\n      }\n\n    }\n\n    private static class registerScheduler_argsTupleSchemeFactory implements SchemeFactory {\n      public registerScheduler_argsTupleScheme getScheme() {\n        return new registerScheduler_argsTupleScheme();\n      }\n    }\n\n    private static class registerScheduler_argsTupleScheme extends TupleScheme<registerScheduler_args> {\n\n      @Override\n      public void write(org.apache.thrift.protocol.TProtocol prot, registerScheduler_args struct) throws org.apache.thrift.TException {\n        TTupleProtocol oprot = (TTupleProtocol) prot;\n        BitSet optionals = new BitSet();\n        if (struct.isSetSchedulerAddress()) {\n          optionals.set(0);\n        }\n        oprot.writeBitSet(optionals, 1);\n        if (struct.isSetSchedulerAddress()) {\n          oprot.writeString(struct.schedulerAddress);\n        }\n      }\n\n      @Override\n      public void read(org.apache.thrift.protocol.TProtocol prot, registerScheduler_args struct) throws org.apache.thrift.TException {\n        TTupleProtocol iprot = (TTupleProtocol) prot;\n        BitSet incoming = iprot.readBitSet(1);\n        if (incoming.get(0)) {\n          struct.schedulerAddress = iprot.readString();\n          struct.setSchedulerAddressIsSet(true);\n        }\n      }\n    }\n\n  }\n\n  public static class registerScheduler_result implements org.apache.thrift.TBase<registerScheduler_result, registerScheduler_result._Fields>, java.io.Serializable, Cloneable   {\n    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct(\"registerScheduler_result\");\n\n\n    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();\n    static {\n      schemes.put(StandardScheme.class, new registerScheduler_resultStandardSchemeFactory());\n      schemes.put(TupleScheme.class, new registerScheduler_resultTupleSchemeFactory());\n    }\n\n\n    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */\n    public enum _Fields implements org.apache.thrift.TFieldIdEnum {\n;\n\n      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();\n\n      static {\n        for (_Fields field : EnumSet.allOf(_Fields.class)) {\n          byName.put(field.getFieldName(), field);\n        }\n      }\n\n      /**\n       * Find the _Fields constant that matches fieldId, or null if its not found.\n       */\n      public static _Fields findByThriftId(int fieldId) {\n        switch(fieldId) {\n          default:\n            return null;\n        }\n      }\n\n      /**\n       * Find the _Fields constant that matches fieldId, throwing an exception\n       * if it is not found.\n       */\n      public static _Fields findByThriftIdOrThrow(int fieldId) {\n        _Fields fields = findByThriftId(fieldId);\n        if (fields == null) throw new IllegalArgumentException(\"Field \" + fieldId + \" doesn't exist!\");\n        return fields;\n      }\n\n      /**\n       * Find the _Fields constant that matches name, or null if its not found.\n       */\n      public static _Fields findByName(String name) {\n        return byName.get(name);\n      }\n\n      private final short _thriftId;\n      private final String _fieldName;\n\n      _Fields(short thriftId, String fieldName) {\n        _thriftId = thriftId;\n        _fieldName = fieldName;\n      }\n\n      public short getThriftFieldId() {\n        return _thriftId;\n      }\n\n      public String getFieldName() {\n        return _fieldName;\n      }\n    }\n    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;\n    static {\n      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);\n      metaDataMap = Collections.unmodifiableMap(tmpMap);\n      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(registerScheduler_result.class, metaDataMap);\n    }\n\n    public registerScheduler_result() {\n    }\n\n    /**\n     * Performs a deep copy on <i>other</i>.\n     */\n    public registerScheduler_result(registerScheduler_result other) {\n    }\n\n    public registerScheduler_result deepCopy() {\n      return new registerScheduler_result(this);\n    }\n\n    public void clear() {\n    }\n\n    public void setFieldValue(_Fields field, Object value) {\n      switch (field) {\n      }\n    }\n\n    public Object getFieldValue(_Fields field) {\n      switch (field) {\n      }\n      throw new IllegalStateException();\n    }\n\n    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */\n    public boolean isSet(_Fields field) {\n      if (field == null) {\n        throw new IllegalArgumentException();\n      }\n\n      switch (field) {\n      }\n      throw new IllegalStateException();\n    }\n\n    @Override\n    public boolean equals(Object that) {\n      if (that == null)\n        return false;\n      if (that instanceof registerScheduler_result)\n        return this.equals((registerScheduler_result)that);\n      return false;\n    }\n\n    public boolean equals(registerScheduler_result that) {\n      if (that == null)\n        return false;\n\n      return true;\n    }\n\n    @Override\n    public int hashCode() {\n      return 0;\n    }\n\n    public int compareTo(registerScheduler_result other) {\n      if (!getClass().equals(other.getClass())) {\n        return getClass().getName().compareTo(other.getClass().getName());\n      }\n\n      int lastComparison = 0;\n      registerScheduler_result typedOther = (registerScheduler_result)other;\n\n      return 0;\n    }\n\n    public _Fields fieldForId(int fieldId) {\n      return _Fields.findByThriftId(fieldId);\n    }\n\n    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {\n      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);\n    }\n\n    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {\n      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);\n      }\n\n    @Override\n    public String toString() {\n      StringBuilder sb = new StringBuilder(\"registerScheduler_result(\");\n      boolean first = true;\n\n      sb.append(\")\");\n      return sb.toString();\n    }\n\n    public void validate() throws org.apache.thrift.TException {\n      // check for required fields\n    }\n\n    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {\n      try {\n        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));\n      } catch (org.apache.thrift.TException te) {\n        throw new java.io.IOException(te.getMessage());\n      }\n    }\n\n    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {\n      try {\n        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));\n      } catch (org.apache.thrift.TException te) {\n        throw new java.io.IOException(te.getMessage());\n      }\n    }\n\n    private static class registerScheduler_resultStandardSchemeFactory implements SchemeFactory {\n      public registerScheduler_resultStandardScheme getScheme() {\n        return new registerScheduler_resultStandardScheme();\n      }\n    }\n\n    private static class registerScheduler_resultStandardScheme extends StandardScheme<registerScheduler_result> {\n\n      public void read(org.apache.thrift.protocol.TProtocol iprot, registerScheduler_result struct) throws org.apache.thrift.TException {\n        org.apache.thrift.protocol.TField schemeField;\n        iprot.readStructBegin();\n        while (true)\n        {\n          schemeField = iprot.readFieldBegin();\n          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { \n            break;\n          }\n          switch (schemeField.id) {\n            default:\n              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n          }\n          iprot.readFieldEnd();\n        }\n        iprot.readStructEnd();\n\n        // check for required fields of primitive type, which can't be checked in the validate method\n        struct.validate();\n      }\n\n      public void write(org.apache.thrift.protocol.TProtocol oprot, registerScheduler_result struct) throws org.apache.thrift.TException {\n        struct.validate();\n\n        oprot.writeStructBegin(STRUCT_DESC);\n        oprot.writeFieldStop();\n        oprot.writeStructEnd();\n      }\n\n    }\n\n    private static class registerScheduler_resultTupleSchemeFactory implements SchemeFactory {\n      public registerScheduler_resultTupleScheme getScheme() {\n        return new registerScheduler_resultTupleScheme();\n      }\n    }\n\n    private static class registerScheduler_resultTupleScheme extends TupleScheme<registerScheduler_result> {\n\n      @Override\n      public void write(org.apache.thrift.protocol.TProtocol prot, registerScheduler_result struct) throws org.apache.thrift.TException {\n        TTupleProtocol oprot = (TTupleProtocol) prot;\n      }\n\n      @Override\n      public void read(org.apache.thrift.protocol.TProtocol prot, registerScheduler_result struct) throws org.apache.thrift.TException {\n        TTupleProtocol iprot = (TTupleProtocol) prot;\n      }\n    }\n\n  }\n\n  public static class registerNodeMonitor_args implements org.apache.thrift.TBase<registerNodeMonitor_args, registerNodeMonitor_args._Fields>, java.io.Serializable, Cloneable   {\n    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct(\"registerNodeMonitor_args\");\n\n    private static final org.apache.thrift.protocol.TField NODE_MONITOR_ADDRESS_FIELD_DESC = new org.apache.thrift.protocol.TField(\"nodeMonitorAddress\", org.apache.thrift.protocol.TType.STRING, (short)1);\n\n    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();\n    static {\n      schemes.put(StandardScheme.class, new registerNodeMonitor_argsStandardSchemeFactory());\n      schemes.put(TupleScheme.class, new registerNodeMonitor_argsTupleSchemeFactory());\n    }\n\n    public String nodeMonitorAddress; // required\n\n    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */\n    public enum _Fields implements org.apache.thrift.TFieldIdEnum {\n      NODE_MONITOR_ADDRESS((short)1, \"nodeMonitorAddress\");\n\n      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();\n\n      static {\n        for (_Fields field : EnumSet.allOf(_Fields.class)) {\n          byName.put(field.getFieldName(), field);\n        }\n      }\n\n      /**\n       * Find the _Fields constant that matches fieldId, or null if its not found.\n       */\n      public static _Fields findByThriftId(int fieldId) {\n        switch(fieldId) {\n          case 1: // NODE_MONITOR_ADDRESS\n            return NODE_MONITOR_ADDRESS;\n          default:\n            return null;\n        }\n      }\n\n      /**\n       * Find the _Fields constant that matches fieldId, throwing an exception\n       * if it is not found.\n       */\n      public static _Fields findByThriftIdOrThrow(int fieldId) {\n        _Fields fields = findByThriftId(fieldId);\n        if (fields == null) throw new IllegalArgumentException(\"Field \" + fieldId + \" doesn't exist!\");\n        return fields;\n      }\n\n      /**\n       * Find the _Fields constant that matches name, or null if its not found.\n       */\n      public static _Fields findByName(String name) {\n        return byName.get(name);\n      }\n\n      private final short _thriftId;\n      private final String _fieldName;\n\n      _Fields(short thriftId, String fieldName) {\n        _thriftId = thriftId;\n        _fieldName = fieldName;\n      }\n\n      public short getThriftFieldId() {\n        return _thriftId;\n      }\n\n      public String getFieldName() {\n        return _fieldName;\n      }\n    }\n\n    // isset id assignments\n    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;\n    static {\n      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);\n      tmpMap.put(_Fields.NODE_MONITOR_ADDRESS, new org.apache.thrift.meta_data.FieldMetaData(\"nodeMonitorAddress\", org.apache.thrift.TFieldRequirementType.DEFAULT, \n          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));\n      metaDataMap = Collections.unmodifiableMap(tmpMap);\n      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(registerNodeMonitor_args.class, metaDataMap);\n    }\n\n    public registerNodeMonitor_args() {\n    }\n\n    public registerNodeMonitor_args(\n      String nodeMonitorAddress)\n    {\n      this();\n      this.nodeMonitorAddress = nodeMonitorAddress;\n    }\n\n    /**\n     * Performs a deep copy on <i>other</i>.\n     */\n    public registerNodeMonitor_args(registerNodeMonitor_args other) {\n      if (other.isSetNodeMonitorAddress()) {\n        this.nodeMonitorAddress = other.nodeMonitorAddress;\n      }\n    }\n\n    public registerNodeMonitor_args deepCopy() {\n      return new registerNodeMonitor_args(this);\n    }\n\n    public void clear() {\n      this.nodeMonitorAddress = null;\n    }\n\n    public String getNodeMonitorAddress() {\n      return this.nodeMonitorAddress;\n    }\n\n    public registerNodeMonitor_args setNodeMonitorAddress(String nodeMonitorAddress) {\n      this.nodeMonitorAddress = nodeMonitorAddress;\n      return this;\n    }\n\n    public void unsetNodeMonitorAddress() {\n      this.nodeMonitorAddress = null;\n    }\n\n    /** Returns true if field nodeMonitorAddress is set (has been assigned a value) and false otherwise */\n    public boolean isSetNodeMonitorAddress() {\n      return this.nodeMonitorAddress != null;\n    }\n\n    public void setNodeMonitorAddressIsSet(boolean value) {\n      if (!value) {\n        this.nodeMonitorAddress = null;\n      }\n    }\n\n    public void setFieldValue(_Fields field, Object value) {\n      switch (field) {\n      case NODE_MONITOR_ADDRESS:\n        if (value == null) {\n          unsetNodeMonitorAddress();\n        } else {\n          setNodeMonitorAddress((String)value);\n        }\n        break;\n\n      }\n    }\n\n    public Object getFieldValue(_Fields field) {\n      switch (field) {\n      case NODE_MONITOR_ADDRESS:\n        return getNodeMonitorAddress();\n\n      }\n      throw new IllegalStateException();\n    }\n\n    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */\n    public boolean isSet(_Fields field) {\n      if (field == null) {\n        throw new IllegalArgumentException();\n      }\n\n      switch (field) {\n      case NODE_MONITOR_ADDRESS:\n        return isSetNodeMonitorAddress();\n      }\n      throw new IllegalStateException();\n    }\n\n    @Override\n    public boolean equals(Object that) {\n      if (that == null)\n        return false;\n      if (that instanceof registerNodeMonitor_args)\n        return this.equals((registerNodeMonitor_args)that);\n      return false;\n    }\n\n    public boolean equals(registerNodeMonitor_args that) {\n      if (that == null)\n        return false;\n\n      boolean this_present_nodeMonitorAddress = true && this.isSetNodeMonitorAddress();\n      boolean that_present_nodeMonitorAddress = true && that.isSetNodeMonitorAddress();\n      if (this_present_nodeMonitorAddress || that_present_nodeMonitorAddress) {\n        if (!(this_present_nodeMonitorAddress && that_present_nodeMonitorAddress))\n          return false;\n        if (!this.nodeMonitorAddress.equals(that.nodeMonitorAddress))\n          return false;\n      }\n\n      return true;\n    }\n\n    @Override\n    public int hashCode() {\n      return 0;\n    }\n\n    public int compareTo(registerNodeMonitor_args other) {\n      if (!getClass().equals(other.getClass())) {\n        return getClass().getName().compareTo(other.getClass().getName());\n      }\n\n      int lastComparison = 0;\n      registerNodeMonitor_args typedOther = (registerNodeMonitor_args)other;\n\n      lastComparison = Boolean.valueOf(isSetNodeMonitorAddress()).compareTo(typedOther.isSetNodeMonitorAddress());\n      if (lastComparison != 0) {\n        return lastComparison;\n      }\n      if (isSetNodeMonitorAddress()) {\n        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nodeMonitorAddress, typedOther.nodeMonitorAddress);\n        if (lastComparison != 0) {\n          return lastComparison;\n        }\n      }\n      return 0;\n    }\n\n    public _Fields fieldForId(int fieldId) {\n      return _Fields.findByThriftId(fieldId);\n    }\n\n    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {\n      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);\n    }\n\n    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {\n      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);\n    }\n\n    @Override\n    public String toString() {\n      StringBuilder sb = new StringBuilder(\"registerNodeMonitor_args(\");\n      boolean first = true;\n\n      sb.append(\"nodeMonitorAddress:\");\n      if (this.nodeMonitorAddress == null) {\n        sb.append(\"null\");\n      } else {\n        sb.append(this.nodeMonitorAddress);\n      }\n      first = false;\n      sb.append(\")\");\n      return sb.toString();\n    }\n\n    public void validate() throws org.apache.thrift.TException {\n      // check for required fields\n    }\n\n    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {\n      try {\n        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));\n      } catch (org.apache.thrift.TException te) {\n        throw new java.io.IOException(te.getMessage());\n      }\n    }\n\n    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {\n      try {\n        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));\n      } catch (org.apache.thrift.TException te) {\n        throw new java.io.IOException(te.getMessage());\n      }\n    }\n\n    private static class registerNodeMonitor_argsStandardSchemeFactory implements SchemeFactory {\n      public registerNodeMonitor_argsStandardScheme getScheme() {\n        return new registerNodeMonitor_argsStandardScheme();\n      }\n    }\n\n    private static class registerNodeMonitor_argsStandardScheme extends StandardScheme<registerNodeMonitor_args> {\n\n      public void read(org.apache.thrift.protocol.TProtocol iprot, registerNodeMonitor_args struct) throws org.apache.thrift.TException {\n        org.apache.thrift.protocol.TField schemeField;\n        iprot.readStructBegin();\n        while (true)\n        {\n          schemeField = iprot.readFieldBegin();\n          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { \n            break;\n          }\n          switch (schemeField.id) {\n            case 1: // NODE_MONITOR_ADDRESS\n              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {\n                struct.nodeMonitorAddress = iprot.readString();\n                struct.setNodeMonitorAddressIsSet(true);\n              } else { \n                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n              }\n              break;\n            default:\n              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n          }\n          iprot.readFieldEnd();\n        }\n        iprot.readStructEnd();\n\n        // check for required fields of primitive type, which can't be checked in the validate method\n        struct.validate();\n      }\n\n      public void write(org.apache.thrift.protocol.TProtocol oprot, registerNodeMonitor_args struct) throws org.apache.thrift.TException {\n        struct.validate();\n\n        oprot.writeStructBegin(STRUCT_DESC);\n        if (struct.nodeMonitorAddress != null) {\n          oprot.writeFieldBegin(NODE_MONITOR_ADDRESS_FIELD_DESC);\n          oprot.writeString(struct.nodeMonitorAddress);\n          oprot.writeFieldEnd();\n        }\n        oprot.writeFieldStop();\n        oprot.writeStructEnd();\n      }\n\n    }\n\n    private static class registerNodeMonitor_argsTupleSchemeFactory implements SchemeFactory {\n      public registerNodeMonitor_argsTupleScheme getScheme() {\n        return new registerNodeMonitor_argsTupleScheme();\n      }\n    }\n\n    private static class registerNodeMonitor_argsTupleScheme extends TupleScheme<registerNodeMonitor_args> {\n\n      @Override\n      public void write(org.apache.thrift.protocol.TProtocol prot, registerNodeMonitor_args struct) throws org.apache.thrift.TException {\n        TTupleProtocol oprot = (TTupleProtocol) prot;\n        BitSet optionals = new BitSet();\n        if (struct.isSetNodeMonitorAddress()) {\n          optionals.set(0);\n        }\n        oprot.writeBitSet(optionals, 1);\n        if (struct.isSetNodeMonitorAddress()) {\n          oprot.writeString(struct.nodeMonitorAddress);\n        }\n      }\n\n      @Override\n      public void read(org.apache.thrift.protocol.TProtocol prot, registerNodeMonitor_args struct) throws org.apache.thrift.TException {\n        TTupleProtocol iprot = (TTupleProtocol) prot;\n        BitSet incoming = iprot.readBitSet(1);\n        if (incoming.get(0)) {\n          struct.nodeMonitorAddress = iprot.readString();\n          struct.setNodeMonitorAddressIsSet(true);\n        }\n      }\n    }\n\n  }\n\n  public static class registerNodeMonitor_result implements org.apache.thrift.TBase<registerNodeMonitor_result, registerNodeMonitor_result._Fields>, java.io.Serializable, Cloneable   {\n    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct(\"registerNodeMonitor_result\");\n\n\n    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();\n    static {\n      schemes.put(StandardScheme.class, new registerNodeMonitor_resultStandardSchemeFactory());\n      schemes.put(TupleScheme.class, new registerNodeMonitor_resultTupleSchemeFactory());\n    }\n\n\n    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */\n    public enum _Fields implements org.apache.thrift.TFieldIdEnum {\n;\n\n      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();\n\n      static {\n        for (_Fields field : EnumSet.allOf(_Fields.class)) {\n          byName.put(field.getFieldName(), field);\n        }\n      }\n\n      /**\n       * Find the _Fields constant that matches fieldId, or null if its not found.\n       */\n      public static _Fields findByThriftId(int fieldId) {\n        switch(fieldId) {\n          default:\n            return null;\n        }\n      }\n\n      /**\n       * Find the _Fields constant that matches fieldId, throwing an exception\n       * if it is not found.\n       */\n      public static _Fields findByThriftIdOrThrow(int fieldId) {\n        _Fields fields = findByThriftId(fieldId);\n        if (fields == null) throw new IllegalArgumentException(\"Field \" + fieldId + \" doesn't exist!\");\n        return fields;\n      }\n\n      /**\n       * Find the _Fields constant that matches name, or null if its not found.\n       */\n      public static _Fields findByName(String name) {\n        return byName.get(name);\n      }\n\n      private final short _thriftId;\n      private final String _fieldName;\n\n      _Fields(short thriftId, String fieldName) {\n        _thriftId = thriftId;\n        _fieldName = fieldName;\n      }\n\n      public short getThriftFieldId() {\n        return _thriftId;\n      }\n\n      public String getFieldName() {\n        return _fieldName;\n      }\n    }\n    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;\n    static {\n      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);\n      metaDataMap = Collections.unmodifiableMap(tmpMap);\n      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(registerNodeMonitor_result.class, metaDataMap);\n    }\n\n    public registerNodeMonitor_result() {\n    }\n\n    /**\n     * Performs a deep copy on <i>other</i>.\n     */\n    public registerNodeMonitor_result(registerNodeMonitor_result other) {\n    }\n\n    public registerNodeMonitor_result deepCopy() {\n      return new registerNodeMonitor_result(this);\n    }\n\n    public void clear() {\n    }\n\n    public void setFieldValue(_Fields field, Object value) {\n      switch (field) {\n      }\n    }\n\n    public Object getFieldValue(_Fields field) {\n      switch (field) {\n      }\n      throw new IllegalStateException();\n    }\n\n    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */\n    public boolean isSet(_Fields field) {\n      if (field == null) {\n        throw new IllegalArgumentException();\n      }\n\n      switch (field) {\n      }\n      throw new IllegalStateException();\n    }\n\n    @Override\n    public boolean equals(Object that) {\n      if (that == null)\n        return false;\n      if (that instanceof registerNodeMonitor_result)\n        return this.equals((registerNodeMonitor_result)that);\n      return false;\n    }\n\n    public boolean equals(registerNodeMonitor_result that) {\n      if (that == null)\n        return false;\n\n      return true;\n    }\n\n    @Override\n    public int hashCode() {\n      return 0;\n    }\n\n    public int compareTo(registerNodeMonitor_result other) {\n      if (!getClass().equals(other.getClass())) {\n        return getClass().getName().compareTo(other.getClass().getName());\n      }\n\n      int lastComparison = 0;\n      registerNodeMonitor_result typedOther = (registerNodeMonitor_result)other;\n\n      return 0;\n    }\n\n    public _Fields fieldForId(int fieldId) {\n      return _Fields.findByThriftId(fieldId);\n    }\n\n    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {\n      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);\n    }\n\n    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {\n      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);\n      }\n\n    @Override\n    public String toString() {\n      StringBuilder sb = new StringBuilder(\"registerNodeMonitor_result(\");\n      boolean first = true;\n\n      sb.append(\")\");\n      return sb.toString();\n    }\n\n    public void validate() throws org.apache.thrift.TException {\n      // check for required fields\n    }\n\n    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {\n      try {\n        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));\n      } catch (org.apache.thrift.TException te) {\n        throw new java.io.IOException(te.getMessage());\n      }\n    }\n\n    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {\n      try {\n        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));\n      } catch (org.apache.thrift.TException te) {\n        throw new java.io.IOException(te.getMessage());\n      }\n    }\n\n    private static class registerNodeMonitor_resultStandardSchemeFactory implements SchemeFactory {\n      public registerNodeMonitor_resultStandardScheme getScheme() {\n        return new registerNodeMonitor_resultStandardScheme();\n      }\n    }\n\n    private static class registerNodeMonitor_resultStandardScheme extends StandardScheme<registerNodeMonitor_result> {\n\n      public void read(org.apache.thrift.protocol.TProtocol iprot, registerNodeMonitor_result struct) throws org.apache.thrift.TException {\n        org.apache.thrift.protocol.TField schemeField;\n        iprot.readStructBegin();\n        while (true)\n        {\n          schemeField = iprot.readFieldBegin();\n          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { \n            break;\n          }\n          switch (schemeField.id) {\n            default:\n              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n          }\n          iprot.readFieldEnd();\n        }\n        iprot.readStructEnd();\n\n        // check for required fields of primitive type, which can't be checked in the validate method\n        struct.validate();\n      }\n\n      public void write(org.apache.thrift.protocol.TProtocol oprot, registerNodeMonitor_result struct) throws org.apache.thrift.TException {\n        struct.validate();\n\n        oprot.writeStructBegin(STRUCT_DESC);\n        oprot.writeFieldStop();\n        oprot.writeStructEnd();\n      }\n\n    }\n\n    private static class registerNodeMonitor_resultTupleSchemeFactory implements SchemeFactory {\n      public registerNodeMonitor_resultTupleScheme getScheme() {\n        return new registerNodeMonitor_resultTupleScheme();\n      }\n    }\n\n    private static class registerNodeMonitor_resultTupleScheme extends TupleScheme<registerNodeMonitor_result> {\n\n      @Override\n      public void write(org.apache.thrift.protocol.TProtocol prot, registerNodeMonitor_result struct) throws org.apache.thrift.TException {\n        TTupleProtocol oprot = (TTupleProtocol) prot;\n      }\n\n      @Override\n      public void read(org.apache.thrift.protocol.TProtocol prot, registerNodeMonitor_result struct) throws org.apache.thrift.TException {\n        TTupleProtocol iprot = (TTupleProtocol) prot;\n      }\n    }\n\n  }\n\n}\n"
  },
  {
    "path": "src/main/gen-java/edu/berkeley/sparrow/thrift/TCancelTaskReservationsRequest.java",
    "content": "/**\n * Autogenerated by Thrift Compiler (0.8.0)\n *\n * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING\n *  @generated\n */\npackage edu.berkeley.sparrow.thrift;\n\nimport org.apache.thrift.scheme.IScheme;\nimport org.apache.thrift.scheme.SchemeFactory;\nimport org.apache.thrift.scheme.StandardScheme;\n\nimport org.apache.thrift.scheme.TupleScheme;\nimport org.apache.thrift.protocol.TTupleProtocol;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.util.HashMap;\nimport java.util.EnumMap;\nimport java.util.Set;\nimport java.util.HashSet;\nimport java.util.EnumSet;\nimport java.util.Collections;\nimport java.util.BitSet;\nimport java.nio.ByteBuffer;\nimport java.util.Arrays;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\npublic class TCancelTaskReservationsRequest implements org.apache.thrift.TBase<TCancelTaskReservationsRequest, TCancelTaskReservationsRequest._Fields>, java.io.Serializable, Cloneable {\n  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct(\"TCancelTaskReservationsRequest\");\n\n  private static final org.apache.thrift.protocol.TField REQUEST_ID_FIELD_DESC = new org.apache.thrift.protocol.TField(\"requestId\", org.apache.thrift.protocol.TType.STRING, (short)1);\n\n  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();\n  static {\n    schemes.put(StandardScheme.class, new TCancelTaskReservationsRequestStandardSchemeFactory());\n    schemes.put(TupleScheme.class, new TCancelTaskReservationsRequestTupleSchemeFactory());\n  }\n\n  public String requestId; // required\n\n  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */\n  public enum _Fields implements org.apache.thrift.TFieldIdEnum {\n    REQUEST_ID((short)1, \"requestId\");\n\n    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();\n\n    static {\n      for (_Fields field : EnumSet.allOf(_Fields.class)) {\n        byName.put(field.getFieldName(), field);\n      }\n    }\n\n    /**\n     * Find the _Fields constant that matches fieldId, or null if its not found.\n     */\n    public static _Fields findByThriftId(int fieldId) {\n      switch(fieldId) {\n        case 1: // REQUEST_ID\n          return REQUEST_ID;\n        default:\n          return null;\n      }\n    }\n\n    /**\n     * Find the _Fields constant that matches fieldId, throwing an exception\n     * if it is not found.\n     */\n    public static _Fields findByThriftIdOrThrow(int fieldId) {\n      _Fields fields = findByThriftId(fieldId);\n      if (fields == null) throw new IllegalArgumentException(\"Field \" + fieldId + \" doesn't exist!\");\n      return fields;\n    }\n\n    /**\n     * Find the _Fields constant that matches name, or null if its not found.\n     */\n    public static _Fields findByName(String name) {\n      return byName.get(name);\n    }\n\n    private final short _thriftId;\n    private final String _fieldName;\n\n    _Fields(short thriftId, String fieldName) {\n      _thriftId = thriftId;\n      _fieldName = fieldName;\n    }\n\n    public short getThriftFieldId() {\n      return _thriftId;\n    }\n\n    public String getFieldName() {\n      return _fieldName;\n    }\n  }\n\n  // isset id assignments\n  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;\n  static {\n    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);\n    tmpMap.put(_Fields.REQUEST_ID, new org.apache.thrift.meta_data.FieldMetaData(\"requestId\", org.apache.thrift.TFieldRequirementType.DEFAULT, \n        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));\n    metaDataMap = Collections.unmodifiableMap(tmpMap);\n    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TCancelTaskReservationsRequest.class, metaDataMap);\n  }\n\n  public TCancelTaskReservationsRequest() {\n  }\n\n  public TCancelTaskReservationsRequest(\n    String requestId)\n  {\n    this();\n    this.requestId = requestId;\n  }\n\n  /**\n   * Performs a deep copy on <i>other</i>.\n   */\n  public TCancelTaskReservationsRequest(TCancelTaskReservationsRequest other) {\n    if (other.isSetRequestId()) {\n      this.requestId = other.requestId;\n    }\n  }\n\n  public TCancelTaskReservationsRequest deepCopy() {\n    return new TCancelTaskReservationsRequest(this);\n  }\n\n  public void clear() {\n    this.requestId = null;\n  }\n\n  public String getRequestId() {\n    return this.requestId;\n  }\n\n  public TCancelTaskReservationsRequest setRequestId(String requestId) {\n    this.requestId = requestId;\n    return this;\n  }\n\n  public void unsetRequestId() {\n    this.requestId = null;\n  }\n\n  /** Returns true if field requestId is set (has been assigned a value) and false otherwise */\n  public boolean isSetRequestId() {\n    return this.requestId != null;\n  }\n\n  public void setRequestIdIsSet(boolean value) {\n    if (!value) {\n      this.requestId = null;\n    }\n  }\n\n  public void setFieldValue(_Fields field, Object value) {\n    switch (field) {\n    case REQUEST_ID:\n      if (value == null) {\n        unsetRequestId();\n      } else {\n        setRequestId((String)value);\n      }\n      break;\n\n    }\n  }\n\n  public Object getFieldValue(_Fields field) {\n    switch (field) {\n    case REQUEST_ID:\n      return getRequestId();\n\n    }\n    throw new IllegalStateException();\n  }\n\n  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */\n  public boolean isSet(_Fields field) {\n    if (field == null) {\n      throw new IllegalArgumentException();\n    }\n\n    switch (field) {\n    case REQUEST_ID:\n      return isSetRequestId();\n    }\n    throw new IllegalStateException();\n  }\n\n  @Override\n  public boolean equals(Object that) {\n    if (that == null)\n      return false;\n    if (that instanceof TCancelTaskReservationsRequest)\n      return this.equals((TCancelTaskReservationsRequest)that);\n    return false;\n  }\n\n  public boolean equals(TCancelTaskReservationsRequest that) {\n    if (that == null)\n      return false;\n\n    boolean this_present_requestId = true && this.isSetRequestId();\n    boolean that_present_requestId = true && that.isSetRequestId();\n    if (this_present_requestId || that_present_requestId) {\n      if (!(this_present_requestId && that_present_requestId))\n        return false;\n      if (!this.requestId.equals(that.requestId))\n        return false;\n    }\n\n    return true;\n  }\n\n  @Override\n  public int hashCode() {\n    return 0;\n  }\n\n  public int compareTo(TCancelTaskReservationsRequest other) {\n    if (!getClass().equals(other.getClass())) {\n      return getClass().getName().compareTo(other.getClass().getName());\n    }\n\n    int lastComparison = 0;\n    TCancelTaskReservationsRequest typedOther = (TCancelTaskReservationsRequest)other;\n\n    lastComparison = Boolean.valueOf(isSetRequestId()).compareTo(typedOther.isSetRequestId());\n    if (lastComparison != 0) {\n      return lastComparison;\n    }\n    if (isSetRequestId()) {\n      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.requestId, typedOther.requestId);\n      if (lastComparison != 0) {\n        return lastComparison;\n      }\n    }\n    return 0;\n  }\n\n  public _Fields fieldForId(int fieldId) {\n    return _Fields.findByThriftId(fieldId);\n  }\n\n  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {\n    schemes.get(iprot.getScheme()).getScheme().read(iprot, this);\n  }\n\n  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {\n    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);\n  }\n\n  @Override\n  public String toString() {\n    StringBuilder sb = new StringBuilder(\"TCancelTaskReservationsRequest(\");\n    boolean first = true;\n\n    sb.append(\"requestId:\");\n    if (this.requestId == null) {\n      sb.append(\"null\");\n    } else {\n      sb.append(this.requestId);\n    }\n    first = false;\n    sb.append(\")\");\n    return sb.toString();\n  }\n\n  public void validate() throws org.apache.thrift.TException {\n    // check for required fields\n  }\n\n  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {\n    try {\n      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));\n    } catch (org.apache.thrift.TException te) {\n      throw new java.io.IOException(te.getMessage());\n    }\n  }\n\n  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {\n    try {\n      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));\n    } catch (org.apache.thrift.TException te) {\n      throw new java.io.IOException(te.getMessage());\n    }\n  }\n\n  private static class TCancelTaskReservationsRequestStandardSchemeFactory implements SchemeFactory {\n    public TCancelTaskReservationsRequestStandardScheme getScheme() {\n      return new TCancelTaskReservationsRequestStandardScheme();\n    }\n  }\n\n  private static class TCancelTaskReservationsRequestStandardScheme extends StandardScheme<TCancelTaskReservationsRequest> {\n\n    public void read(org.apache.thrift.protocol.TProtocol iprot, TCancelTaskReservationsRequest struct) throws org.apache.thrift.TException {\n      org.apache.thrift.protocol.TField schemeField;\n      iprot.readStructBegin();\n      while (true)\n      {\n        schemeField = iprot.readFieldBegin();\n        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { \n          break;\n        }\n        switch (schemeField.id) {\n          case 1: // REQUEST_ID\n            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {\n              struct.requestId = iprot.readString();\n              struct.setRequestIdIsSet(true);\n            } else { \n              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n            }\n            break;\n          default:\n            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n        }\n        iprot.readFieldEnd();\n      }\n      iprot.readStructEnd();\n\n      // check for required fields of primitive type, which can't be checked in the validate method\n      struct.validate();\n    }\n\n    public void write(org.apache.thrift.protocol.TProtocol oprot, TCancelTaskReservationsRequest struct) throws org.apache.thrift.TException {\n      struct.validate();\n\n      oprot.writeStructBegin(STRUCT_DESC);\n      if (struct.requestId != null) {\n        oprot.writeFieldBegin(REQUEST_ID_FIELD_DESC);\n        oprot.writeString(struct.requestId);\n        oprot.writeFieldEnd();\n      }\n      oprot.writeFieldStop();\n      oprot.writeStructEnd();\n    }\n\n  }\n\n  private static class TCancelTaskReservationsRequestTupleSchemeFactory implements SchemeFactory {\n    public TCancelTaskReservationsRequestTupleScheme getScheme() {\n      return new TCancelTaskReservationsRequestTupleScheme();\n    }\n  }\n\n  private static class TCancelTaskReservationsRequestTupleScheme extends TupleScheme<TCancelTaskReservationsRequest> {\n\n    @Override\n    public void write(org.apache.thrift.protocol.TProtocol prot, TCancelTaskReservationsRequest struct) throws org.apache.thrift.TException {\n      TTupleProtocol oprot = (TTupleProtocol) prot;\n      BitSet optionals = new BitSet();\n      if (struct.isSetRequestId()) {\n        optionals.set(0);\n      }\n      oprot.writeBitSet(optionals, 1);\n      if (struct.isSetRequestId()) {\n        oprot.writeString(struct.requestId);\n      }\n    }\n\n    @Override\n    public void read(org.apache.thrift.protocol.TProtocol prot, TCancelTaskReservationsRequest struct) throws org.apache.thrift.TException {\n      TTupleProtocol iprot = (TTupleProtocol) prot;\n      BitSet incoming = iprot.readBitSet(1);\n      if (incoming.get(0)) {\n        struct.requestId = iprot.readString();\n        struct.setRequestIdIsSet(true);\n      }\n    }\n  }\n\n}\n\n"
  },
  {
    "path": "src/main/gen-java/edu/berkeley/sparrow/thrift/TEnqueueTaskReservationsRequest.java",
    "content": "/**\n * Autogenerated by Thrift Compiler (0.8.0)\n *\n * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING\n *  @generated\n */\npackage edu.berkeley.sparrow.thrift;\n\nimport org.apache.thrift.scheme.IScheme;\nimport org.apache.thrift.scheme.SchemeFactory;\nimport org.apache.thrift.scheme.StandardScheme;\n\nimport org.apache.thrift.scheme.TupleScheme;\nimport org.apache.thrift.protocol.TTupleProtocol;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.util.HashMap;\nimport java.util.EnumMap;\nimport java.util.Set;\nimport java.util.HashSet;\nimport java.util.EnumSet;\nimport java.util.Collections;\nimport java.util.BitSet;\nimport java.nio.ByteBuffer;\nimport java.util.Arrays;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\npublic class TEnqueueTaskReservationsRequest implements org.apache.thrift.TBase<TEnqueueTaskReservationsRequest, TEnqueueTaskReservationsRequest._Fields>, java.io.Serializable, Cloneable {\n  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct(\"TEnqueueTaskReservationsRequest\");\n\n  private static final org.apache.thrift.protocol.TField APP_ID_FIELD_DESC = new org.apache.thrift.protocol.TField(\"appId\", org.apache.thrift.protocol.TType.STRING, (short)1);\n  private static final org.apache.thrift.protocol.TField USER_FIELD_DESC = new org.apache.thrift.protocol.TField(\"user\", org.apache.thrift.protocol.TType.STRUCT, (short)2);\n  private static final org.apache.thrift.protocol.TField REQUEST_ID_FIELD_DESC = new org.apache.thrift.protocol.TField(\"requestId\", org.apache.thrift.protocol.TType.STRING, (short)3);\n  private static final org.apache.thrift.protocol.TField SCHEDULER_ADDRESS_FIELD_DESC = new org.apache.thrift.protocol.TField(\"schedulerAddress\", org.apache.thrift.protocol.TType.STRUCT, (short)4);\n  private static final org.apache.thrift.protocol.TField NUM_TASKS_FIELD_DESC = new org.apache.thrift.protocol.TField(\"numTasks\", org.apache.thrift.protocol.TType.I32, (short)5);\n\n  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();\n  static {\n    schemes.put(StandardScheme.class, new TEnqueueTaskReservationsRequestStandardSchemeFactory());\n    schemes.put(TupleScheme.class, new TEnqueueTaskReservationsRequestTupleSchemeFactory());\n  }\n\n  public String appId; // required\n  public TUserGroupInfo user; // required\n  public String requestId; // required\n  public THostPort schedulerAddress; // required\n  public int numTasks; // required\n\n  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */\n  public enum _Fields implements org.apache.thrift.TFieldIdEnum {\n    APP_ID((short)1, \"appId\"),\n    USER((short)2, \"user\"),\n    REQUEST_ID((short)3, \"requestId\"),\n    SCHEDULER_ADDRESS((short)4, \"schedulerAddress\"),\n    NUM_TASKS((short)5, \"numTasks\");\n\n    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();\n\n    static {\n      for (_Fields field : EnumSet.allOf(_Fields.class)) {\n        byName.put(field.getFieldName(), field);\n      }\n    }\n\n    /**\n     * Find the _Fields constant that matches fieldId, or null if its not found.\n     */\n    public static _Fields findByThriftId(int fieldId) {\n      switch(fieldId) {\n        case 1: // APP_ID\n          return APP_ID;\n        case 2: // USER\n          return USER;\n        case 3: // REQUEST_ID\n          return REQUEST_ID;\n        case 4: // SCHEDULER_ADDRESS\n          return SCHEDULER_ADDRESS;\n        case 5: // NUM_TASKS\n          return NUM_TASKS;\n        default:\n          return null;\n      }\n    }\n\n    /**\n     * Find the _Fields constant that matches fieldId, throwing an exception\n     * if it is not found.\n     */\n    public static _Fields findByThriftIdOrThrow(int fieldId) {\n      _Fields fields = findByThriftId(fieldId);\n      if (fields == null) throw new IllegalArgumentException(\"Field \" + fieldId + \" doesn't exist!\");\n      return fields;\n    }\n\n    /**\n     * Find the _Fields constant that matches name, or null if its not found.\n     */\n    public static _Fields findByName(String name) {\n      return byName.get(name);\n    }\n\n    private final short _thriftId;\n    private final String _fieldName;\n\n    _Fields(short thriftId, String fieldName) {\n      _thriftId = thriftId;\n      _fieldName = fieldName;\n    }\n\n    public short getThriftFieldId() {\n      return _thriftId;\n    }\n\n    public String getFieldName() {\n      return _fieldName;\n    }\n  }\n\n  // isset id assignments\n  private static final int __NUMTASKS_ISSET_ID = 0;\n  private BitSet __isset_bit_vector = new BitSet(1);\n  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;\n  static {\n    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);\n    tmpMap.put(_Fields.APP_ID, new org.apache.thrift.meta_data.FieldMetaData(\"appId\", org.apache.thrift.TFieldRequirementType.DEFAULT, \n        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));\n    tmpMap.put(_Fields.USER, new org.apache.thrift.meta_data.FieldMetaData(\"user\", org.apache.thrift.TFieldRequirementType.DEFAULT, \n        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TUserGroupInfo.class)));\n    tmpMap.put(_Fields.REQUEST_ID, new org.apache.thrift.meta_data.FieldMetaData(\"requestId\", org.apache.thrift.TFieldRequirementType.DEFAULT, \n        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));\n    tmpMap.put(_Fields.SCHEDULER_ADDRESS, new org.apache.thrift.meta_data.FieldMetaData(\"schedulerAddress\", org.apache.thrift.TFieldRequirementType.DEFAULT, \n        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, THostPort.class)));\n    tmpMap.put(_Fields.NUM_TASKS, new org.apache.thrift.meta_data.FieldMetaData(\"numTasks\", org.apache.thrift.TFieldRequirementType.DEFAULT, \n        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));\n    metaDataMap = Collections.unmodifiableMap(tmpMap);\n    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TEnqueueTaskReservationsRequest.class, metaDataMap);\n  }\n\n  public TEnqueueTaskReservationsRequest() {\n  }\n\n  public TEnqueueTaskReservationsRequest(\n    String appId,\n    TUserGroupInfo user,\n    String requestId,\n    THostPort schedulerAddress,\n    int numTasks)\n  {\n    this();\n    this.appId = appId;\n    this.user = user;\n    this.requestId = requestId;\n    this.schedulerAddress = schedulerAddress;\n    this.numTasks = numTasks;\n    setNumTasksIsSet(true);\n  }\n\n  /**\n   * Performs a deep copy on <i>other</i>.\n   */\n  public TEnqueueTaskReservationsRequest(TEnqueueTaskReservationsRequest other) {\n    __isset_bit_vector.clear();\n    __isset_bit_vector.or(other.__isset_bit_vector);\n    if (other.isSetAppId()) {\n      this.appId = other.appId;\n    }\n    if (other.isSetUser()) {\n      this.user = new TUserGroupInfo(other.user);\n    }\n    if (other.isSetRequestId()) {\n      this.requestId = other.requestId;\n    }\n    if (other.isSetSchedulerAddress()) {\n      this.schedulerAddress = new THostPort(other.schedulerAddress);\n    }\n    this.numTasks = other.numTasks;\n  }\n\n  public TEnqueueTaskReservationsRequest deepCopy() {\n    return new TEnqueueTaskReservationsRequest(this);\n  }\n\n  public void clear() {\n    this.appId = null;\n    this.user = null;\n    this.requestId = null;\n    this.schedulerAddress = null;\n    setNumTasksIsSet(false);\n    this.numTasks = 0;\n  }\n\n  public String getAppId() {\n    return this.appId;\n  }\n\n  public TEnqueueTaskReservationsRequest setAppId(String appId) {\n    this.appId = appId;\n    return this;\n  }\n\n  public void unsetAppId() {\n    this.appId = null;\n  }\n\n  /** Returns true if field appId is set (has been assigned a value) and false otherwise */\n  public boolean isSetAppId() {\n    return this.appId != null;\n  }\n\n  public void setAppIdIsSet(boolean value) {\n    if (!value) {\n      this.appId = null;\n    }\n  }\n\n  public TUserGroupInfo getUser() {\n    return this.user;\n  }\n\n  public TEnqueueTaskReservationsRequest setUser(TUserGroupInfo user) {\n    this.user = user;\n    return this;\n  }\n\n  public void unsetUser() {\n    this.user = null;\n  }\n\n  /** Returns true if field user is set (has been assigned a value) and false otherwise */\n  public boolean isSetUser() {\n    return this.user != null;\n  }\n\n  public void setUserIsSet(boolean value) {\n    if (!value) {\n      this.user = null;\n    }\n  }\n\n  public String getRequestId() {\n    return this.requestId;\n  }\n\n  public TEnqueueTaskReservationsRequest setRequestId(String requestId) {\n    this.requestId = requestId;\n    return this;\n  }\n\n  public void unsetRequestId() {\n    this.requestId = null;\n  }\n\n  /** Returns true if field requestId is set (has been assigned a value) and false otherwise */\n  public boolean isSetRequestId() {\n    return this.requestId != null;\n  }\n\n  public void setRequestIdIsSet(boolean value) {\n    if (!value) {\n      this.requestId = null;\n    }\n  }\n\n  public THostPort getSchedulerAddress() {\n    return this.schedulerAddress;\n  }\n\n  public TEnqueueTaskReservationsRequest setSchedulerAddress(THostPort schedulerAddress) {\n    this.schedulerAddress = schedulerAddress;\n    return this;\n  }\n\n  public void unsetSchedulerAddress() {\n    this.schedulerAddress = null;\n  }\n\n  /** Returns true if field schedulerAddress is set (has been assigned a value) and false otherwise */\n  public boolean isSetSchedulerAddress() {\n    return this.schedulerAddress != null;\n  }\n\n  public void setSchedulerAddressIsSet(boolean value) {\n    if (!value) {\n      this.schedulerAddress = null;\n    }\n  }\n\n  public int getNumTasks() {\n    return this.numTasks;\n  }\n\n  public TEnqueueTaskReservationsRequest setNumTasks(int numTasks) {\n    this.numTasks = numTasks;\n    setNumTasksIsSet(true);\n    return this;\n  }\n\n  public void unsetNumTasks() {\n    __isset_bit_vector.clear(__NUMTASKS_ISSET_ID);\n  }\n\n  /** Returns true if field numTasks is set (has been assigned a value) and false otherwise */\n  public boolean isSetNumTasks() {\n    return __isset_bit_vector.get(__NUMTASKS_ISSET_ID);\n  }\n\n  public void setNumTasksIsSet(boolean value) {\n    __isset_bit_vector.set(__NUMTASKS_ISSET_ID, value);\n  }\n\n  public void setFieldValue(_Fields field, Object value) {\n    switch (field) {\n    case APP_ID:\n      if (value == null) {\n        unsetAppId();\n      } else {\n        setAppId((String)value);\n      }\n      break;\n\n    case USER:\n      if (value == null) {\n        unsetUser();\n      } else {\n        setUser((TUserGroupInfo)value);\n      }\n      break;\n\n    case REQUEST_ID:\n      if (value == null) {\n        unsetRequestId();\n      } else {\n        setRequestId((String)value);\n      }\n      break;\n\n    case SCHEDULER_ADDRESS:\n      if (value == null) {\n        unsetSchedulerAddress();\n      } else {\n        setSchedulerAddress((THostPort)value);\n      }\n      break;\n\n    case NUM_TASKS:\n      if (value == null) {\n        unsetNumTasks();\n      } else {\n        setNumTasks((Integer)value);\n      }\n      break;\n\n    }\n  }\n\n  public Object getFieldValue(_Fields field) {\n    switch (field) {\n    case APP_ID:\n      return getAppId();\n\n    case USER:\n      return getUser();\n\n    case REQUEST_ID:\n      return getRequestId();\n\n    case SCHEDULER_ADDRESS:\n      return getSchedulerAddress();\n\n    case NUM_TASKS:\n      return Integer.valueOf(getNumTasks());\n\n    }\n    throw new IllegalStateException();\n  }\n\n  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */\n  public boolean isSet(_Fields field) {\n    if (field == null) {\n      throw new IllegalArgumentException();\n    }\n\n    switch (field) {\n    case APP_ID:\n      return isSetAppId();\n    case USER:\n      return isSetUser();\n    case REQUEST_ID:\n      return isSetRequestId();\n    case SCHEDULER_ADDRESS:\n      return isSetSchedulerAddress();\n    case NUM_TASKS:\n      return isSetNumTasks();\n    }\n    throw new IllegalStateException();\n  }\n\n  @Override\n  public boolean equals(Object that) {\n    if (that == null)\n      return false;\n    if (that instanceof TEnqueueTaskReservationsRequest)\n      return this.equals((TEnqueueTaskReservationsRequest)that);\n    return false;\n  }\n\n  public boolean equals(TEnqueueTaskReservationsRequest that) {\n    if (that == null)\n      return false;\n\n    boolean this_present_appId = true && this.isSetAppId();\n    boolean that_present_appId = true && that.isSetAppId();\n    if (this_present_appId || that_present_appId) {\n      if (!(this_present_appId && that_present_appId))\n        return false;\n      if (!this.appId.equals(that.appId))\n        return false;\n    }\n\n    boolean this_present_user = true && this.isSetUser();\n    boolean that_present_user = true && that.isSetUser();\n    if (this_present_user || that_present_user) {\n      if (!(this_present_user && that_present_user))\n        return false;\n      if (!this.user.equals(that.user))\n        return false;\n    }\n\n    boolean this_present_requestId = true && this.isSetRequestId();\n    boolean that_present_requestId = true && that.isSetRequestId();\n    if (this_present_requestId || that_present_requestId) {\n      if (!(this_present_requestId && that_present_requestId))\n        return false;\n      if (!this.requestId.equals(that.requestId))\n        return false;\n    }\n\n    boolean this_present_schedulerAddress = true && this.isSetSchedulerAddress();\n    boolean that_present_schedulerAddress = true && that.isSetSchedulerAddress();\n    if (this_present_schedulerAddress || that_present_schedulerAddress) {\n      if (!(this_present_schedulerAddress && that_present_schedulerAddress))\n        return false;\n      if (!this.schedulerAddress.equals(that.schedulerAddress))\n        return false;\n    }\n\n    boolean this_present_numTasks = true;\n    boolean that_present_numTasks = true;\n    if (this_present_numTasks || that_present_numTasks) {\n      if (!(this_present_numTasks && that_present_numTasks))\n        return false;\n      if (this.numTasks != that.numTasks)\n        return false;\n    }\n\n    return true;\n  }\n\n  @Override\n  public int hashCode() {\n    return 0;\n  }\n\n  public int compareTo(TEnqueueTaskReservationsRequest other) {\n    if (!getClass().equals(other.getClass())) {\n      return getClass().getName().compareTo(other.getClass().getName());\n    }\n\n    int lastComparison = 0;\n    TEnqueueTaskReservationsRequest typedOther = (TEnqueueTaskReservationsRequest)other;\n\n    lastComparison = Boolean.valueOf(isSetAppId()).compareTo(typedOther.isSetAppId());\n    if (lastComparison != 0) {\n      return lastComparison;\n    }\n    if (isSetAppId()) {\n      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.appId, typedOther.appId);\n      if (lastComparison != 0) {\n        return lastComparison;\n      }\n    }\n    lastComparison = Boolean.valueOf(isSetUser()).compareTo(typedOther.isSetUser());\n    if (lastComparison != 0) {\n      return lastComparison;\n    }\n    if (isSetUser()) {\n      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.user, typedOther.user);\n      if (lastComparison != 0) {\n        return lastComparison;\n      }\n    }\n    lastComparison = Boolean.valueOf(isSetRequestId()).compareTo(typedOther.isSetRequestId());\n    if (lastComparison != 0) {\n      return lastComparison;\n    }\n    if (isSetRequestId()) {\n      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.requestId, typedOther.requestId);\n      if (lastComparison != 0) {\n        return lastComparison;\n      }\n    }\n    lastComparison = Boolean.valueOf(isSetSchedulerAddress()).compareTo(typedOther.isSetSchedulerAddress());\n    if (lastComparison != 0) {\n      return lastComparison;\n    }\n    if (isSetSchedulerAddress()) {\n      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.schedulerAddress, typedOther.schedulerAddress);\n      if (lastComparison != 0) {\n        return lastComparison;\n      }\n    }\n    lastComparison = Boolean.valueOf(isSetNumTasks()).compareTo(typedOther.isSetNumTasks());\n    if (lastComparison != 0) {\n      return lastComparison;\n    }\n    if (isSetNumTasks()) {\n      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.numTasks, typedOther.numTasks);\n      if (lastComparison != 0) {\n        return lastComparison;\n      }\n    }\n    return 0;\n  }\n\n  public _Fields fieldForId(int fieldId) {\n    return _Fields.findByThriftId(fieldId);\n  }\n\n  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {\n    schemes.get(iprot.getScheme()).getScheme().read(iprot, this);\n  }\n\n  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {\n    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);\n  }\n\n  @Override\n  public String toString() {\n    StringBuilder sb = new StringBuilder(\"TEnqueueTaskReservationsRequest(\");\n    boolean first = true;\n\n    sb.append(\"appId:\");\n    if (this.appId == null) {\n      sb.append(\"null\");\n    } else {\n      sb.append(this.appId);\n    }\n    first = false;\n    if (!first) sb.append(\", \");\n    sb.append(\"user:\");\n    if (this.user == null) {\n      sb.append(\"null\");\n    } else {\n      sb.append(this.user);\n    }\n    first = false;\n    if (!first) sb.append(\", \");\n    sb.append(\"requestId:\");\n    if (this.requestId == null) {\n      sb.append(\"null\");\n    } else {\n      sb.append(this.requestId);\n    }\n    first = false;\n    if (!first) sb.append(\", \");\n    sb.append(\"schedulerAddress:\");\n    if (this.schedulerAddress == null) {\n      sb.append(\"null\");\n    } else {\n      sb.append(this.schedulerAddress);\n    }\n    first = false;\n    if (!first) sb.append(\", \");\n    sb.append(\"numTasks:\");\n    sb.append(this.numTasks);\n    first = false;\n    sb.append(\")\");\n    return sb.toString();\n  }\n\n  public void validate() throws org.apache.thrift.TException {\n    // check for required fields\n  }\n\n  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {\n    try {\n      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));\n    } catch (org.apache.thrift.TException te) {\n      throw new java.io.IOException(te.getMessage());\n    }\n  }\n\n  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {\n    try {\n      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.\n      __isset_bit_vector = new BitSet(1);\n      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));\n    } catch (org.apache.thrift.TException te) {\n      throw new java.io.IOException(te.getMessage());\n    }\n  }\n\n  private static class TEnqueueTaskReservationsRequestStandardSchemeFactory implements SchemeFactory {\n    public TEnqueueTaskReservationsRequestStandardScheme getScheme() {\n      return new TEnqueueTaskReservationsRequestStandardScheme();\n    }\n  }\n\n  private static class TEnqueueTaskReservationsRequestStandardScheme extends StandardScheme<TEnqueueTaskReservationsRequest> {\n\n    public void read(org.apache.thrift.protocol.TProtocol iprot, TEnqueueTaskReservationsRequest struct) throws org.apache.thrift.TException {\n      org.apache.thrift.protocol.TField schemeField;\n      iprot.readStructBegin();\n      while (true)\n      {\n        schemeField = iprot.readFieldBegin();\n        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { \n          break;\n        }\n        switch (schemeField.id) {\n          case 1: // APP_ID\n            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {\n              struct.appId = iprot.readString();\n              struct.setAppIdIsSet(true);\n            } else { \n              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n            }\n            break;\n          case 2: // USER\n            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {\n              struct.user = new TUserGroupInfo();\n              struct.user.read(iprot);\n              struct.setUserIsSet(true);\n            } else { \n              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n            }\n            break;\n          case 3: // REQUEST_ID\n            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {\n              struct.requestId = iprot.readString();\n              struct.setRequestIdIsSet(true);\n            } else { \n              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n            }\n            break;\n          case 4: // SCHEDULER_ADDRESS\n            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {\n              struct.schedulerAddress = new THostPort();\n              struct.schedulerAddress.read(iprot);\n              struct.setSchedulerAddressIsSet(true);\n            } else { \n              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n            }\n            break;\n          case 5: // NUM_TASKS\n            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {\n              struct.numTasks = iprot.readI32();\n              struct.setNumTasksIsSet(true);\n            } else { \n              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n            }\n            break;\n          default:\n            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n        }\n        iprot.readFieldEnd();\n      }\n      iprot.readStructEnd();\n\n      // check for required fields of primitive type, which can't be checked in the validate method\n      struct.validate();\n    }\n\n    public void write(org.apache.thrift.protocol.TProtocol oprot, TEnqueueTaskReservationsRequest struct) throws org.apache.thrift.TException {\n      struct.validate();\n\n      oprot.writeStructBegin(STRUCT_DESC);\n      if (struct.appId != null) {\n        oprot.writeFieldBegin(APP_ID_FIELD_DESC);\n        oprot.writeString(struct.appId);\n        oprot.writeFieldEnd();\n      }\n      if (struct.user != null) {\n        oprot.writeFieldBegin(USER_FIELD_DESC);\n        struct.user.write(oprot);\n        oprot.writeFieldEnd();\n      }\n      if (struct.requestId != null) {\n        oprot.writeFieldBegin(REQUEST_ID_FIELD_DESC);\n        oprot.writeString(struct.requestId);\n        oprot.writeFieldEnd();\n      }\n      if (struct.schedulerAddress != null) {\n        oprot.writeFieldBegin(SCHEDULER_ADDRESS_FIELD_DESC);\n        struct.schedulerAddress.write(oprot);\n        oprot.writeFieldEnd();\n      }\n      oprot.writeFieldBegin(NUM_TASKS_FIELD_DESC);\n      oprot.writeI32(struct.numTasks);\n      oprot.writeFieldEnd();\n      oprot.writeFieldStop();\n      oprot.writeStructEnd();\n    }\n\n  }\n\n  private static class TEnqueueTaskReservationsRequestTupleSchemeFactory implements SchemeFactory {\n    public TEnqueueTaskReservationsRequestTupleScheme getScheme() {\n      return new TEnqueueTaskReservationsRequestTupleScheme();\n    }\n  }\n\n  private static class TEnqueueTaskReservationsRequestTupleScheme extends TupleScheme<TEnqueueTaskReservationsRequest> {\n\n    @Override\n    public void write(org.apache.thrift.protocol.TProtocol prot, TEnqueueTaskReservationsRequest struct) throws org.apache.thrift.TException {\n      TTupleProtocol oprot = (TTupleProtocol) prot;\n      BitSet optionals = new BitSet();\n      if (struct.isSetAppId()) {\n        optionals.set(0);\n      }\n      if (struct.isSetUser()) {\n        optionals.set(1);\n      }\n      if (struct.isSetRequestId()) {\n        optionals.set(2);\n      }\n      if (struct.isSetSchedulerAddress()) {\n        optionals.set(3);\n      }\n      if (struct.isSetNumTasks()) {\n        optionals.set(4);\n      }\n      oprot.writeBitSet(optionals, 5);\n      if (struct.isSetAppId()) {\n        oprot.writeString(struct.appId);\n      }\n      if (struct.isSetUser()) {\n        struct.user.write(oprot);\n      }\n      if (struct.isSetRequestId()) {\n        oprot.writeString(struct.requestId);\n      }\n      if (struct.isSetSchedulerAddress()) {\n        struct.schedulerAddress.write(oprot);\n      }\n      if (struct.isSetNumTasks()) {\n        oprot.writeI32(struct.numTasks);\n      }\n    }\n\n    @Override\n    public void read(org.apache.thrift.protocol.TProtocol prot, TEnqueueTaskReservationsRequest struct) throws org.apache.thrift.TException {\n      TTupleProtocol iprot = (TTupleProtocol) prot;\n      BitSet incoming = iprot.readBitSet(5);\n      if (incoming.get(0)) {\n        struct.appId = iprot.readString();\n        struct.setAppIdIsSet(true);\n      }\n      if (incoming.get(1)) {\n        struct.user = new TUserGroupInfo();\n        struct.user.read(iprot);\n        struct.setUserIsSet(true);\n      }\n      if (incoming.get(2)) {\n        struct.requestId = iprot.readString();\n        struct.setRequestIdIsSet(true);\n      }\n      if (incoming.get(3)) {\n        struct.schedulerAddress = new THostPort();\n        struct.schedulerAddress.read(iprot);\n        struct.setSchedulerAddressIsSet(true);\n      }\n      if (incoming.get(4)) {\n        struct.numTasks = iprot.readI32();\n        struct.setNumTasksIsSet(true);\n      }\n    }\n  }\n\n}\n\n"
  },
  {
    "path": "src/main/gen-java/edu/berkeley/sparrow/thrift/TFullTaskId.java",
    "content": "/**\n * Autogenerated by Thrift Compiler (0.8.0)\n *\n * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING\n *  @generated\n */\npackage edu.berkeley.sparrow.thrift;\n\nimport org.apache.thrift.scheme.IScheme;\nimport org.apache.thrift.scheme.SchemeFactory;\nimport org.apache.thrift.scheme.StandardScheme;\n\nimport org.apache.thrift.scheme.TupleScheme;\nimport org.apache.thrift.protocol.TTupleProtocol;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.util.HashMap;\nimport java.util.EnumMap;\nimport java.util.Set;\nimport java.util.HashSet;\nimport java.util.EnumSet;\nimport java.util.Collections;\nimport java.util.BitSet;\nimport java.nio.ByteBuffer;\nimport java.util.Arrays;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\npublic class TFullTaskId implements org.apache.thrift.TBase<TFullTaskId, TFullTaskId._Fields>, java.io.Serializable, Cloneable {\n  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct(\"TFullTaskId\");\n\n  private static final org.apache.thrift.protocol.TField TASK_ID_FIELD_DESC = new org.apache.thrift.protocol.TField(\"taskId\", org.apache.thrift.protocol.TType.STRING, (short)1);\n  private static final org.apache.thrift.protocol.TField REQUEST_ID_FIELD_DESC = new org.apache.thrift.protocol.TField(\"requestId\", org.apache.thrift.protocol.TType.STRING, (short)2);\n  private static final org.apache.thrift.protocol.TField APP_ID_FIELD_DESC = new org.apache.thrift.protocol.TField(\"appId\", org.apache.thrift.protocol.TType.STRING, (short)3);\n  private static final org.apache.thrift.protocol.TField SCHEDULER_ADDRESS_FIELD_DESC = new org.apache.thrift.protocol.TField(\"schedulerAddress\", org.apache.thrift.protocol.TType.STRUCT, (short)4);\n\n  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();\n  static {\n    schemes.put(StandardScheme.class, new TFullTaskIdStandardSchemeFactory());\n    schemes.put(TupleScheme.class, new TFullTaskIdTupleSchemeFactory());\n  }\n\n  public String taskId; // required\n  public String requestId; // required\n  public String appId; // required\n  public THostPort schedulerAddress; // required\n\n  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */\n  public enum _Fields implements org.apache.thrift.TFieldIdEnum {\n    TASK_ID((short)1, \"taskId\"),\n    REQUEST_ID((short)2, \"requestId\"),\n    APP_ID((short)3, \"appId\"),\n    SCHEDULER_ADDRESS((short)4, \"schedulerAddress\");\n\n    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();\n\n    static {\n      for (_Fields field : EnumSet.allOf(_Fields.class)) {\n        byName.put(field.getFieldName(), field);\n      }\n    }\n\n    /**\n     * Find the _Fields constant that matches fieldId, or null if its not found.\n     */\n    public static _Fields findByThriftId(int fieldId) {\n      switch(fieldId) {\n        case 1: // TASK_ID\n          return TASK_ID;\n        case 2: // REQUEST_ID\n          return REQUEST_ID;\n        case 3: // APP_ID\n          return APP_ID;\n        case 4: // SCHEDULER_ADDRESS\n          return SCHEDULER_ADDRESS;\n        default:\n          return null;\n      }\n    }\n\n    /**\n     * Find the _Fields constant that matches fieldId, throwing an exception\n     * if it is not found.\n     */\n    public static _Fields findByThriftIdOrThrow(int fieldId) {\n      _Fields fields = findByThriftId(fieldId);\n      if (fields == null) throw new IllegalArgumentException(\"Field \" + fieldId + \" doesn't exist!\");\n      return fields;\n    }\n\n    /**\n     * Find the _Fields constant that matches name, or null if its not found.\n     */\n    public static _Fields findByName(String name) {\n      return byName.get(name);\n    }\n\n    private final short _thriftId;\n    private final String _fieldName;\n\n    _Fields(short thriftId, String fieldName) {\n      _thriftId = thriftId;\n      _fieldName = fieldName;\n    }\n\n    public short getThriftFieldId() {\n      return _thriftId;\n    }\n\n    public String getFieldName() {\n      return _fieldName;\n    }\n  }\n\n  // isset id assignments\n  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;\n  static {\n    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);\n    tmpMap.put(_Fields.TASK_ID, new org.apache.thrift.meta_data.FieldMetaData(\"taskId\", org.apache.thrift.TFieldRequirementType.DEFAULT, \n        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));\n    tmpMap.put(_Fields.REQUEST_ID, new org.apache.thrift.meta_data.FieldMetaData(\"requestId\", org.apache.thrift.TFieldRequirementType.DEFAULT, \n        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));\n    tmpMap.put(_Fields.APP_ID, new org.apache.thrift.meta_data.FieldMetaData(\"appId\", org.apache.thrift.TFieldRequirementType.DEFAULT, \n        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));\n    tmpMap.put(_Fields.SCHEDULER_ADDRESS, new org.apache.thrift.meta_data.FieldMetaData(\"schedulerAddress\", org.apache.thrift.TFieldRequirementType.DEFAULT, \n        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, THostPort.class)));\n    metaDataMap = Collections.unmodifiableMap(tmpMap);\n    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TFullTaskId.class, metaDataMap);\n  }\n\n  public TFullTaskId() {\n  }\n\n  public TFullTaskId(\n    String taskId,\n    String requestId,\n    String appId,\n    THostPort schedulerAddress)\n  {\n    this();\n    this.taskId = taskId;\n    this.requestId = requestId;\n    this.appId = appId;\n    this.schedulerAddress = schedulerAddress;\n  }\n\n  /**\n   * Performs a deep copy on <i>other</i>.\n   */\n  public TFullTaskId(TFullTaskId other) {\n    if (other.isSetTaskId()) {\n      this.taskId = other.taskId;\n    }\n    if (other.isSetRequestId()) {\n      this.requestId = other.requestId;\n    }\n    if (other.isSetAppId()) {\n      this.appId = other.appId;\n    }\n    if (other.isSetSchedulerAddress()) {\n      this.schedulerAddress = new THostPort(other.schedulerAddress);\n    }\n  }\n\n  public TFullTaskId deepCopy() {\n    return new TFullTaskId(this);\n  }\n\n  public void clear() {\n    this.taskId = null;\n    this.requestId = null;\n    this.appId = null;\n    this.schedulerAddress = null;\n  }\n\n  public String getTaskId() {\n    return this.taskId;\n  }\n\n  public TFullTaskId setTaskId(String taskId) {\n    this.taskId = taskId;\n    return this;\n  }\n\n  public void unsetTaskId() {\n    this.taskId = null;\n  }\n\n  /** Returns true if field taskId is set (has been assigned a value) and false otherwise */\n  public boolean isSetTaskId() {\n    return this.taskId != null;\n  }\n\n  public void setTaskIdIsSet(boolean value) {\n    if (!value) {\n      this.taskId = null;\n    }\n  }\n\n  public String getRequestId() {\n    return this.requestId;\n  }\n\n  public TFullTaskId setRequestId(String requestId) {\n    this.requestId = requestId;\n    return this;\n  }\n\n  public void unsetRequestId() {\n    this.requestId = null;\n  }\n\n  /** Returns true if field requestId is set (has been assigned a value) and false otherwise */\n  public boolean isSetRequestId() {\n    return this.requestId != null;\n  }\n\n  public void setRequestIdIsSet(boolean value) {\n    if (!value) {\n      this.requestId = null;\n    }\n  }\n\n  public String getAppId() {\n    return this.appId;\n  }\n\n  public TFullTaskId setAppId(String appId) {\n    this.appId = appId;\n    return this;\n  }\n\n  public void unsetAppId() {\n    this.appId = null;\n  }\n\n  /** Returns true if field appId is set (has been assigned a value) and false otherwise */\n  public boolean isSetAppId() {\n    return this.appId != null;\n  }\n\n  public void setAppIdIsSet(boolean value) {\n    if (!value) {\n      this.appId = null;\n    }\n  }\n\n  public THostPort getSchedulerAddress() {\n    return this.schedulerAddress;\n  }\n\n  public TFullTaskId setSchedulerAddress(THostPort schedulerAddress) {\n    this.schedulerAddress = schedulerAddress;\n    return this;\n  }\n\n  public void unsetSchedulerAddress() {\n    this.schedulerAddress = null;\n  }\n\n  /** Returns true if field schedulerAddress is set (has been assigned a value) and false otherwise */\n  public boolean isSetSchedulerAddress() {\n    return this.schedulerAddress != null;\n  }\n\n  public void setSchedulerAddressIsSet(boolean value) {\n    if (!value) {\n      this.schedulerAddress = null;\n    }\n  }\n\n  public void setFieldValue(_Fields field, Object value) {\n    switch (field) {\n    case TASK_ID:\n      if (value == null) {\n        unsetTaskId();\n      } else {\n        setTaskId((String)value);\n      }\n      break;\n\n    case REQUEST_ID:\n      if (value == null) {\n        unsetRequestId();\n      } else {\n        setRequestId((String)value);\n      }\n      break;\n\n    case APP_ID:\n      if (value == null) {\n        unsetAppId();\n      } else {\n        setAppId((String)value);\n      }\n      break;\n\n    case SCHEDULER_ADDRESS:\n      if (value == null) {\n        unsetSchedulerAddress();\n      } else {\n        setSchedulerAddress((THostPort)value);\n      }\n      break;\n\n    }\n  }\n\n  public Object getFieldValue(_Fields field) {\n    switch (field) {\n    case TASK_ID:\n      return getTaskId();\n\n    case REQUEST_ID:\n      return getRequestId();\n\n    case APP_ID:\n      return getAppId();\n\n    case SCHEDULER_ADDRESS:\n      return getSchedulerAddress();\n\n    }\n    throw new IllegalStateException();\n  }\n\n  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */\n  public boolean isSet(_Fields field) {\n    if (field == null) {\n      throw new IllegalArgumentException();\n    }\n\n    switch (field) {\n    case TASK_ID:\n      return isSetTaskId();\n    case REQUEST_ID:\n      return isSetRequestId();\n    case APP_ID:\n      return isSetAppId();\n    case SCHEDULER_ADDRESS:\n      return isSetSchedulerAddress();\n    }\n    throw new IllegalStateException();\n  }\n\n  @Override\n  public boolean equals(Object that) {\n    if (that == null)\n      return false;\n    if (that instanceof TFullTaskId)\n      return this.equals((TFullTaskId)that);\n    return false;\n  }\n\n  public boolean equals(TFullTaskId that) {\n    if (that == null)\n      return false;\n\n    boolean this_present_taskId = true && this.isSetTaskId();\n    boolean that_present_taskId = true && that.isSetTaskId();\n    if (this_present_taskId || that_present_taskId) {\n      if (!(this_present_taskId && that_present_taskId))\n        return false;\n      if (!this.taskId.equals(that.taskId))\n        return false;\n    }\n\n    boolean this_present_requestId = true && this.isSetRequestId();\n    boolean that_present_requestId = true && that.isSetRequestId();\n    if (this_present_requestId || that_present_requestId) {\n      if (!(this_present_requestId && that_present_requestId))\n        return false;\n      if (!this.requestId.equals(that.requestId))\n        return false;\n    }\n\n    boolean this_present_appId = true && this.isSetAppId();\n    boolean that_present_appId = true && that.isSetAppId();\n    if (this_present_appId || that_present_appId) {\n      if (!(this_present_appId && that_present_appId))\n        return false;\n      if (!this.appId.equals(that.appId))\n        return false;\n    }\n\n    boolean this_present_schedulerAddress = true && this.isSetSchedulerAddress();\n    boolean that_present_schedulerAddress = true && that.isSetSchedulerAddress();\n    if (this_present_schedulerAddress || that_present_schedulerAddress) {\n      if (!(this_present_schedulerAddress && that_present_schedulerAddress))\n        return false;\n      if (!this.schedulerAddress.equals(that.schedulerAddress))\n        return false;\n    }\n\n    return true;\n  }\n\n  @Override\n  public int hashCode() {\n    return 0;\n  }\n\n  public int compareTo(TFullTaskId other) {\n    if (!getClass().equals(other.getClass())) {\n      return getClass().getName().compareTo(other.getClass().getName());\n    }\n\n    int lastComparison = 0;\n    TFullTaskId typedOther = (TFullTaskId)other;\n\n    lastComparison = Boolean.valueOf(isSetTaskId()).compareTo(typedOther.isSetTaskId());\n    if (lastComparison != 0) {\n      return lastComparison;\n    }\n    if (isSetTaskId()) {\n      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.taskId, typedOther.taskId);\n      if (lastComparison != 0) {\n        return lastComparison;\n      }\n    }\n    lastComparison = Boolean.valueOf(isSetRequestId()).compareTo(typedOther.isSetRequestId());\n    if (lastComparison != 0) {\n      return lastComparison;\n    }\n    if (isSetRequestId()) {\n      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.requestId, typedOther.requestId);\n      if (lastComparison != 0) {\n        return lastComparison;\n      }\n    }\n    lastComparison = Boolean.valueOf(isSetAppId()).compareTo(typedOther.isSetAppId());\n    if (lastComparison != 0) {\n      return lastComparison;\n    }\n    if (isSetAppId()) {\n      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.appId, typedOther.appId);\n      if (lastComparison != 0) {\n        return lastComparison;\n      }\n    }\n    lastComparison = Boolean.valueOf(isSetSchedulerAddress()).compareTo(typedOther.isSetSchedulerAddress());\n    if (lastComparison != 0) {\n      return lastComparison;\n    }\n    if (isSetSchedulerAddress()) {\n      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.schedulerAddress, typedOther.schedulerAddress);\n      if (lastComparison != 0) {\n        return lastComparison;\n      }\n    }\n    return 0;\n  }\n\n  public _Fields fieldForId(int fieldId) {\n    return _Fields.findByThriftId(fieldId);\n  }\n\n  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {\n    schemes.get(iprot.getScheme()).getScheme().read(iprot, this);\n  }\n\n  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {\n    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);\n  }\n\n  @Override\n  public String toString() {\n    StringBuilder sb = new StringBuilder(\"TFullTaskId(\");\n    boolean first = true;\n\n    sb.append(\"taskId:\");\n    if (this.taskId == null) {\n      sb.append(\"null\");\n    } else {\n      sb.append(this.taskId);\n    }\n    first = false;\n    if (!first) sb.append(\", \");\n    sb.append(\"requestId:\");\n    if (this.requestId == null) {\n      sb.append(\"null\");\n    } else {\n      sb.append(this.requestId);\n    }\n    first = false;\n    if (!first) sb.append(\", \");\n    sb.append(\"appId:\");\n    if (this.appId == null) {\n      sb.append(\"null\");\n    } else {\n      sb.append(this.appId);\n    }\n    first = false;\n    if (!first) sb.append(\", \");\n    sb.append(\"schedulerAddress:\");\n    if (this.schedulerAddress == null) {\n      sb.append(\"null\");\n    } else {\n      sb.append(this.schedulerAddress);\n    }\n    first = false;\n    sb.append(\")\");\n    return sb.toString();\n  }\n\n  public void validate() throws org.apache.thrift.TException {\n    // check for required fields\n  }\n\n  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {\n    try {\n      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));\n    } catch (org.apache.thrift.TException te) {\n      throw new java.io.IOException(te.getMessage());\n    }\n  }\n\n  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {\n    try {\n      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));\n    } catch (org.apache.thrift.TException te) {\n      throw new java.io.IOException(te.getMessage());\n    }\n  }\n\n  private static class TFullTaskIdStandardSchemeFactory implements SchemeFactory {\n    public TFullTaskIdStandardScheme getScheme() {\n      return new TFullTaskIdStandardScheme();\n    }\n  }\n\n  private static class TFullTaskIdStandardScheme extends StandardScheme<TFullTaskId> {\n\n    public void read(org.apache.thrift.protocol.TProtocol iprot, TFullTaskId struct) throws org.apache.thrift.TException {\n      org.apache.thrift.protocol.TField schemeField;\n      iprot.readStructBegin();\n      while (true)\n      {\n        schemeField = iprot.readFieldBegin();\n        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { \n          break;\n        }\n        switch (schemeField.id) {\n          case 1: // TASK_ID\n            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {\n              struct.taskId = iprot.readString();\n              struct.setTaskIdIsSet(true);\n            } else { \n              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n            }\n            break;\n          case 2: // REQUEST_ID\n            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {\n              struct.requestId = iprot.readString();\n              struct.setRequestIdIsSet(true);\n            } else { \n              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n            }\n            break;\n          case 3: // APP_ID\n            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {\n              struct.appId = iprot.readString();\n              struct.setAppIdIsSet(true);\n            } else { \n              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n            }\n            break;\n          case 4: // SCHEDULER_ADDRESS\n            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {\n              struct.schedulerAddress = new THostPort();\n              struct.schedulerAddress.read(iprot);\n              struct.setSchedulerAddressIsSet(true);\n            } else { \n              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n            }\n            break;\n          default:\n            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n        }\n        iprot.readFieldEnd();\n      }\n      iprot.readStructEnd();\n\n      // check for required fields of primitive type, which can't be checked in the validate method\n      struct.validate();\n    }\n\n    public void write(org.apache.thrift.protocol.TProtocol oprot, TFullTaskId struct) throws org.apache.thrift.TException {\n      struct.validate();\n\n      oprot.writeStructBegin(STRUCT_DESC);\n      if (struct.taskId != null) {\n        oprot.writeFieldBegin(TASK_ID_FIELD_DESC);\n        oprot.writeString(struct.taskId);\n        oprot.writeFieldEnd();\n      }\n      if (struct.requestId != null) {\n        oprot.writeFieldBegin(REQUEST_ID_FIELD_DESC);\n        oprot.writeString(struct.requestId);\n        oprot.writeFieldEnd();\n      }\n      if (struct.appId != null) {\n        oprot.writeFieldBegin(APP_ID_FIELD_DESC);\n        oprot.writeString(struct.appId);\n        oprot.writeFieldEnd();\n      }\n      if (struct.schedulerAddress != null) {\n        oprot.writeFieldBegin(SCHEDULER_ADDRESS_FIELD_DESC);\n        struct.schedulerAddress.write(oprot);\n        oprot.writeFieldEnd();\n      }\n      oprot.writeFieldStop();\n      oprot.writeStructEnd();\n    }\n\n  }\n\n  private static class TFullTaskIdTupleSchemeFactory implements SchemeFactory {\n    public TFullTaskIdTupleScheme getScheme() {\n      return new TFullTaskIdTupleScheme();\n    }\n  }\n\n  private static class TFullTaskIdTupleScheme extends TupleScheme<TFullTaskId> {\n\n    @Override\n    public void write(org.apache.thrift.protocol.TProtocol prot, TFullTaskId struct) throws org.apache.thrift.TException {\n      TTupleProtocol oprot = (TTupleProtocol) prot;\n      BitSet optionals = new BitSet();\n      if (struct.isSetTaskId()) {\n        optionals.set(0);\n      }\n      if (struct.isSetRequestId()) {\n        optionals.set(1);\n      }\n      if (struct.isSetAppId()) {\n        optionals.set(2);\n      }\n      if (struct.isSetSchedulerAddress()) {\n        optionals.set(3);\n      }\n      oprot.writeBitSet(optionals, 4);\n      if (struct.isSetTaskId()) {\n        oprot.writeString(struct.taskId);\n      }\n      if (struct.isSetRequestId()) {\n        oprot.writeString(struct.requestId);\n      }\n      if (struct.isSetAppId()) {\n        oprot.writeString(struct.appId);\n      }\n      if (struct.isSetSchedulerAddress()) {\n        struct.schedulerAddress.write(oprot);\n      }\n    }\n\n    @Override\n    public void read(org.apache.thrift.protocol.TProtocol prot, TFullTaskId struct) throws org.apache.thrift.TException {\n      TTupleProtocol iprot = (TTupleProtocol) prot;\n      BitSet incoming = iprot.readBitSet(4);\n      if (incoming.get(0)) {\n        struct.taskId = iprot.readString();\n        struct.setTaskIdIsSet(true);\n      }\n      if (incoming.get(1)) {\n        struct.requestId = iprot.readString();\n        struct.setRequestIdIsSet(true);\n      }\n      if (incoming.get(2)) {\n        struct.appId = iprot.readString();\n        struct.setAppIdIsSet(true);\n      }\n      if (incoming.get(3)) {\n        struct.schedulerAddress = new THostPort();\n        struct.schedulerAddress.read(iprot);\n        struct.setSchedulerAddressIsSet(true);\n      }\n    }\n  }\n\n}\n\n"
  },
  {
    "path": "src/main/gen-java/edu/berkeley/sparrow/thrift/THostPort.java",
    "content": "/**\n * Autogenerated by Thrift Compiler (0.8.0)\n *\n * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING\n *  @generated\n */\npackage edu.berkeley.sparrow.thrift;\n\nimport org.apache.thrift.scheme.IScheme;\nimport org.apache.thrift.scheme.SchemeFactory;\nimport org.apache.thrift.scheme.StandardScheme;\n\nimport org.apache.thrift.scheme.TupleScheme;\nimport org.apache.thrift.protocol.TTupleProtocol;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.util.HashMap;\nimport java.util.EnumMap;\nimport java.util.Set;\nimport java.util.HashSet;\nimport java.util.EnumSet;\nimport java.util.Collections;\nimport java.util.BitSet;\nimport java.nio.ByteBuffer;\nimport java.util.Arrays;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\npublic class THostPort implements org.apache.thrift.TBase<THostPort, THostPort._Fields>, java.io.Serializable, Cloneable {\n  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct(\"THostPort\");\n\n  private static final org.apache.thrift.protocol.TField HOST_FIELD_DESC = new org.apache.thrift.protocol.TField(\"host\", org.apache.thrift.protocol.TType.STRING, (short)1);\n  private static final org.apache.thrift.protocol.TField PORT_FIELD_DESC = new org.apache.thrift.protocol.TField(\"port\", org.apache.thrift.protocol.TType.I32, (short)2);\n\n  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();\n  static {\n    schemes.put(StandardScheme.class, new THostPortStandardSchemeFactory());\n    schemes.put(TupleScheme.class, new THostPortTupleSchemeFactory());\n  }\n\n  public String host; // required\n  public int port; // required\n\n  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */\n  public enum _Fields implements org.apache.thrift.TFieldIdEnum {\n    HOST((short)1, \"host\"),\n    PORT((short)2, \"port\");\n\n    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();\n\n    static {\n      for (_Fields field : EnumSet.allOf(_Fields.class)) {\n        byName.put(field.getFieldName(), field);\n      }\n    }\n\n    /**\n     * Find the _Fields constant that matches fieldId, or null if its not found.\n     */\n    public static _Fields findByThriftId(int fieldId) {\n      switch(fieldId) {\n        case 1: // HOST\n          return HOST;\n        case 2: // PORT\n          return PORT;\n        default:\n          return null;\n      }\n    }\n\n    /**\n     * Find the _Fields constant that matches fieldId, throwing an exception\n     * if it is not found.\n     */\n    public static _Fields findByThriftIdOrThrow(int fieldId) {\n      _Fields fields = findByThriftId(fieldId);\n      if (fields == null) throw new IllegalArgumentException(\"Field \" + fieldId + \" doesn't exist!\");\n      return fields;\n    }\n\n    /**\n     * Find the _Fields constant that matches name, or null if its not found.\n     */\n    public static _Fields findByName(String name) {\n      return byName.get(name);\n    }\n\n    private final short _thriftId;\n    private final String _fieldName;\n\n    _Fields(short thriftId, String fieldName) {\n      _thriftId = thriftId;\n      _fieldName = fieldName;\n    }\n\n    public short getThriftFieldId() {\n      return _thriftId;\n    }\n\n    public String getFieldName() {\n      return _fieldName;\n    }\n  }\n\n  // isset id assignments\n  private static final int __PORT_ISSET_ID = 0;\n  private BitSet __isset_bit_vector = new BitSet(1);\n  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;\n  static {\n    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);\n    tmpMap.put(_Fields.HOST, new org.apache.thrift.meta_data.FieldMetaData(\"host\", org.apache.thrift.TFieldRequirementType.DEFAULT, \n        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));\n    tmpMap.put(_Fields.PORT, new org.apache.thrift.meta_data.FieldMetaData(\"port\", org.apache.thrift.TFieldRequirementType.DEFAULT, \n        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));\n    metaDataMap = Collections.unmodifiableMap(tmpMap);\n    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(THostPort.class, metaDataMap);\n  }\n\n  public THostPort() {\n  }\n\n  public THostPort(\n    String host,\n    int port)\n  {\n    this();\n    this.host = host;\n    this.port = port;\n    setPortIsSet(true);\n  }\n\n  /**\n   * Performs a deep copy on <i>other</i>.\n   */\n  public THostPort(THostPort other) {\n    __isset_bit_vector.clear();\n    __isset_bit_vector.or(other.__isset_bit_vector);\n    if (other.isSetHost()) {\n      this.host = other.host;\n    }\n    this.port = other.port;\n  }\n\n  public THostPort deepCopy() {\n    return new THostPort(this);\n  }\n\n  public void clear() {\n    this.host = null;\n    setPortIsSet(false);\n    this.port = 0;\n  }\n\n  public String getHost() {\n    return this.host;\n  }\n\n  public THostPort setHost(String host) {\n    this.host = host;\n    return this;\n  }\n\n  public void unsetHost() {\n    this.host = null;\n  }\n\n  /** Returns true if field host is set (has been assigned a value) and false otherwise */\n  public boolean isSetHost() {\n    return this.host != null;\n  }\n\n  public void setHostIsSet(boolean value) {\n    if (!value) {\n      this.host = null;\n    }\n  }\n\n  public int getPort() {\n    return this.port;\n  }\n\n  public THostPort setPort(int port) {\n    this.port = port;\n    setPortIsSet(true);\n    return this;\n  }\n\n  public void unsetPort() {\n    __isset_bit_vector.clear(__PORT_ISSET_ID);\n  }\n\n  /** Returns true if field port is set (has been assigned a value) and false otherwise */\n  public boolean isSetPort() {\n    return __isset_bit_vector.get(__PORT_ISSET_ID);\n  }\n\n  public void setPortIsSet(boolean value) {\n    __isset_bit_vector.set(__PORT_ISSET_ID, value);\n  }\n\n  public void setFieldValue(_Fields field, Object value) {\n    switch (field) {\n    case HOST:\n      if (value == null) {\n        unsetHost();\n      } else {\n        setHost((String)value);\n      }\n      break;\n\n    case PORT:\n      if (value == null) {\n        unsetPort();\n      } else {\n        setPort((Integer)value);\n      }\n      break;\n\n    }\n  }\n\n  public Object getFieldValue(_Fields field) {\n    switch (field) {\n    case HOST:\n      return getHost();\n\n    case PORT:\n      return Integer.valueOf(getPort());\n\n    }\n    throw new IllegalStateException();\n  }\n\n  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */\n  public boolean isSet(_Fields field) {\n    if (field == null) {\n      throw new IllegalArgumentException();\n    }\n\n    switch (field) {\n    case HOST:\n      return isSetHost();\n    case PORT:\n      return isSetPort();\n    }\n    throw new IllegalStateException();\n  }\n\n  @Override\n  public boolean equals(Object that) {\n    if (that == null)\n      return false;\n    if (that instanceof THostPort)\n      return this.equals((THostPort)that);\n    return false;\n  }\n\n  public boolean equals(THostPort that) {\n    if (that == null)\n      return false;\n\n    boolean this_present_host = true && this.isSetHost();\n    boolean that_present_host = true && that.isSetHost();\n    if (this_present_host || that_present_host) {\n      if (!(this_present_host && that_present_host))\n        return false;\n      if (!this.host.equals(that.host))\n        return false;\n    }\n\n    boolean this_present_port = true;\n    boolean that_present_port = true;\n    if (this_present_port || that_present_port) {\n      if (!(this_present_port && that_present_port))\n        return false;\n      if (this.port != that.port)\n        return false;\n    }\n\n    return true;\n  }\n\n  @Override\n  public int hashCode() {\n    return 0;\n  }\n\n  public int compareTo(THostPort other) {\n    if (!getClass().equals(other.getClass())) {\n      return getClass().getName().compareTo(other.getClass().getName());\n    }\n\n    int lastComparison = 0;\n    THostPort typedOther = (THostPort)other;\n\n    lastComparison = Boolean.valueOf(isSetHost()).compareTo(typedOther.isSetHost());\n    if (lastComparison != 0) {\n      return lastComparison;\n    }\n    if (isSetHost()) {\n      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.host, typedOther.host);\n      if (lastComparison != 0) {\n        return lastComparison;\n      }\n    }\n    lastComparison = Boolean.valueOf(isSetPort()).compareTo(typedOther.isSetPort());\n    if (lastComparison != 0) {\n      return lastComparison;\n    }\n    if (isSetPort()) {\n      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.port, typedOther.port);\n      if (lastComparison != 0) {\n        return lastComparison;\n      }\n    }\n    return 0;\n  }\n\n  public _Fields fieldForId(int fieldId) {\n    return _Fields.findByThriftId(fieldId);\n  }\n\n  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {\n    schemes.get(iprot.getScheme()).getScheme().read(iprot, this);\n  }\n\n  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {\n    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);\n  }\n\n  @Override\n  public String toString() {\n    StringBuilder sb = new StringBuilder(\"THostPort(\");\n    boolean first = true;\n\n    sb.append(\"host:\");\n    if (this.host == null) {\n      sb.append(\"null\");\n    } else {\n      sb.append(this.host);\n    }\n    first = false;\n    if (!first) sb.append(\", \");\n    sb.append(\"port:\");\n    sb.append(this.port);\n    first = false;\n    sb.append(\")\");\n    return sb.toString();\n  }\n\n  public void validate() throws org.apache.thrift.TException {\n    // check for required fields\n  }\n\n  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {\n    try {\n      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));\n    } catch (org.apache.thrift.TException te) {\n      throw new java.io.IOException(te.getMessage());\n    }\n  }\n\n  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {\n    try {\n      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.\n      __isset_bit_vector = new BitSet(1);\n      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));\n    } catch (org.apache.thrift.TException te) {\n      throw new java.io.IOException(te.getMessage());\n    }\n  }\n\n  private static class THostPortStandardSchemeFactory implements SchemeFactory {\n    public THostPortStandardScheme getScheme() {\n      return new THostPortStandardScheme();\n    }\n  }\n\n  private static class THostPortStandardScheme extends StandardScheme<THostPort> {\n\n    public void read(org.apache.thrift.protocol.TProtocol iprot, THostPort struct) throws org.apache.thrift.TException {\n      org.apache.thrift.protocol.TField schemeField;\n      iprot.readStructBegin();\n      while (true)\n      {\n        schemeField = iprot.readFieldBegin();\n        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { \n          break;\n        }\n        switch (schemeField.id) {\n          case 1: // HOST\n            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {\n              struct.host = iprot.readString();\n              struct.setHostIsSet(true);\n            } else { \n              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n            }\n            break;\n          case 2: // PORT\n            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {\n              struct.port = iprot.readI32();\n              struct.setPortIsSet(true);\n            } else { \n              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n            }\n            break;\n          default:\n            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n        }\n        iprot.readFieldEnd();\n      }\n      iprot.readStructEnd();\n\n      // check for required fields of primitive type, which can't be checked in the validate method\n      struct.validate();\n    }\n\n    public void write(org.apache.thrift.protocol.TProtocol oprot, THostPort struct) throws org.apache.thrift.TException {\n      struct.validate();\n\n      oprot.writeStructBegin(STRUCT_DESC);\n      if (struct.host != null) {\n        oprot.writeFieldBegin(HOST_FIELD_DESC);\n        oprot.writeString(struct.host);\n        oprot.writeFieldEnd();\n      }\n      oprot.writeFieldBegin(PORT_FIELD_DESC);\n      oprot.writeI32(struct.port);\n      oprot.writeFieldEnd();\n      oprot.writeFieldStop();\n      oprot.writeStructEnd();\n    }\n\n  }\n\n  private static class THostPortTupleSchemeFactory implements SchemeFactory {\n    public THostPortTupleScheme getScheme() {\n      return new THostPortTupleScheme();\n    }\n  }\n\n  private static class THostPortTupleScheme extends TupleScheme<THostPort> {\n\n    @Override\n    public void write(org.apache.thrift.protocol.TProtocol prot, THostPort struct) throws org.apache.thrift.TException {\n      TTupleProtocol oprot = (TTupleProtocol) prot;\n      BitSet optionals = new BitSet();\n      if (struct.isSetHost()) {\n        optionals.set(0);\n      }\n      if (struct.isSetPort()) {\n        optionals.set(1);\n      }\n      oprot.writeBitSet(optionals, 2);\n      if (struct.isSetHost()) {\n        oprot.writeString(struct.host);\n      }\n      if (struct.isSetPort()) {\n        oprot.writeI32(struct.port);\n      }\n    }\n\n    @Override\n    public void read(org.apache.thrift.protocol.TProtocol prot, THostPort struct) throws org.apache.thrift.TException {\n      TTupleProtocol iprot = (TTupleProtocol) prot;\n      BitSet incoming = iprot.readBitSet(2);\n      if (incoming.get(0)) {\n        struct.host = iprot.readString();\n        struct.setHostIsSet(true);\n      }\n      if (incoming.get(1)) {\n        struct.port = iprot.readI32();\n        struct.setPortIsSet(true);\n      }\n    }\n  }\n\n}\n\n"
  },
  {
    "path": "src/main/gen-java/edu/berkeley/sparrow/thrift/TNodeState.java",
    "content": "/**\n * Autogenerated by Thrift Compiler (0.8.0)\n *\n * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING\n *  @generated\n */\npackage edu.berkeley.sparrow.thrift;\n\nimport org.apache.thrift.scheme.IScheme;\nimport org.apache.thrift.scheme.SchemeFactory;\nimport org.apache.thrift.scheme.StandardScheme;\n\nimport org.apache.thrift.scheme.TupleScheme;\nimport org.apache.thrift.protocol.TTupleProtocol;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.util.HashMap;\nimport java.util.EnumMap;\nimport java.util.Set;\nimport java.util.HashSet;\nimport java.util.EnumSet;\nimport java.util.Collections;\nimport java.util.BitSet;\nimport java.nio.ByteBuffer;\nimport java.util.Arrays;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\npublic class TNodeState implements org.apache.thrift.TBase<TNodeState, TNodeState._Fields>, java.io.Serializable, Cloneable {\n  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct(\"TNodeState\");\n\n  private static final org.apache.thrift.protocol.TField SPARROW_USAGE_FIELD_DESC = new org.apache.thrift.protocol.TField(\"sparrowUsage\", org.apache.thrift.protocol.TType.STRUCT, (short)1);\n  private static final org.apache.thrift.protocol.TField EXTERNAL_USAGE_FIELD_DESC = new org.apache.thrift.protocol.TField(\"externalUsage\", org.apache.thrift.protocol.TType.STRUCT, (short)2);\n\n  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();\n  static {\n    schemes.put(StandardScheme.class, new TNodeStateStandardSchemeFactory());\n    schemes.put(TupleScheme.class, new TNodeStateTupleSchemeFactory());\n  }\n\n  public TResourceVector sparrowUsage; // required\n  public TResourceVector externalUsage; // required\n\n  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */\n  public enum _Fields implements org.apache.thrift.TFieldIdEnum {\n    SPARROW_USAGE((short)1, \"sparrowUsage\"),\n    EXTERNAL_USAGE((short)2, \"externalUsage\");\n\n    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();\n\n    static {\n      for (_Fields field : EnumSet.allOf(_Fields.class)) {\n        byName.put(field.getFieldName(), field);\n      }\n    }\n\n    /**\n     * Find the _Fields constant that matches fieldId, or null if its not found.\n     */\n    public static _Fields findByThriftId(int fieldId) {\n      switch(fieldId) {\n        case 1: // SPARROW_USAGE\n          return SPARROW_USAGE;\n        case 2: // EXTERNAL_USAGE\n          return EXTERNAL_USAGE;\n        default:\n          return null;\n      }\n    }\n\n    /**\n     * Find the _Fields constant that matches fieldId, throwing an exception\n     * if it is not found.\n     */\n    public static _Fields findByThriftIdOrThrow(int fieldId) {\n      _Fields fields = findByThriftId(fieldId);\n      if (fields == null) throw new IllegalArgumentException(\"Field \" + fieldId + \" doesn't exist!\");\n      return fields;\n    }\n\n    /**\n     * Find the _Fields constant that matches name, or null if its not found.\n     */\n    public static _Fields findByName(String name) {\n      return byName.get(name);\n    }\n\n    private final short _thriftId;\n    private final String _fieldName;\n\n    _Fields(short thriftId, String fieldName) {\n      _thriftId = thriftId;\n      _fieldName = fieldName;\n    }\n\n    public short getThriftFieldId() {\n      return _thriftId;\n    }\n\n    public String getFieldName() {\n      return _fieldName;\n    }\n  }\n\n  // isset id assignments\n  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;\n  static {\n    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);\n    tmpMap.put(_Fields.SPARROW_USAGE, new org.apache.thrift.meta_data.FieldMetaData(\"sparrowUsage\", org.apache.thrift.TFieldRequirementType.DEFAULT, \n        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TResourceVector.class)));\n    tmpMap.put(_Fields.EXTERNAL_USAGE, new org.apache.thrift.meta_data.FieldMetaData(\"externalUsage\", org.apache.thrift.TFieldRequirementType.DEFAULT, \n        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TResourceVector.class)));\n    metaDataMap = Collections.unmodifiableMap(tmpMap);\n    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TNodeState.class, metaDataMap);\n  }\n\n  public TNodeState() {\n  }\n\n  public TNodeState(\n    TResourceVector sparrowUsage,\n    TResourceVector externalUsage)\n  {\n    this();\n    this.sparrowUsage = sparrowUsage;\n    this.externalUsage = externalUsage;\n  }\n\n  /**\n   * Performs a deep copy on <i>other</i>.\n   */\n  public TNodeState(TNodeState other) {\n    if (other.isSetSparrowUsage()) {\n      this.sparrowUsage = new TResourceVector(other.sparrowUsage);\n    }\n    if (other.isSetExternalUsage()) {\n      this.externalUsage = new TResourceVector(other.externalUsage);\n    }\n  }\n\n  public TNodeState deepCopy() {\n    return new TNodeState(this);\n  }\n\n  public void clear() {\n    this.sparrowUsage = null;\n    this.externalUsage = null;\n  }\n\n  public TResourceVector getSparrowUsage() {\n    return this.sparrowUsage;\n  }\n\n  public TNodeState setSparrowUsage(TResourceVector sparrowUsage) {\n    this.sparrowUsage = sparrowUsage;\n    return this;\n  }\n\n  public void unsetSparrowUsage() {\n    this.sparrowUsage = null;\n  }\n\n  /** Returns true if field sparrowUsage is set (has been assigned a value) and false otherwise */\n  public boolean isSetSparrowUsage() {\n    return this.sparrowUsage != null;\n  }\n\n  public void setSparrowUsageIsSet(boolean value) {\n    if (!value) {\n      this.sparrowUsage = null;\n    }\n  }\n\n  public TResourceVector getExternalUsage() {\n    return this.externalUsage;\n  }\n\n  public TNodeState setExternalUsage(TResourceVector externalUsage) {\n    this.externalUsage = externalUsage;\n    return this;\n  }\n\n  public void unsetExternalUsage() {\n    this.externalUsage = null;\n  }\n\n  /** Returns true if field externalUsage is set (has been assigned a value) and false otherwise */\n  public boolean isSetExternalUsage() {\n    return this.externalUsage != null;\n  }\n\n  public void setExternalUsageIsSet(boolean value) {\n    if (!value) {\n      this.externalUsage = null;\n    }\n  }\n\n  public void setFieldValue(_Fields field, Object value) {\n    switch (field) {\n    case SPARROW_USAGE:\n      if (value == null) {\n        unsetSparrowUsage();\n      } else {\n        setSparrowUsage((TResourceVector)value);\n      }\n      break;\n\n    case EXTERNAL_USAGE:\n      if (value == null) {\n        unsetExternalUsage();\n      } else {\n        setExternalUsage((TResourceVector)value);\n      }\n      break;\n\n    }\n  }\n\n  public Object getFieldValue(_Fields field) {\n    switch (field) {\n    case SPARROW_USAGE:\n      return getSparrowUsage();\n\n    case EXTERNAL_USAGE:\n      return getExternalUsage();\n\n    }\n    throw new IllegalStateException();\n  }\n\n  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */\n  public boolean isSet(_Fields field) {\n    if (field == null) {\n      throw new IllegalArgumentException();\n    }\n\n    switch (field) {\n    case SPARROW_USAGE:\n      return isSetSparrowUsage();\n    case EXTERNAL_USAGE:\n      return isSetExternalUsage();\n    }\n    throw new IllegalStateException();\n  }\n\n  @Override\n  public boolean equals(Object that) {\n    if (that == null)\n      return false;\n    if (that instanceof TNodeState)\n      return this.equals((TNodeState)that);\n    return false;\n  }\n\n  public boolean equals(TNodeState that) {\n    if (that == null)\n      return false;\n\n    boolean this_present_sparrowUsage = true && this.isSetSparrowUsage();\n    boolean that_present_sparrowUsage = true && that.isSetSparrowUsage();\n    if (this_present_sparrowUsage || that_present_sparrowUsage) {\n      if (!(this_present_sparrowUsage && that_present_sparrowUsage))\n        return false;\n      if (!this.sparrowUsage.equals(that.sparrowUsage))\n        return false;\n    }\n\n    boolean this_present_externalUsage = true && this.isSetExternalUsage();\n    boolean that_present_externalUsage = true && that.isSetExternalUsage();\n    if (this_present_externalUsage || that_present_externalUsage) {\n      if (!(this_present_externalUsage && that_present_externalUsage))\n        return false;\n      if (!this.externalUsage.equals(that.externalUsage))\n        return false;\n    }\n\n    return true;\n  }\n\n  @Override\n  public int hashCode() {\n    return 0;\n  }\n\n  public int compareTo(TNodeState other) {\n    if (!getClass().equals(other.getClass())) {\n      return getClass().getName().compareTo(other.getClass().getName());\n    }\n\n    int lastComparison = 0;\n    TNodeState typedOther = (TNodeState)other;\n\n    lastComparison = Boolean.valueOf(isSetSparrowUsage()).compareTo(typedOther.isSetSparrowUsage());\n    if (lastComparison != 0) {\n      return lastComparison;\n    }\n    if (isSetSparrowUsage()) {\n      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sparrowUsage, typedOther.sparrowUsage);\n      if (lastComparison != 0) {\n        return lastComparison;\n      }\n    }\n    lastComparison = Boolean.valueOf(isSetExternalUsage()).compareTo(typedOther.isSetExternalUsage());\n    if (lastComparison != 0) {\n      return lastComparison;\n    }\n    if (isSetExternalUsage()) {\n      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.externalUsage, typedOther.externalUsage);\n      if (lastComparison != 0) {\n        return lastComparison;\n      }\n    }\n    return 0;\n  }\n\n  public _Fields fieldForId(int fieldId) {\n    return _Fields.findByThriftId(fieldId);\n  }\n\n  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {\n    schemes.get(iprot.getScheme()).getScheme().read(iprot, this);\n  }\n\n  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {\n    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);\n  }\n\n  @Override\n  public String toString() {\n    StringBuilder sb = new StringBuilder(\"TNodeState(\");\n    boolean first = true;\n\n    sb.append(\"sparrowUsage:\");\n    if (this.sparrowUsage == null) {\n      sb.append(\"null\");\n    } else {\n      sb.append(this.sparrowUsage);\n    }\n    first = false;\n    if (!first) sb.append(\", \");\n    sb.append(\"externalUsage:\");\n    if (this.externalUsage == null) {\n      sb.append(\"null\");\n    } else {\n      sb.append(this.externalUsage);\n    }\n    first = false;\n    sb.append(\")\");\n    return sb.toString();\n  }\n\n  public void validate() throws org.apache.thrift.TException {\n    // check for required fields\n  }\n\n  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {\n    try {\n      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));\n    } catch (org.apache.thrift.TException te) {\n      throw new java.io.IOException(te.getMessage());\n    }\n  }\n\n  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {\n    try {\n      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));\n    } catch (org.apache.thrift.TException te) {\n      throw new java.io.IOException(te.getMessage());\n    }\n  }\n\n  private static class TNodeStateStandardSchemeFactory implements SchemeFactory {\n    public TNodeStateStandardScheme getScheme() {\n      return new TNodeStateStandardScheme();\n    }\n  }\n\n  private static class TNodeStateStandardScheme extends StandardScheme<TNodeState> {\n\n    public void read(org.apache.thrift.protocol.TProtocol iprot, TNodeState struct) throws org.apache.thrift.TException {\n      org.apache.thrift.protocol.TField schemeField;\n      iprot.readStructBegin();\n      while (true)\n      {\n        schemeField = iprot.readFieldBegin();\n        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { \n          break;\n        }\n        switch (schemeField.id) {\n          case 1: // SPARROW_USAGE\n            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {\n              struct.sparrowUsage = new TResourceVector();\n              struct.sparrowUsage.read(iprot);\n              struct.setSparrowUsageIsSet(true);\n            } else { \n              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n            }\n            break;\n          case 2: // EXTERNAL_USAGE\n            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {\n              struct.externalUsage = new TResourceVector();\n              struct.externalUsage.read(iprot);\n              struct.setExternalUsageIsSet(true);\n            } else { \n              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n            }\n            break;\n          default:\n            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n        }\n        iprot.readFieldEnd();\n      }\n      iprot.readStructEnd();\n\n      // check for required fields of primitive type, which can't be checked in the validate method\n      struct.validate();\n    }\n\n    public void write(org.apache.thrift.protocol.TProtocol oprot, TNodeState struct) throws org.apache.thrift.TException {\n      struct.validate();\n\n      oprot.writeStructBegin(STRUCT_DESC);\n      if (struct.sparrowUsage != null) {\n        oprot.writeFieldBegin(SPARROW_USAGE_FIELD_DESC);\n        struct.sparrowUsage.write(oprot);\n        oprot.writeFieldEnd();\n      }\n      if (struct.externalUsage != null) {\n        oprot.writeFieldBegin(EXTERNAL_USAGE_FIELD_DESC);\n        struct.externalUsage.write(oprot);\n        oprot.writeFieldEnd();\n      }\n      oprot.writeFieldStop();\n      oprot.writeStructEnd();\n    }\n\n  }\n\n  private static class TNodeStateTupleSchemeFactory implements SchemeFactory {\n    public TNodeStateTupleScheme getScheme() {\n      return new TNodeStateTupleScheme();\n    }\n  }\n\n  private static class TNodeStateTupleScheme extends TupleScheme<TNodeState> {\n\n    @Override\n    public void write(org.apache.thrift.protocol.TProtocol prot, TNodeState struct) throws org.apache.thrift.TException {\n      TTupleProtocol oprot = (TTupleProtocol) prot;\n      BitSet optionals = new BitSet();\n      if (struct.isSetSparrowUsage()) {\n        optionals.set(0);\n      }\n      if (struct.isSetExternalUsage()) {\n        optionals.set(1);\n      }\n      oprot.writeBitSet(optionals, 2);\n      if (struct.isSetSparrowUsage()) {\n        struct.sparrowUsage.write(oprot);\n      }\n      if (struct.isSetExternalUsage()) {\n        struct.externalUsage.write(oprot);\n      }\n    }\n\n    @Override\n    public void read(org.apache.thrift.protocol.TProtocol prot, TNodeState struct) throws org.apache.thrift.TException {\n      TTupleProtocol iprot = (TTupleProtocol) prot;\n      BitSet incoming = iprot.readBitSet(2);\n      if (incoming.get(0)) {\n        struct.sparrowUsage = new TResourceVector();\n        struct.sparrowUsage.read(iprot);\n        struct.setSparrowUsageIsSet(true);\n      }\n      if (incoming.get(1)) {\n        struct.externalUsage = new TResourceVector();\n        struct.externalUsage.read(iprot);\n        struct.setExternalUsageIsSet(true);\n      }\n    }\n  }\n\n}\n\n"
  },
  {
    "path": "src/main/gen-java/edu/berkeley/sparrow/thrift/TPlacementPreference.java",
    "content": "/**\n * Autogenerated by Thrift Compiler (0.8.0)\n *\n * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING\n *  @generated\n */\npackage edu.berkeley.sparrow.thrift;\n\nimport org.apache.thrift.scheme.IScheme;\nimport org.apache.thrift.scheme.SchemeFactory;\nimport org.apache.thrift.scheme.StandardScheme;\n\nimport org.apache.thrift.scheme.TupleScheme;\nimport org.apache.thrift.protocol.TTupleProtocol;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.util.HashMap;\nimport java.util.EnumMap;\nimport java.util.Set;\nimport java.util.HashSet;\nimport java.util.EnumSet;\nimport java.util.Collections;\nimport java.util.BitSet;\nimport java.nio.ByteBuffer;\nimport java.util.Arrays;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\npublic class TPlacementPreference implements org.apache.thrift.TBase<TPlacementPreference, TPlacementPreference._Fields>, java.io.Serializable, Cloneable {\n  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct(\"TPlacementPreference\");\n\n  private static final org.apache.thrift.protocol.TField NODES_FIELD_DESC = new org.apache.thrift.protocol.TField(\"nodes\", org.apache.thrift.protocol.TType.LIST, (short)1);\n  private static final org.apache.thrift.protocol.TField RACKS_FIELD_DESC = new org.apache.thrift.protocol.TField(\"racks\", org.apache.thrift.protocol.TType.LIST, (short)2);\n  private static final org.apache.thrift.protocol.TField DELAY_THRESHOLD_FIELD_DESC = new org.apache.thrift.protocol.TField(\"delayThreshold\", org.apache.thrift.protocol.TType.I32, (short)3);\n\n  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();\n  static {\n    schemes.put(StandardScheme.class, new TPlacementPreferenceStandardSchemeFactory());\n    schemes.put(TupleScheme.class, new TPlacementPreferenceTupleSchemeFactory());\n  }\n\n  public List<String> nodes; // required\n  public List<String> racks; // required\n  public int delayThreshold; // required\n\n  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */\n  public enum _Fields implements org.apache.thrift.TFieldIdEnum {\n    NODES((short)1, \"nodes\"),\n    RACKS((short)2, \"racks\"),\n    DELAY_THRESHOLD((short)3, \"delayThreshold\");\n\n    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();\n\n    static {\n      for (_Fields field : EnumSet.allOf(_Fields.class)) {\n        byName.put(field.getFieldName(), field);\n      }\n    }\n\n    /**\n     * Find the _Fields constant that matches fieldId, or null if its not found.\n     */\n    public static _Fields findByThriftId(int fieldId) {\n      switch(fieldId) {\n        case 1: // NODES\n          return NODES;\n        case 2: // RACKS\n          return RACKS;\n        case 3: // DELAY_THRESHOLD\n          return DELAY_THRESHOLD;\n        default:\n          return null;\n      }\n    }\n\n    /**\n     * Find the _Fields constant that matches fieldId, throwing an exception\n     * if it is not found.\n     */\n    public static _Fields findByThriftIdOrThrow(int fieldId) {\n      _Fields fields = findByThriftId(fieldId);\n      if (fields == null) throw new IllegalArgumentException(\"Field \" + fieldId + \" doesn't exist!\");\n      return fields;\n    }\n\n    /**\n     * Find the _Fields constant that matches name, or null if its not found.\n     */\n    public static _Fields findByName(String name) {\n      return byName.get(name);\n    }\n\n    private final short _thriftId;\n    private final String _fieldName;\n\n    _Fields(short thriftId, String fieldName) {\n      _thriftId = thriftId;\n      _fieldName = fieldName;\n    }\n\n    public short getThriftFieldId() {\n      return _thriftId;\n    }\n\n    public String getFieldName() {\n      return _fieldName;\n    }\n  }\n\n  // isset id assignments\n  private static final int __DELAYTHRESHOLD_ISSET_ID = 0;\n  private BitSet __isset_bit_vector = new BitSet(1);\n  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;\n  static {\n    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);\n    tmpMap.put(_Fields.NODES, new org.apache.thrift.meta_data.FieldMetaData(\"nodes\", org.apache.thrift.TFieldRequirementType.DEFAULT, \n        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, \n            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));\n    tmpMap.put(_Fields.RACKS, new org.apache.thrift.meta_data.FieldMetaData(\"racks\", org.apache.thrift.TFieldRequirementType.DEFAULT, \n        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, \n            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));\n    tmpMap.put(_Fields.DELAY_THRESHOLD, new org.apache.thrift.meta_data.FieldMetaData(\"delayThreshold\", org.apache.thrift.TFieldRequirementType.DEFAULT, \n        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));\n    metaDataMap = Collections.unmodifiableMap(tmpMap);\n    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TPlacementPreference.class, metaDataMap);\n  }\n\n  public TPlacementPreference() {\n  }\n\n  public TPlacementPreference(\n    List<String> nodes,\n    List<String> racks,\n    int delayThreshold)\n  {\n    this();\n    this.nodes = nodes;\n    this.racks = racks;\n    this.delayThreshold = delayThreshold;\n    setDelayThresholdIsSet(true);\n  }\n\n  /**\n   * Performs a deep copy on <i>other</i>.\n   */\n  public TPlacementPreference(TPlacementPreference other) {\n    __isset_bit_vector.clear();\n    __isset_bit_vector.or(other.__isset_bit_vector);\n    if (other.isSetNodes()) {\n      List<String> __this__nodes = new ArrayList<String>();\n      for (String other_element : other.nodes) {\n        __this__nodes.add(other_element);\n      }\n      this.nodes = __this__nodes;\n    }\n    if (other.isSetRacks()) {\n      List<String> __this__racks = new ArrayList<String>();\n      for (String other_element : other.racks) {\n        __this__racks.add(other_element);\n      }\n      this.racks = __this__racks;\n    }\n    this.delayThreshold = other.delayThreshold;\n  }\n\n  public TPlacementPreference deepCopy() {\n    return new TPlacementPreference(this);\n  }\n\n  public void clear() {\n    this.nodes = null;\n    this.racks = null;\n    setDelayThresholdIsSet(false);\n    this.delayThreshold = 0;\n  }\n\n  public int getNodesSize() {\n    return (this.nodes == null) ? 0 : this.nodes.size();\n  }\n\n  public java.util.Iterator<String> getNodesIterator() {\n    return (this.nodes == null) ? null : this.nodes.iterator();\n  }\n\n  public void addToNodes(String elem) {\n    if (this.nodes == null) {\n      this.nodes = new ArrayList<String>();\n    }\n    this.nodes.add(elem);\n  }\n\n  public List<String> getNodes() {\n    return this.nodes;\n  }\n\n  public TPlacementPreference setNodes(List<String> nodes) {\n    this.nodes = nodes;\n    return this;\n  }\n\n  public void unsetNodes() {\n    this.nodes = null;\n  }\n\n  /** Returns true if field nodes is set (has been assigned a value) and false otherwise */\n  public boolean isSetNodes() {\n    return this.nodes != null;\n  }\n\n  public void setNodesIsSet(boolean value) {\n    if (!value) {\n      this.nodes = null;\n    }\n  }\n\n  public int getRacksSize() {\n    return (this.racks == null) ? 0 : this.racks.size();\n  }\n\n  public java.util.Iterator<String> getRacksIterator() {\n    return (this.racks == null) ? null : this.racks.iterator();\n  }\n\n  public void addToRacks(String elem) {\n    if (this.racks == null) {\n      this.racks = new ArrayList<String>();\n    }\n    this.racks.add(elem);\n  }\n\n  public List<String> getRacks() {\n    return this.racks;\n  }\n\n  public TPlacementPreference setRacks(List<String> racks) {\n    this.racks = racks;\n    return this;\n  }\n\n  public void unsetRacks() {\n    this.racks = null;\n  }\n\n  /** Returns true if field racks is set (has been assigned a value) and false otherwise */\n  public boolean isSetRacks() {\n    return this.racks != null;\n  }\n\n  public void setRacksIsSet(boolean value) {\n    if (!value) {\n      this.racks = null;\n    }\n  }\n\n  public int getDelayThreshold() {\n    return this.delayThreshold;\n  }\n\n  public TPlacementPreference setDelayThreshold(int delayThreshold) {\n    this.delayThreshold = delayThreshold;\n    setDelayThresholdIsSet(true);\n    return this;\n  }\n\n  public void unsetDelayThreshold() {\n    __isset_bit_vector.clear(__DELAYTHRESHOLD_ISSET_ID);\n  }\n\n  /** Returns true if field delayThreshold is set (has been assigned a value) and false otherwise */\n  public boolean isSetDelayThreshold() {\n    return __isset_bit_vector.get(__DELAYTHRESHOLD_ISSET_ID);\n  }\n\n  public void setDelayThresholdIsSet(boolean value) {\n    __isset_bit_vector.set(__DELAYTHRESHOLD_ISSET_ID, value);\n  }\n\n  public void setFieldValue(_Fields field, Object value) {\n    switch (field) {\n    case NODES:\n      if (value == null) {\n        unsetNodes();\n      } else {\n        setNodes((List<String>)value);\n      }\n      break;\n\n    case RACKS:\n      if (value == null) {\n        unsetRacks();\n      } else {\n        setRacks((List<String>)value);\n      }\n      break;\n\n    case DELAY_THRESHOLD:\n      if (value == null) {\n        unsetDelayThreshold();\n      } else {\n        setDelayThreshold((Integer)value);\n      }\n      break;\n\n    }\n  }\n\n  public Object getFieldValue(_Fields field) {\n    switch (field) {\n    case NODES:\n      return getNodes();\n\n    case RACKS:\n      return getRacks();\n\n    case DELAY_THRESHOLD:\n      return Integer.valueOf(getDelayThreshold());\n\n    }\n    throw new IllegalStateException();\n  }\n\n  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */\n  public boolean isSet(_Fields field) {\n    if (field == null) {\n      throw new IllegalArgumentException();\n    }\n\n    switch (field) {\n    case NODES:\n      return isSetNodes();\n    case RACKS:\n      return isSetRacks();\n    case DELAY_THRESHOLD:\n      return isSetDelayThreshold();\n    }\n    throw new IllegalStateException();\n  }\n\n  @Override\n  public boolean equals(Object that) {\n    if (that == null)\n      return false;\n    if (that instanceof TPlacementPreference)\n      return this.equals((TPlacementPreference)that);\n    return false;\n  }\n\n  public boolean equals(TPlacementPreference that) {\n    if (that == null)\n      return false;\n\n    boolean this_present_nodes = true && this.isSetNodes();\n    boolean that_present_nodes = true && that.isSetNodes();\n    if (this_present_nodes || that_present_nodes) {\n      if (!(this_present_nodes && that_present_nodes))\n        return false;\n      if (!this.nodes.equals(that.nodes))\n        return false;\n    }\n\n    boolean this_present_racks = true && this.isSetRacks();\n    boolean that_present_racks = true && that.isSetRacks();\n    if (this_present_racks || that_present_racks) {\n      if (!(this_present_racks && that_present_racks))\n        return false;\n      if (!this.racks.equals(that.racks))\n        return false;\n    }\n\n    boolean this_present_delayThreshold = true;\n    boolean that_present_delayThreshold = true;\n    if (this_present_delayThreshold || that_present_delayThreshold) {\n      if (!(this_present_delayThreshold && that_present_delayThreshold))\n        return false;\n      if (this.delayThreshold != that.delayThreshold)\n        return false;\n    }\n\n    return true;\n  }\n\n  @Override\n  public int hashCode() {\n    return 0;\n  }\n\n  public int compareTo(TPlacementPreference other) {\n    if (!getClass().equals(other.getClass())) {\n      return getClass().getName().compareTo(other.getClass().getName());\n    }\n\n    int lastComparison = 0;\n    TPlacementPreference typedOther = (TPlacementPreference)other;\n\n    lastComparison = Boolean.valueOf(isSetNodes()).compareTo(typedOther.isSetNodes());\n    if (lastComparison != 0) {\n      return lastComparison;\n    }\n    if (isSetNodes()) {\n      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nodes, typedOther.nodes);\n      if (lastComparison != 0) {\n        return lastComparison;\n      }\n    }\n    lastComparison = Boolean.valueOf(isSetRacks()).compareTo(typedOther.isSetRacks());\n    if (lastComparison != 0) {\n      return lastComparison;\n    }\n    if (isSetRacks()) {\n      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.racks, typedOther.racks);\n      if (lastComparison != 0) {\n        return lastComparison;\n      }\n    }\n    lastComparison = Boolean.valueOf(isSetDelayThreshold()).compareTo(typedOther.isSetDelayThreshold());\n    if (lastComparison != 0) {\n      return lastComparison;\n    }\n    if (isSetDelayThreshold()) {\n      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.delayThreshold, typedOther.delayThreshold);\n      if (lastComparison != 0) {\n        return lastComparison;\n      }\n    }\n    return 0;\n  }\n\n  public _Fields fieldForId(int fieldId) {\n    return _Fields.findByThriftId(fieldId);\n  }\n\n  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {\n    schemes.get(iprot.getScheme()).getScheme().read(iprot, this);\n  }\n\n  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {\n    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);\n  }\n\n  @Override\n  public String toString() {\n    StringBuilder sb = new StringBuilder(\"TPlacementPreference(\");\n    boolean first = true;\n\n    sb.append(\"nodes:\");\n    if (this.nodes == null) {\n      sb.append(\"null\");\n    } else {\n      sb.append(this.nodes);\n    }\n    first = false;\n    if (!first) sb.append(\", \");\n    sb.append(\"racks:\");\n    if (this.racks == null) {\n      sb.append(\"null\");\n    } else {\n      sb.append(this.racks);\n    }\n    first = false;\n    if (!first) sb.append(\", \");\n    sb.append(\"delayThreshold:\");\n    sb.append(this.delayThreshold);\n    first = false;\n    sb.append(\")\");\n    return sb.toString();\n  }\n\n  public void validate() throws org.apache.thrift.TException {\n    // check for required fields\n  }\n\n  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {\n    try {\n      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));\n    } catch (org.apache.thrift.TException te) {\n      throw new java.io.IOException(te.getMessage());\n    }\n  }\n\n  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {\n    try {\n      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.\n      __isset_bit_vector = new BitSet(1);\n      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));\n    } catch (org.apache.thrift.TException te) {\n      throw new java.io.IOException(te.getMessage());\n    }\n  }\n\n  private static class TPlacementPreferenceStandardSchemeFactory implements SchemeFactory {\n    public TPlacementPreferenceStandardScheme getScheme() {\n      return new TPlacementPreferenceStandardScheme();\n    }\n  }\n\n  private static class TPlacementPreferenceStandardScheme extends StandardScheme<TPlacementPreference> {\n\n    public void read(org.apache.thrift.protocol.TProtocol iprot, TPlacementPreference struct) throws org.apache.thrift.TException {\n      org.apache.thrift.protocol.TField schemeField;\n      iprot.readStructBegin();\n      while (true)\n      {\n        schemeField = iprot.readFieldBegin();\n        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { \n          break;\n        }\n        switch (schemeField.id) {\n          case 1: // NODES\n            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {\n              {\n                org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();\n                struct.nodes = new ArrayList<String>(_list0.size);\n                for (int _i1 = 0; _i1 < _list0.size; ++_i1)\n                {\n                  String _elem2; // required\n                  _elem2 = iprot.readString();\n                  struct.nodes.add(_elem2);\n                }\n                iprot.readListEnd();\n              }\n              struct.setNodesIsSet(true);\n            } else { \n              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n            }\n            break;\n          case 2: // RACKS\n            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {\n              {\n                org.apache.thrift.protocol.TList _list3 = iprot.readListBegin();\n                struct.racks = new ArrayList<String>(_list3.size);\n                for (int _i4 = 0; _i4 < _list3.size; ++_i4)\n                {\n                  String _elem5; // required\n                  _elem5 = iprot.readString();\n                  struct.racks.add(_elem5);\n                }\n                iprot.readListEnd();\n              }\n              struct.setRacksIsSet(true);\n            } else { \n              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n            }\n            break;\n          case 3: // DELAY_THRESHOLD\n            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {\n              struct.delayThreshold = iprot.readI32();\n              struct.setDelayThresholdIsSet(true);\n            } else { \n              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n            }\n            break;\n          default:\n            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n        }\n        iprot.readFieldEnd();\n      }\n      iprot.readStructEnd();\n\n      // check for required fields of primitive type, which can't be checked in the validate method\n      struct.validate();\n    }\n\n    public void write(org.apache.thrift.protocol.TProtocol oprot, TPlacementPreference struct) throws org.apache.thrift.TException {\n      struct.validate();\n\n      oprot.writeStructBegin(STRUCT_DESC);\n      if (struct.nodes != null) {\n        oprot.writeFieldBegin(NODES_FIELD_DESC);\n        {\n          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.nodes.size()));\n          for (String _iter6 : struct.nodes)\n          {\n            oprot.writeString(_iter6);\n          }\n          oprot.writeListEnd();\n        }\n        oprot.writeFieldEnd();\n      }\n      if (struct.racks != null) {\n        oprot.writeFieldBegin(RACKS_FIELD_DESC);\n        {\n          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.racks.size()));\n          for (String _iter7 : struct.racks)\n          {\n            oprot.writeString(_iter7);\n          }\n          oprot.writeListEnd();\n        }\n        oprot.writeFieldEnd();\n      }\n      oprot.writeFieldBegin(DELAY_THRESHOLD_FIELD_DESC);\n      oprot.writeI32(struct.delayThreshold);\n      oprot.writeFieldEnd();\n      oprot.writeFieldStop();\n      oprot.writeStructEnd();\n    }\n\n  }\n\n  private static class TPlacementPreferenceTupleSchemeFactory implements SchemeFactory {\n    public TPlacementPreferenceTupleScheme getScheme() {\n      return new TPlacementPreferenceTupleScheme();\n    }\n  }\n\n  private static class TPlacementPreferenceTupleScheme extends TupleScheme<TPlacementPreference> {\n\n    @Override\n    public void write(org.apache.thrift.protocol.TProtocol prot, TPlacementPreference struct) throws org.apache.thrift.TException {\n      TTupleProtocol oprot = (TTupleProtocol) prot;\n      BitSet optionals = new BitSet();\n      if (struct.isSetNodes()) {\n        optionals.set(0);\n      }\n      if (struct.isSetRacks()) {\n        optionals.set(1);\n      }\n      if (struct.isSetDelayThreshold()) {\n        optionals.set(2);\n      }\n      oprot.writeBitSet(optionals, 3);\n      if (struct.isSetNodes()) {\n        {\n          oprot.writeI32(struct.nodes.size());\n          for (String _iter8 : struct.nodes)\n          {\n            oprot.writeString(_iter8);\n          }\n        }\n      }\n      if (struct.isSetRacks()) {\n        {\n          oprot.writeI32(struct.racks.size());\n          for (String _iter9 : struct.racks)\n          {\n            oprot.writeString(_iter9);\n          }\n        }\n      }\n      if (struct.isSetDelayThreshold()) {\n        oprot.writeI32(struct.delayThreshold);\n      }\n    }\n\n    @Override\n    public void read(org.apache.thrift.protocol.TProtocol prot, TPlacementPreference struct) throws org.apache.thrift.TException {\n      TTupleProtocol iprot = (TTupleProtocol) prot;\n      BitSet incoming = iprot.readBitSet(3);\n      if (incoming.get(0)) {\n        {\n          org.apache.thrift.protocol.TList _list10 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());\n          struct.nodes = new ArrayList<String>(_list10.size);\n          for (int _i11 = 0; _i11 < _list10.size; ++_i11)\n          {\n            String _elem12; // required\n            _elem12 = iprot.readString();\n            struct.nodes.add(_elem12);\n          }\n        }\n        struct.setNodesIsSet(true);\n      }\n      if (incoming.get(1)) {\n        {\n          org.apache.thrift.protocol.TList _list13 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());\n          struct.racks = new ArrayList<String>(_list13.size);\n          for (int _i14 = 0; _i14 < _list13.size; ++_i14)\n          {\n            String _elem15; // required\n            _elem15 = iprot.readString();\n            struct.racks.add(_elem15);\n          }\n        }\n        struct.setRacksIsSet(true);\n      }\n      if (incoming.get(2)) {\n        struct.delayThreshold = iprot.readI32();\n        struct.setDelayThresholdIsSet(true);\n      }\n    }\n  }\n\n}\n\n"
  },
  {
    "path": "src/main/gen-java/edu/berkeley/sparrow/thrift/TResourceVector.java",
    "content": "/**\n * Autogenerated by Thrift Compiler (0.8.0)\n *\n * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING\n *  @generated\n */\npackage edu.berkeley.sparrow.thrift;\n\nimport org.apache.thrift.scheme.IScheme;\nimport org.apache.thrift.scheme.SchemeFactory;\nimport org.apache.thrift.scheme.StandardScheme;\n\nimport org.apache.thrift.scheme.TupleScheme;\nimport org.apache.thrift.protocol.TTupleProtocol;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.util.HashMap;\nimport java.util.EnumMap;\nimport java.util.Set;\nimport java.util.HashSet;\nimport java.util.EnumSet;\nimport java.util.Collections;\nimport java.util.BitSet;\nimport java.nio.ByteBuffer;\nimport java.util.Arrays;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\npublic class TResourceVector implements org.apache.thrift.TBase<TResourceVector, TResourceVector._Fields>, java.io.Serializable, Cloneable {\n  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct(\"TResourceVector\");\n\n  private static final org.apache.thrift.protocol.TField MEMORY_FIELD_DESC = new org.apache.thrift.protocol.TField(\"memory\", org.apache.thrift.protocol.TType.I64, (short)1);\n  private static final org.apache.thrift.protocol.TField CORES_FIELD_DESC = new org.apache.thrift.protocol.TField(\"cores\", org.apache.thrift.protocol.TType.I32, (short)2);\n\n  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();\n  static {\n    schemes.put(StandardScheme.class, new TResourceVectorStandardSchemeFactory());\n    schemes.put(TupleScheme.class, new TResourceVectorTupleSchemeFactory());\n  }\n\n  public long memory; // required\n  public int cores; // required\n\n  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */\n  public enum _Fields implements org.apache.thrift.TFieldIdEnum {\n    MEMORY((short)1, \"memory\"),\n    CORES((short)2, \"cores\");\n\n    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();\n\n    static {\n      for (_Fields field : EnumSet.allOf(_Fields.class)) {\n        byName.put(field.getFieldName(), field);\n      }\n    }\n\n    /**\n     * Find the _Fields constant that matches fieldId, or null if its not found.\n     */\n    public static _Fields findByThriftId(int fieldId) {\n      switch(fieldId) {\n        case 1: // MEMORY\n          return MEMORY;\n        case 2: // CORES\n          return CORES;\n        default:\n          return null;\n      }\n    }\n\n    /**\n     * Find the _Fields constant that matches fieldId, throwing an exception\n     * if it is not found.\n     */\n    public static _Fields findByThriftIdOrThrow(int fieldId) {\n      _Fields fields = findByThriftId(fieldId);\n      if (fields == null) throw new IllegalArgumentException(\"Field \" + fieldId + \" doesn't exist!\");\n      return fields;\n    }\n\n    /**\n     * Find the _Fields constant that matches name, or null if its not found.\n     */\n    public static _Fields findByName(String name) {\n      return byName.get(name);\n    }\n\n    private final short _thriftId;\n    private final String _fieldName;\n\n    _Fields(short thriftId, String fieldName) {\n      _thriftId = thriftId;\n      _fieldName = fieldName;\n    }\n\n    public short getThriftFieldId() {\n      return _thriftId;\n    }\n\n    public String getFieldName() {\n      return _fieldName;\n    }\n  }\n\n  // isset id assignments\n  private static final int __MEMORY_ISSET_ID = 0;\n  private static final int __CORES_ISSET_ID = 1;\n  private BitSet __isset_bit_vector = new BitSet(2);\n  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;\n  static {\n    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);\n    tmpMap.put(_Fields.MEMORY, new org.apache.thrift.meta_data.FieldMetaData(\"memory\", org.apache.thrift.TFieldRequirementType.DEFAULT, \n        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));\n    tmpMap.put(_Fields.CORES, new org.apache.thrift.meta_data.FieldMetaData(\"cores\", org.apache.thrift.TFieldRequirementType.DEFAULT, \n        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));\n    metaDataMap = Collections.unmodifiableMap(tmpMap);\n    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TResourceVector.class, metaDataMap);\n  }\n\n  public TResourceVector() {\n  }\n\n  public TResourceVector(\n    long memory,\n    int cores)\n  {\n    this();\n    this.memory = memory;\n    setMemoryIsSet(true);\n    this.cores = cores;\n    setCoresIsSet(true);\n  }\n\n  /**\n   * Performs a deep copy on <i>other</i>.\n   */\n  public TResourceVector(TResourceVector other) {\n    __isset_bit_vector.clear();\n    __isset_bit_vector.or(other.__isset_bit_vector);\n    this.memory = other.memory;\n    this.cores = other.cores;\n  }\n\n  public TResourceVector deepCopy() {\n    return new TResourceVector(this);\n  }\n\n  public void clear() {\n    setMemoryIsSet(false);\n    this.memory = 0;\n    setCoresIsSet(false);\n    this.cores = 0;\n  }\n\n  public long getMemory() {\n    return this.memory;\n  }\n\n  public TResourceVector setMemory(long memory) {\n    this.memory = memory;\n    setMemoryIsSet(true);\n    return this;\n  }\n\n  public void unsetMemory() {\n    __isset_bit_vector.clear(__MEMORY_ISSET_ID);\n  }\n\n  /** Returns true if field memory is set (has been assigned a value) and false otherwise */\n  public boolean isSetMemory() {\n    return __isset_bit_vector.get(__MEMORY_ISSET_ID);\n  }\n\n  public void setMemoryIsSet(boolean value) {\n    __isset_bit_vector.set(__MEMORY_ISSET_ID, value);\n  }\n\n  public int getCores() {\n    return this.cores;\n  }\n\n  public TResourceVector setCores(int cores) {\n    this.cores = cores;\n    setCoresIsSet(true);\n    return this;\n  }\n\n  public void unsetCores() {\n    __isset_bit_vector.clear(__CORES_ISSET_ID);\n  }\n\n  /** Returns true if field cores is set (has been assigned a value) and false otherwise */\n  public boolean isSetCores() {\n    return __isset_bit_vector.get(__CORES_ISSET_ID);\n  }\n\n  public void setCoresIsSet(boolean value) {\n    __isset_bit_vector.set(__CORES_ISSET_ID, value);\n  }\n\n  public void setFieldValue(_Fields field, Object value) {\n    switch (field) {\n    case MEMORY:\n      if (value == null) {\n        unsetMemory();\n      } else {\n        setMemory((Long)value);\n      }\n      break;\n\n    case CORES:\n      if (value == null) {\n        unsetCores();\n      } else {\n        setCores((Integer)value);\n      }\n      break;\n\n    }\n  }\n\n  public Object getFieldValue(_Fields field) {\n    switch (field) {\n    case MEMORY:\n      return Long.valueOf(getMemory());\n\n    case CORES:\n      return Integer.valueOf(getCores());\n\n    }\n    throw new IllegalStateException();\n  }\n\n  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */\n  public boolean isSet(_Fields field) {\n    if (field == null) {\n      throw new IllegalArgumentException();\n    }\n\n    switch (field) {\n    case MEMORY:\n      return isSetMemory();\n    case CORES:\n      return isSetCores();\n    }\n    throw new IllegalStateException();\n  }\n\n  @Override\n  public boolean equals(Object that) {\n    if (that == null)\n      return false;\n    if (that instanceof TResourceVector)\n      return this.equals((TResourceVector)that);\n    return false;\n  }\n\n  public boolean equals(TResourceVector that) {\n    if (that == null)\n      return false;\n\n    boolean this_present_memory = true;\n    boolean that_present_memory = true;\n    if (this_present_memory || that_present_memory) {\n      if (!(this_present_memory && that_present_memory))\n        return false;\n      if (this.memory != that.memory)\n        return false;\n    }\n\n    boolean this_present_cores = true;\n    boolean that_present_cores = true;\n    if (this_present_cores || that_present_cores) {\n      if (!(this_present_cores && that_present_cores))\n        return false;\n      if (this.cores != that.cores)\n        return false;\n    }\n\n    return true;\n  }\n\n  @Override\n  public int hashCode() {\n    return 0;\n  }\n\n  public int compareTo(TResourceVector other) {\n    if (!getClass().equals(other.getClass())) {\n      return getClass().getName().compareTo(other.getClass().getName());\n    }\n\n    int lastComparison = 0;\n    TResourceVector typedOther = (TResourceVector)other;\n\n    lastComparison = Boolean.valueOf(isSetMemory()).compareTo(typedOther.isSetMemory());\n    if (lastComparison != 0) {\n      return lastComparison;\n    }\n    if (isSetMemory()) {\n      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.memory, typedOther.memory);\n      if (lastComparison != 0) {\n        return lastComparison;\n      }\n    }\n    lastComparison = Boolean.valueOf(isSetCores()).compareTo(typedOther.isSetCores());\n    if (lastComparison != 0) {\n      return lastComparison;\n    }\n    if (isSetCores()) {\n      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cores, typedOther.cores);\n      if (lastComparison != 0) {\n        return lastComparison;\n      }\n    }\n    return 0;\n  }\n\n  public _Fields fieldForId(int fieldId) {\n    return _Fields.findByThriftId(fieldId);\n  }\n\n  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {\n    schemes.get(iprot.getScheme()).getScheme().read(iprot, this);\n  }\n\n  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {\n    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);\n  }\n\n  @Override\n  public String toString() {\n    StringBuilder sb = new StringBuilder(\"TResourceVector(\");\n    boolean first = true;\n\n    sb.append(\"memory:\");\n    sb.append(this.memory);\n    first = false;\n    if (!first) sb.append(\", \");\n    sb.append(\"cores:\");\n    sb.append(this.cores);\n    first = false;\n    sb.append(\")\");\n    return sb.toString();\n  }\n\n  public void validate() throws org.apache.thrift.TException {\n    // check for required fields\n  }\n\n  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {\n    try {\n      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));\n    } catch (org.apache.thrift.TException te) {\n      throw new java.io.IOException(te.getMessage());\n    }\n  }\n\n  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {\n    try {\n      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.\n      __isset_bit_vector = new BitSet(1);\n      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));\n    } catch (org.apache.thrift.TException te) {\n      throw new java.io.IOException(te.getMessage());\n    }\n  }\n\n  private static class TResourceVectorStandardSchemeFactory implements SchemeFactory {\n    public TResourceVectorStandardScheme getScheme() {\n      return new TResourceVectorStandardScheme();\n    }\n  }\n\n  private static class TResourceVectorStandardScheme extends StandardScheme<TResourceVector> {\n\n    public void read(org.apache.thrift.protocol.TProtocol iprot, TResourceVector struct) throws org.apache.thrift.TException {\n      org.apache.thrift.protocol.TField schemeField;\n      iprot.readStructBegin();\n      while (true)\n      {\n        schemeField = iprot.readFieldBegin();\n        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { \n          break;\n        }\n        switch (schemeField.id) {\n          case 1: // MEMORY\n            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {\n              struct.memory = iprot.readI64();\n              struct.setMemoryIsSet(true);\n            } else { \n              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n            }\n            break;\n          case 2: // CORES\n            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {\n              struct.cores = iprot.readI32();\n              struct.setCoresIsSet(true);\n            } else { \n              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n            }\n            break;\n          default:\n            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n        }\n        iprot.readFieldEnd();\n      }\n      iprot.readStructEnd();\n\n      // check for required fields of primitive type, which can't be checked in the validate method\n      struct.validate();\n    }\n\n    public void write(org.apache.thrift.protocol.TProtocol oprot, TResourceVector struct) throws org.apache.thrift.TException {\n      struct.validate();\n\n      oprot.writeStructBegin(STRUCT_DESC);\n      oprot.writeFieldBegin(MEMORY_FIELD_DESC);\n      oprot.writeI64(struct.memory);\n      oprot.writeFieldEnd();\n      oprot.writeFieldBegin(CORES_FIELD_DESC);\n      oprot.writeI32(struct.cores);\n      oprot.writeFieldEnd();\n      oprot.writeFieldStop();\n      oprot.writeStructEnd();\n    }\n\n  }\n\n  private static class TResourceVectorTupleSchemeFactory implements SchemeFactory {\n    public TResourceVectorTupleScheme getScheme() {\n      return new TResourceVectorTupleScheme();\n    }\n  }\n\n  private static class TResourceVectorTupleScheme extends TupleScheme<TResourceVector> {\n\n    @Override\n    public void write(org.apache.thrift.protocol.TProtocol prot, TResourceVector struct) throws org.apache.thrift.TException {\n      TTupleProtocol oprot = (TTupleProtocol) prot;\n      BitSet optionals = new BitSet();\n      if (struct.isSetMemory()) {\n        optionals.set(0);\n      }\n      if (struct.isSetCores()) {\n        optionals.set(1);\n      }\n      oprot.writeBitSet(optionals, 2);\n      if (struct.isSetMemory()) {\n        oprot.writeI64(struct.memory);\n      }\n      if (struct.isSetCores()) {\n        oprot.writeI32(struct.cores);\n      }\n    }\n\n    @Override\n    public void read(org.apache.thrift.protocol.TProtocol prot, TResourceVector struct) throws org.apache.thrift.TException {\n      TTupleProtocol iprot = (TTupleProtocol) prot;\n      BitSet incoming = iprot.readBitSet(2);\n      if (incoming.get(0)) {\n        struct.memory = iprot.readI64();\n        struct.setMemoryIsSet(true);\n      }\n      if (incoming.get(1)) {\n        struct.cores = iprot.readI32();\n        struct.setCoresIsSet(true);\n      }\n    }\n  }\n\n}\n\n"
  },
  {
    "path": "src/main/gen-java/edu/berkeley/sparrow/thrift/TSchedulingRequest.java",
    "content": "/**\n * Autogenerated by Thrift Compiler (0.8.0)\n *\n * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING\n *  @generated\n */\npackage edu.berkeley.sparrow.thrift;\n\nimport org.apache.thrift.scheme.IScheme;\nimport org.apache.thrift.scheme.SchemeFactory;\nimport org.apache.thrift.scheme.StandardScheme;\n\nimport org.apache.thrift.scheme.TupleScheme;\nimport org.apache.thrift.protocol.TTupleProtocol;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.util.HashMap;\nimport java.util.EnumMap;\nimport java.util.Set;\nimport java.util.HashSet;\nimport java.util.EnumSet;\nimport java.util.Collections;\nimport java.util.BitSet;\nimport java.nio.ByteBuffer;\nimport java.util.Arrays;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\npublic class TSchedulingRequest implements org.apache.thrift.TBase<TSchedulingRequest, TSchedulingRequest._Fields>, java.io.Serializable, Cloneable {\n  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct(\"TSchedulingRequest\");\n\n  private static final org.apache.thrift.protocol.TField APP_FIELD_DESC = new org.apache.thrift.protocol.TField(\"app\", org.apache.thrift.protocol.TType.STRING, (short)1);\n  private static final org.apache.thrift.protocol.TField TASKS_FIELD_DESC = new org.apache.thrift.protocol.TField(\"tasks\", org.apache.thrift.protocol.TType.LIST, (short)2);\n  private static final org.apache.thrift.protocol.TField USER_FIELD_DESC = new org.apache.thrift.protocol.TField(\"user\", org.apache.thrift.protocol.TType.STRUCT, (short)3);\n  private static final org.apache.thrift.protocol.TField DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField(\"description\", org.apache.thrift.protocol.TType.STRING, (short)4);\n  private static final org.apache.thrift.protocol.TField PROBE_RATIO_FIELD_DESC = new org.apache.thrift.protocol.TField(\"probeRatio\", org.apache.thrift.protocol.TType.DOUBLE, (short)5);\n\n  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();\n  static {\n    schemes.put(StandardScheme.class, new TSchedulingRequestStandardSchemeFactory());\n    schemes.put(TupleScheme.class, new TSchedulingRequestTupleSchemeFactory());\n  }\n\n  public String app; // required\n  public List<TTaskSpec> tasks; // required\n  public TUserGroupInfo user; // required\n  public String description; // optional\n  public double probeRatio; // optional\n\n  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */\n  public enum _Fields implements org.apache.thrift.TFieldIdEnum {\n    APP((short)1, \"app\"),\n    TASKS((short)2, \"tasks\"),\n    USER((short)3, \"user\"),\n    DESCRIPTION((short)4, \"description\"),\n    PROBE_RATIO((short)5, \"probeRatio\");\n\n    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();\n\n    static {\n      for (_Fields field : EnumSet.allOf(_Fields.class)) {\n        byName.put(field.getFieldName(), field);\n      }\n    }\n\n    /**\n     * Find the _Fields constant that matches fieldId, or null if its not found.\n     */\n    public static _Fields findByThriftId(int fieldId) {\n      switch(fieldId) {\n        case 1: // APP\n          return APP;\n        case 2: // TASKS\n          return TASKS;\n        case 3: // USER\n          return USER;\n        case 4: // DESCRIPTION\n          return DESCRIPTION;\n        case 5: // PROBE_RATIO\n          return PROBE_RATIO;\n        default:\n          return null;\n      }\n    }\n\n    /**\n     * Find the _Fields constant that matches fieldId, throwing an exception\n     * if it is not found.\n     */\n    public static _Fields findByThriftIdOrThrow(int fieldId) {\n      _Fields fields = findByThriftId(fieldId);\n      if (fields == null) throw new IllegalArgumentException(\"Field \" + fieldId + \" doesn't exist!\");\n      return fields;\n    }\n\n    /**\n     * Find the _Fields constant that matches name, or null if its not found.\n     */\n    public static _Fields findByName(String name) {\n      return byName.get(name);\n    }\n\n    private final short _thriftId;\n    private final String _fieldName;\n\n    _Fields(short thriftId, String fieldName) {\n      _thriftId = thriftId;\n      _fieldName = fieldName;\n    }\n\n    public short getThriftFieldId() {\n      return _thriftId;\n    }\n\n    public String getFieldName() {\n      return _fieldName;\n    }\n  }\n\n  // isset id assignments\n  private static final int __PROBERATIO_ISSET_ID = 0;\n  private BitSet __isset_bit_vector = new BitSet(1);\n  private _Fields optionals[] = {_Fields.DESCRIPTION,_Fields.PROBE_RATIO};\n  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;\n  static {\n    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);\n    tmpMap.put(_Fields.APP, new org.apache.thrift.meta_data.FieldMetaData(\"app\", org.apache.thrift.TFieldRequirementType.DEFAULT, \n        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));\n    tmpMap.put(_Fields.TASKS, new org.apache.thrift.meta_data.FieldMetaData(\"tasks\", org.apache.thrift.TFieldRequirementType.DEFAULT, \n        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, \n            new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TTaskSpec.class))));\n    tmpMap.put(_Fields.USER, new org.apache.thrift.meta_data.FieldMetaData(\"user\", org.apache.thrift.TFieldRequirementType.DEFAULT, \n        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TUserGroupInfo.class)));\n    tmpMap.put(_Fields.DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData(\"description\", org.apache.thrift.TFieldRequirementType.OPTIONAL, \n        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));\n    tmpMap.put(_Fields.PROBE_RATIO, new org.apache.thrift.meta_data.FieldMetaData(\"probeRatio\", org.apache.thrift.TFieldRequirementType.OPTIONAL, \n        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));\n    metaDataMap = Collections.unmodifiableMap(tmpMap);\n    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSchedulingRequest.class, metaDataMap);\n  }\n\n  public TSchedulingRequest() {\n  }\n\n  public TSchedulingRequest(\n    String app,\n    List<TTaskSpec> tasks,\n    TUserGroupInfo user)\n  {\n    this();\n    this.app = app;\n    this.tasks = tasks;\n    this.user = user;\n  }\n\n  /**\n   * Performs a deep copy on <i>other</i>.\n   */\n  public TSchedulingRequest(TSchedulingRequest other) {\n    __isset_bit_vector.clear();\n    __isset_bit_vector.or(other.__isset_bit_vector);\n    if (other.isSetApp()) {\n      this.app = other.app;\n    }\n    if (other.isSetTasks()) {\n      List<TTaskSpec> __this__tasks = new ArrayList<TTaskSpec>();\n      for (TTaskSpec other_element : other.tasks) {\n        __this__tasks.add(new TTaskSpec(other_element));\n      }\n      this.tasks = __this__tasks;\n    }\n    if (other.isSetUser()) {\n      this.user = new TUserGroupInfo(other.user);\n    }\n    if (other.isSetDescription()) {\n      this.description = other.description;\n    }\n    this.probeRatio = other.probeRatio;\n  }\n\n  public TSchedulingRequest deepCopy() {\n    return new TSchedulingRequest(this);\n  }\n\n  public void clear() {\n    this.app = null;\n    this.tasks = null;\n    this.user = null;\n    this.description = null;\n    setProbeRatioIsSet(false);\n    this.probeRatio = 0.0;\n  }\n\n  public String getApp() {\n    return this.app;\n  }\n\n  public TSchedulingRequest setApp(String app) {\n    this.app = app;\n    return this;\n  }\n\n  public void unsetApp() {\n    this.app = null;\n  }\n\n  /** Returns true if field app is set (has been assigned a value) and false otherwise */\n  public boolean isSetApp() {\n    return this.app != null;\n  }\n\n  public void setAppIsSet(boolean value) {\n    if (!value) {\n      this.app = null;\n    }\n  }\n\n  public int getTasksSize() {\n    return (this.tasks == null) ? 0 : this.tasks.size();\n  }\n\n  public java.util.Iterator<TTaskSpec> getTasksIterator() {\n    return (this.tasks == null) ? null : this.tasks.iterator();\n  }\n\n  public void addToTasks(TTaskSpec elem) {\n    if (this.tasks == null) {\n      this.tasks = new ArrayList<TTaskSpec>();\n    }\n    this.tasks.add(elem);\n  }\n\n  public List<TTaskSpec> getTasks() {\n    return this.tasks;\n  }\n\n  public TSchedulingRequest setTasks(List<TTaskSpec> tasks) {\n    this.tasks = tasks;\n    return this;\n  }\n\n  public void unsetTasks() {\n    this.tasks = null;\n  }\n\n  /** Returns true if field tasks is set (has been assigned a value) and false otherwise */\n  public boolean isSetTasks() {\n    return this.tasks != null;\n  }\n\n  public void setTasksIsSet(boolean value) {\n    if (!value) {\n      this.tasks = null;\n    }\n  }\n\n  public TUserGroupInfo getUser() {\n    return this.user;\n  }\n\n  public TSchedulingRequest setUser(TUserGroupInfo user) {\n    this.user = user;\n    return this;\n  }\n\n  public void unsetUser() {\n    this.user = null;\n  }\n\n  /** Returns true if field user is set (has been assigned a value) and false otherwise */\n  public boolean isSetUser() {\n    return this.user != null;\n  }\n\n  public void setUserIsSet(boolean value) {\n    if (!value) {\n      this.user = null;\n    }\n  }\n\n  public String getDescription() {\n    return this.description;\n  }\n\n  public TSchedulingRequest setDescription(String description) {\n    this.description = description;\n    return this;\n  }\n\n  public void unsetDescription() {\n    this.description = null;\n  }\n\n  /** Returns true if field description is set (has been assigned a value) and false otherwise */\n  public boolean isSetDescription() {\n    return this.description != null;\n  }\n\n  public void setDescriptionIsSet(boolean value) {\n    if (!value) {\n      this.description = null;\n    }\n  }\n\n  public double getProbeRatio() {\n    return this.probeRatio;\n  }\n\n  public TSchedulingRequest setProbeRatio(double probeRatio) {\n    this.probeRatio = probeRatio;\n    setProbeRatioIsSet(true);\n    return this;\n  }\n\n  public void unsetProbeRatio() {\n    __isset_bit_vector.clear(__PROBERATIO_ISSET_ID);\n  }\n\n  /** Returns true if field probeRatio is set (has been assigned a value) and false otherwise */\n  public boolean isSetProbeRatio() {\n    return __isset_bit_vector.get(__PROBERATIO_ISSET_ID);\n  }\n\n  public void setProbeRatioIsSet(boolean value) {\n    __isset_bit_vector.set(__PROBERATIO_ISSET_ID, value);\n  }\n\n  public void setFieldValue(_Fields field, Object value) {\n    switch (field) {\n    case APP:\n      if (value == null) {\n        unsetApp();\n      } else {\n        setApp((String)value);\n      }\n      break;\n\n    case TASKS:\n      if (value == null) {\n        unsetTasks();\n      } else {\n        setTasks((List<TTaskSpec>)value);\n      }\n      break;\n\n    case USER:\n      if (value == null) {\n        unsetUser();\n      } else {\n        setUser((TUserGroupInfo)value);\n      }\n      break;\n\n    case DESCRIPTION:\n      if (value == null) {\n        unsetDescription();\n      } else {\n        setDescription((String)value);\n      }\n      break;\n\n    case PROBE_RATIO:\n      if (value == null) {\n        unsetProbeRatio();\n      } else {\n        setProbeRatio((Double)value);\n      }\n      break;\n\n    }\n  }\n\n  public Object getFieldValue(_Fields field) {\n    switch (field) {\n    case APP:\n      return getApp();\n\n    case TASKS:\n      return getTasks();\n\n    case USER:\n      return getUser();\n\n    case DESCRIPTION:\n      return getDescription();\n\n    case PROBE_RATIO:\n      return Double.valueOf(getProbeRatio());\n\n    }\n    throw new IllegalStateException();\n  }\n\n  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */\n  public boolean isSet(_Fields field) {\n    if (field == null) {\n      throw new IllegalArgumentException();\n    }\n\n    switch (field) {\n    case APP:\n      return isSetApp();\n    case TASKS:\n      return isSetTasks();\n    case USER:\n      return isSetUser();\n    case DESCRIPTION:\n      return isSetDescription();\n    case PROBE_RATIO:\n      return isSetProbeRatio();\n    }\n    throw new IllegalStateException();\n  }\n\n  @Override\n  public boolean equals(Object that) {\n    if (that == null)\n      return false;\n    if (that instanceof TSchedulingRequest)\n      return this.equals((TSchedulingRequest)that);\n    return false;\n  }\n\n  public boolean equals(TSchedulingRequest that) {\n    if (that == null)\n      return false;\n\n    boolean this_present_app = true && this.isSetApp();\n    boolean that_present_app = true && that.isSetApp();\n    if (this_present_app || that_present_app) {\n      if (!(this_present_app && that_present_app))\n        return false;\n      if (!this.app.equals(that.app))\n        return false;\n    }\n\n    boolean this_present_tasks = true && this.isSetTasks();\n    boolean that_present_tasks = true && that.isSetTasks();\n    if (this_present_tasks || that_present_tasks) {\n      if (!(this_present_tasks && that_present_tasks))\n        return false;\n      if (!this.tasks.equals(that.tasks))\n        return false;\n    }\n\n    boolean this_present_user = true && this.isSetUser();\n    boolean that_present_user = true && that.isSetUser();\n    if (this_present_user || that_present_user) {\n      if (!(this_present_user && that_present_user))\n        return false;\n      if (!this.user.equals(that.user))\n        return false;\n    }\n\n    boolean this_present_description = true && this.isSetDescription();\n    boolean that_present_description = true && that.isSetDescription();\n    if (this_present_description || that_present_description) {\n      if (!(this_present_description && that_present_description))\n        return false;\n      if (!this.description.equals(that.description))\n        return false;\n    }\n\n    boolean this_present_probeRatio = true && this.isSetProbeRatio();\n    boolean that_present_probeRatio = true && that.isSetProbeRatio();\n    if (this_present_probeRatio || that_present_probeRatio) {\n      if (!(this_present_probeRatio && that_present_probeRatio))\n        return false;\n      if (this.probeRatio != that.probeRatio)\n        return false;\n    }\n\n    return true;\n  }\n\n  @Override\n  public int hashCode() {\n    return 0;\n  }\n\n  public int compareTo(TSchedulingRequest other) {\n    if (!getClass().equals(other.getClass())) {\n      return getClass().getName().compareTo(other.getClass().getName());\n    }\n\n    int lastComparison = 0;\n    TSchedulingRequest typedOther = (TSchedulingRequest)other;\n\n    lastComparison = Boolean.valueOf(isSetApp()).compareTo(typedOther.isSetApp());\n    if (lastComparison != 0) {\n      return lastComparison;\n    }\n    if (isSetApp()) {\n      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.app, typedOther.app);\n      if (lastComparison != 0) {\n        return lastComparison;\n      }\n    }\n    lastComparison = Boolean.valueOf(isSetTasks()).compareTo(typedOther.isSetTasks());\n    if (lastComparison != 0) {\n      return lastComparison;\n    }\n    if (isSetTasks()) {\n      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tasks, typedOther.tasks);\n      if (lastComparison != 0) {\n        return lastComparison;\n      }\n    }\n    lastComparison = Boolean.valueOf(isSetUser()).compareTo(typedOther.isSetUser());\n    if (lastComparison != 0) {\n      return lastComparison;\n    }\n    if (isSetUser()) {\n      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.user, typedOther.user);\n      if (lastComparison != 0) {\n        return lastComparison;\n      }\n    }\n    lastComparison = Boolean.valueOf(isSetDescription()).compareTo(typedOther.isSetDescription());\n    if (lastComparison != 0) {\n      return lastComparison;\n    }\n    if (isSetDescription()) {\n      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.description, typedOther.description);\n      if (lastComparison != 0) {\n        return lastComparison;\n      }\n    }\n    lastComparison = Boolean.valueOf(isSetProbeRatio()).compareTo(typedOther.isSetProbeRatio());\n    if (lastComparison != 0) {\n      return lastComparison;\n    }\n    if (isSetProbeRatio()) {\n      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.probeRatio, typedOther.probeRatio);\n      if (lastComparison != 0) {\n        return lastComparison;\n      }\n    }\n    return 0;\n  }\n\n  public _Fields fieldForId(int fieldId) {\n    return _Fields.findByThriftId(fieldId);\n  }\n\n  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {\n    schemes.get(iprot.getScheme()).getScheme().read(iprot, this);\n  }\n\n  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {\n    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);\n  }\n\n  @Override\n  public String toString() {\n    StringBuilder sb = new StringBuilder(\"TSchedulingRequest(\");\n    boolean first = true;\n\n    sb.append(\"app:\");\n    if (this.app == null) {\n      sb.append(\"null\");\n    } else {\n      sb.append(this.app);\n    }\n    first = false;\n    if (!first) sb.append(\", \");\n    sb.append(\"tasks:\");\n    if (this.tasks == null) {\n      sb.append(\"null\");\n    } else {\n      sb.append(this.tasks);\n    }\n    first = false;\n    if (!first) sb.append(\", \");\n    sb.append(\"user:\");\n    if (this.user == null) {\n      sb.append(\"null\");\n    } else {\n      sb.append(this.user);\n    }\n    first = false;\n    if (isSetDescription()) {\n      if (!first) sb.append(\", \");\n      sb.append(\"description:\");\n      if (this.description == null) {\n        sb.append(\"null\");\n      } else {\n        sb.append(this.description);\n      }\n      first = false;\n    }\n    if (isSetProbeRatio()) {\n      if (!first) sb.append(\", \");\n      sb.append(\"probeRatio:\");\n      sb.append(this.probeRatio);\n      first = false;\n    }\n    sb.append(\")\");\n    return sb.toString();\n  }\n\n  public void validate() throws org.apache.thrift.TException {\n    // check for required fields\n  }\n\n  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {\n    try {\n      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));\n    } catch (org.apache.thrift.TException te) {\n      throw new java.io.IOException(te.getMessage());\n    }\n  }\n\n  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {\n    try {\n      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.\n      __isset_bit_vector = new BitSet(1);\n      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));\n    } catch (org.apache.thrift.TException te) {\n      throw new java.io.IOException(te.getMessage());\n    }\n  }\n\n  private static class TSchedulingRequestStandardSchemeFactory implements SchemeFactory {\n    public TSchedulingRequestStandardScheme getScheme() {\n      return new TSchedulingRequestStandardScheme();\n    }\n  }\n\n  private static class TSchedulingRequestStandardScheme extends StandardScheme<TSchedulingRequest> {\n\n    public void read(org.apache.thrift.protocol.TProtocol iprot, TSchedulingRequest struct) throws org.apache.thrift.TException {\n      org.apache.thrift.protocol.TField schemeField;\n      iprot.readStructBegin();\n      while (true)\n      {\n        schemeField = iprot.readFieldBegin();\n        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { \n          break;\n        }\n        switch (schemeField.id) {\n          case 1: // APP\n            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {\n              struct.app = iprot.readString();\n              struct.setAppIsSet(true);\n            } else { \n              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n            }\n            break;\n          case 2: // TASKS\n            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {\n              {\n                org.apache.thrift.protocol.TList _list16 = iprot.readListBegin();\n                struct.tasks = new ArrayList<TTaskSpec>(_list16.size);\n                for (int _i17 = 0; _i17 < _list16.size; ++_i17)\n                {\n                  TTaskSpec _elem18; // required\n                  _elem18 = new TTaskSpec();\n                  _elem18.read(iprot);\n                  struct.tasks.add(_elem18);\n                }\n                iprot.readListEnd();\n              }\n              struct.setTasksIsSet(true);\n            } else { \n              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n            }\n            break;\n          case 3: // USER\n            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {\n              struct.user = new TUserGroupInfo();\n              struct.user.read(iprot);\n              struct.setUserIsSet(true);\n            } else { \n              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n            }\n            break;\n          case 4: // DESCRIPTION\n            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {\n              struct.description = iprot.readString();\n              struct.setDescriptionIsSet(true);\n            } else { \n              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n            }\n            break;\n          case 5: // PROBE_RATIO\n            if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) {\n              struct.probeRatio = iprot.readDouble();\n              struct.setProbeRatioIsSet(true);\n            } else { \n              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n            }\n            break;\n          default:\n            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n        }\n        iprot.readFieldEnd();\n      }\n      iprot.readStructEnd();\n\n      // check for required fields of primitive type, which can't be checked in the validate method\n      struct.validate();\n    }\n\n    public void write(org.apache.thrift.protocol.TProtocol oprot, TSchedulingRequest struct) throws org.apache.thrift.TException {\n      struct.validate();\n\n      oprot.writeStructBegin(STRUCT_DESC);\n      if (struct.app != null) {\n        oprot.writeFieldBegin(APP_FIELD_DESC);\n        oprot.writeString(struct.app);\n        oprot.writeFieldEnd();\n      }\n      if (struct.tasks != null) {\n        oprot.writeFieldBegin(TASKS_FIELD_DESC);\n        {\n          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.tasks.size()));\n          for (TTaskSpec _iter19 : struct.tasks)\n          {\n            _iter19.write(oprot);\n          }\n          oprot.writeListEnd();\n        }\n        oprot.writeFieldEnd();\n      }\n      if (struct.user != null) {\n        oprot.writeFieldBegin(USER_FIELD_DESC);\n        struct.user.write(oprot);\n        oprot.writeFieldEnd();\n      }\n      if (struct.description != null) {\n        if (struct.isSetDescription()) {\n          oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);\n          oprot.writeString(struct.description);\n          oprot.writeFieldEnd();\n        }\n      }\n      if (struct.isSetProbeRatio()) {\n        oprot.writeFieldBegin(PROBE_RATIO_FIELD_DESC);\n        oprot.writeDouble(struct.probeRatio);\n        oprot.writeFieldEnd();\n      }\n      oprot.writeFieldStop();\n      oprot.writeStructEnd();\n    }\n\n  }\n\n  private static class TSchedulingRequestTupleSchemeFactory implements SchemeFactory {\n    public TSchedulingRequestTupleScheme getScheme() {\n      return new TSchedulingRequestTupleScheme();\n    }\n  }\n\n  private static class TSchedulingRequestTupleScheme extends TupleScheme<TSchedulingRequest> {\n\n    @Override\n    public void write(org.apache.thrift.protocol.TProtocol prot, TSchedulingRequest struct) throws org.apache.thrift.TException {\n      TTupleProtocol oprot = (TTupleProtocol) prot;\n      BitSet optionals = new BitSet();\n      if (struct.isSetApp()) {\n        optionals.set(0);\n      }\n      if (struct.isSetTasks()) {\n        optionals.set(1);\n      }\n      if (struct.isSetUser()) {\n        optionals.set(2);\n      }\n      if (struct.isSetDescription()) {\n        optionals.set(3);\n      }\n      if (struct.isSetProbeRatio()) {\n        optionals.set(4);\n      }\n      oprot.writeBitSet(optionals, 5);\n      if (struct.isSetApp()) {\n        oprot.writeString(struct.app);\n      }\n      if (struct.isSetTasks()) {\n        {\n          oprot.writeI32(struct.tasks.size());\n          for (TTaskSpec _iter20 : struct.tasks)\n          {\n            _iter20.write(oprot);\n          }\n        }\n      }\n      if (struct.isSetUser()) {\n        struct.user.write(oprot);\n      }\n      if (struct.isSetDescription()) {\n        oprot.writeString(struct.description);\n      }\n      if (struct.isSetProbeRatio()) {\n        oprot.writeDouble(struct.probeRatio);\n      }\n    }\n\n    @Override\n    public void read(org.apache.thrift.protocol.TProtocol prot, TSchedulingRequest struct) throws org.apache.thrift.TException {\n      TTupleProtocol iprot = (TTupleProtocol) prot;\n      BitSet incoming = iprot.readBitSet(5);\n      if (incoming.get(0)) {\n        struct.app = iprot.readString();\n        struct.setAppIsSet(true);\n      }\n      if (incoming.get(1)) {\n        {\n          org.apache.thrift.protocol.TList _list21 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());\n          struct.tasks = new ArrayList<TTaskSpec>(_list21.size);\n          for (int _i22 = 0; _i22 < _list21.size; ++_i22)\n          {\n            TTaskSpec _elem23; // required\n            _elem23 = new TTaskSpec();\n            _elem23.read(iprot);\n            struct.tasks.add(_elem23);\n          }\n        }\n        struct.setTasksIsSet(true);\n      }\n      if (incoming.get(2)) {\n        struct.user = new TUserGroupInfo();\n        struct.user.read(iprot);\n        struct.setUserIsSet(true);\n      }\n      if (incoming.get(3)) {\n        struct.description = iprot.readString();\n        struct.setDescriptionIsSet(true);\n      }\n      if (incoming.get(4)) {\n        struct.probeRatio = iprot.readDouble();\n        struct.setProbeRatioIsSet(true);\n      }\n    }\n  }\n\n}\n\n"
  },
  {
    "path": "src/main/gen-java/edu/berkeley/sparrow/thrift/TTaskLaunchSpec.java",
    "content": "/**\n * Autogenerated by Thrift Compiler (0.8.0)\n *\n * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING\n *  @generated\n */\npackage edu.berkeley.sparrow.thrift;\n\nimport org.apache.thrift.scheme.IScheme;\nimport org.apache.thrift.scheme.SchemeFactory;\nimport org.apache.thrift.scheme.StandardScheme;\n\nimport org.apache.thrift.scheme.TupleScheme;\nimport org.apache.thrift.protocol.TTupleProtocol;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.util.HashMap;\nimport java.util.EnumMap;\nimport java.util.Set;\nimport java.util.HashSet;\nimport java.util.EnumSet;\nimport java.util.Collections;\nimport java.util.BitSet;\nimport java.nio.ByteBuffer;\nimport java.util.Arrays;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\npublic class TTaskLaunchSpec implements org.apache.thrift.TBase<TTaskLaunchSpec, TTaskLaunchSpec._Fields>, java.io.Serializable, Cloneable {\n  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct(\"TTaskLaunchSpec\");\n\n  private static final org.apache.thrift.protocol.TField TASK_ID_FIELD_DESC = new org.apache.thrift.protocol.TField(\"taskId\", org.apache.thrift.protocol.TType.STRING, (short)1);\n  private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField(\"message\", org.apache.thrift.protocol.TType.STRING, (short)2);\n\n  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();\n  static {\n    schemes.put(StandardScheme.class, new TTaskLaunchSpecStandardSchemeFactory());\n    schemes.put(TupleScheme.class, new TTaskLaunchSpecTupleSchemeFactory());\n  }\n\n  public String taskId; // required\n  public ByteBuffer message; // required\n\n  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */\n  public enum _Fields implements org.apache.thrift.TFieldIdEnum {\n    TASK_ID((short)1, \"taskId\"),\n    MESSAGE((short)2, \"message\");\n\n    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();\n\n    static {\n      for (_Fields field : EnumSet.allOf(_Fields.class)) {\n        byName.put(field.getFieldName(), field);\n      }\n    }\n\n    /**\n     * Find the _Fields constant that matches fieldId, or null if its not found.\n     */\n    public static _Fields findByThriftId(int fieldId) {\n      switch(fieldId) {\n        case 1: // TASK_ID\n          return TASK_ID;\n        case 2: // MESSAGE\n          return MESSAGE;\n        default:\n          return null;\n      }\n    }\n\n    /**\n     * Find the _Fields constant that matches fieldId, throwing an exception\n     * if it is not found.\n     */\n    public static _Fields findByThriftIdOrThrow(int fieldId) {\n      _Fields fields = findByThriftId(fieldId);\n      if (fields == null) throw new IllegalArgumentException(\"Field \" + fieldId + \" doesn't exist!\");\n      return fields;\n    }\n\n    /**\n     * Find the _Fields constant that matches name, or null if its not found.\n     */\n    public static _Fields findByName(String name) {\n      return byName.get(name);\n    }\n\n    private final short _thriftId;\n    private final String _fieldName;\n\n    _Fields(short thriftId, String fieldName) {\n      _thriftId = thriftId;\n      _fieldName = fieldName;\n    }\n\n    public short getThriftFieldId() {\n      return _thriftId;\n    }\n\n    public String getFieldName() {\n      return _fieldName;\n    }\n  }\n\n  // isset id assignments\n  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;\n  static {\n    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);\n    tmpMap.put(_Fields.TASK_ID, new org.apache.thrift.meta_data.FieldMetaData(\"taskId\", org.apache.thrift.TFieldRequirementType.DEFAULT, \n        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));\n    tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData(\"message\", org.apache.thrift.TFieldRequirementType.DEFAULT, \n        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING        , true)));\n    metaDataMap = Collections.unmodifiableMap(tmpMap);\n    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TTaskLaunchSpec.class, metaDataMap);\n  }\n\n  public TTaskLaunchSpec() {\n  }\n\n  public TTaskLaunchSpec(\n    String taskId,\n    ByteBuffer message)\n  {\n    this();\n    this.taskId = taskId;\n    this.message = message;\n  }\n\n  /**\n   * Performs a deep copy on <i>other</i>.\n   */\n  public TTaskLaunchSpec(TTaskLaunchSpec other) {\n    if (other.isSetTaskId()) {\n      this.taskId = other.taskId;\n    }\n    if (other.isSetMessage()) {\n      this.message = org.apache.thrift.TBaseHelper.copyBinary(other.message);\n;\n    }\n  }\n\n  public TTaskLaunchSpec deepCopy() {\n    return new TTaskLaunchSpec(this);\n  }\n\n  public void clear() {\n    this.taskId = null;\n    this.message = null;\n  }\n\n  public String getTaskId() {\n    return this.taskId;\n  }\n\n  public TTaskLaunchSpec setTaskId(String taskId) {\n    this.taskId = taskId;\n    return this;\n  }\n\n  public void unsetTaskId() {\n    this.taskId = null;\n  }\n\n  /** Returns true if field taskId is set (has been assigned a value) and false otherwise */\n  public boolean isSetTaskId() {\n    return this.taskId != null;\n  }\n\n  public void setTaskIdIsSet(boolean value) {\n    if (!value) {\n      this.taskId = null;\n    }\n  }\n\n  public byte[] getMessage() {\n    setMessage(org.apache.thrift.TBaseHelper.rightSize(message));\n    return message == null ? null : message.array();\n  }\n\n  public ByteBuffer bufferForMessage() {\n    return message;\n  }\n\n  public TTaskLaunchSpec setMessage(byte[] message) {\n    setMessage(message == null ? (ByteBuffer)null : ByteBuffer.wrap(message));\n    return this;\n  }\n\n  public TTaskLaunchSpec setMessage(ByteBuffer message) {\n    this.message = message;\n    return this;\n  }\n\n  public void unsetMessage() {\n    this.message = null;\n  }\n\n  /** Returns true if field message is set (has been assigned a value) and false otherwise */\n  public boolean isSetMessage() {\n    return this.message != null;\n  }\n\n  public void setMessageIsSet(boolean value) {\n    if (!value) {\n      this.message = null;\n    }\n  }\n\n  public void setFieldValue(_Fields field, Object value) {\n    switch (field) {\n    case TASK_ID:\n      if (value == null) {\n        unsetTaskId();\n      } else {\n        setTaskId((String)value);\n      }\n      break;\n\n    case MESSAGE:\n      if (value == null) {\n        unsetMessage();\n      } else {\n        setMessage((ByteBuffer)value);\n      }\n      break;\n\n    }\n  }\n\n  public Object getFieldValue(_Fields field) {\n    switch (field) {\n    case TASK_ID:\n      return getTaskId();\n\n    case MESSAGE:\n      return getMessage();\n\n    }\n    throw new IllegalStateException();\n  }\n\n  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */\n  public boolean isSet(_Fields field) {\n    if (field == null) {\n      throw new IllegalArgumentException();\n    }\n\n    switch (field) {\n    case TASK_ID:\n      return isSetTaskId();\n    case MESSAGE:\n      return isSetMessage();\n    }\n    throw new IllegalStateException();\n  }\n\n  @Override\n  public boolean equals(Object that) {\n    if (that == null)\n      return false;\n    if (that instanceof TTaskLaunchSpec)\n      return this.equals((TTaskLaunchSpec)that);\n    return false;\n  }\n\n  public boolean equals(TTaskLaunchSpec that) {\n    if (that == null)\n      return false;\n\n    boolean this_present_taskId = true && this.isSetTaskId();\n    boolean that_present_taskId = true && that.isSetTaskId();\n    if (this_present_taskId || that_present_taskId) {\n      if (!(this_present_taskId && that_present_taskId))\n        return false;\n      if (!this.taskId.equals(that.taskId))\n        return false;\n    }\n\n    boolean this_present_message = true && this.isSetMessage();\n    boolean that_present_message = true && that.isSetMessage();\n    if (this_present_message || that_present_message) {\n      if (!(this_present_message && that_present_message))\n        return false;\n      if (!this.message.equals(that.message))\n        return false;\n    }\n\n    return true;\n  }\n\n  @Override\n  public int hashCode() {\n    return 0;\n  }\n\n  public int compareTo(TTaskLaunchSpec other) {\n    if (!getClass().equals(other.getClass())) {\n      return getClass().getName().compareTo(other.getClass().getName());\n    }\n\n    int lastComparison = 0;\n    TTaskLaunchSpec typedOther = (TTaskLaunchSpec)other;\n\n    lastComparison = Boolean.valueOf(isSetTaskId()).compareTo(typedOther.isSetTaskId());\n    if (lastComparison != 0) {\n      return lastComparison;\n    }\n    if (isSetTaskId()) {\n      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.taskId, typedOther.taskId);\n      if (lastComparison != 0) {\n        return lastComparison;\n      }\n    }\n    lastComparison = Boolean.valueOf(isSetMessage()).compareTo(typedOther.isSetMessage());\n    if (lastComparison != 0) {\n      return lastComparison;\n    }\n    if (isSetMessage()) {\n      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, typedOther.message);\n      if (lastComparison != 0) {\n        return lastComparison;\n      }\n    }\n    return 0;\n  }\n\n  public _Fields fieldForId(int fieldId) {\n    return _Fields.findByThriftId(fieldId);\n  }\n\n  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {\n    schemes.get(iprot.getScheme()).getScheme().read(iprot, this);\n  }\n\n  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {\n    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);\n  }\n\n  @Override\n  public String toString() {\n    StringBuilder sb = new StringBuilder(\"TTaskLaunchSpec(\");\n    boolean first = true;\n\n    sb.append(\"taskId:\");\n    if (this.taskId == null) {\n      sb.append(\"null\");\n    } else {\n      sb.append(this.taskId);\n    }\n    first = false;\n    if (!first) sb.append(\", \");\n    sb.append(\"message:\");\n    if (this.message == null) {\n      sb.append(\"null\");\n    } else {\n      org.apache.thrift.TBaseHelper.toString(this.message, sb);\n    }\n    first = false;\n    sb.append(\")\");\n    return sb.toString();\n  }\n\n  public void validate() throws org.apache.thrift.TException {\n    // check for required fields\n  }\n\n  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {\n    try {\n      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));\n    } catch (org.apache.thrift.TException te) {\n      throw new java.io.IOException(te.getMessage());\n    }\n  }\n\n  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {\n    try {\n      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));\n    } catch (org.apache.thrift.TException te) {\n      throw new java.io.IOException(te.getMessage());\n    }\n  }\n\n  private static class TTaskLaunchSpecStandardSchemeFactory implements SchemeFactory {\n    public TTaskLaunchSpecStandardScheme getScheme() {\n      return new TTaskLaunchSpecStandardScheme();\n    }\n  }\n\n  private static class TTaskLaunchSpecStandardScheme extends StandardScheme<TTaskLaunchSpec> {\n\n    public void read(org.apache.thrift.protocol.TProtocol iprot, TTaskLaunchSpec struct) throws org.apache.thrift.TException {\n      org.apache.thrift.protocol.TField schemeField;\n      iprot.readStructBegin();\n      while (true)\n      {\n        schemeField = iprot.readFieldBegin();\n        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { \n          break;\n        }\n        switch (schemeField.id) {\n          case 1: // TASK_ID\n            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {\n              struct.taskId = iprot.readString();\n              struct.setTaskIdIsSet(true);\n            } else { \n              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n            }\n            break;\n          case 2: // MESSAGE\n            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {\n              struct.message = iprot.readBinary();\n              struct.setMessageIsSet(true);\n            } else { \n              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n            }\n            break;\n          default:\n            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n        }\n        iprot.readFieldEnd();\n      }\n      iprot.readStructEnd();\n\n      // check for required fields of primitive type, which can't be checked in the validate method\n      struct.validate();\n    }\n\n    public void write(org.apache.thrift.protocol.TProtocol oprot, TTaskLaunchSpec struct) throws org.apache.thrift.TException {\n      struct.validate();\n\n      oprot.writeStructBegin(STRUCT_DESC);\n      if (struct.taskId != null) {\n        oprot.writeFieldBegin(TASK_ID_FIELD_DESC);\n        oprot.writeString(struct.taskId);\n        oprot.writeFieldEnd();\n      }\n      if (struct.message != null) {\n        oprot.writeFieldBegin(MESSAGE_FIELD_DESC);\n        oprot.writeBinary(struct.message);\n        oprot.writeFieldEnd();\n      }\n      oprot.writeFieldStop();\n      oprot.writeStructEnd();\n    }\n\n  }\n\n  private static class TTaskLaunchSpecTupleSchemeFactory implements SchemeFactory {\n    public TTaskLaunchSpecTupleScheme getScheme() {\n      return new TTaskLaunchSpecTupleScheme();\n    }\n  }\n\n  private static class TTaskLaunchSpecTupleScheme extends TupleScheme<TTaskLaunchSpec> {\n\n    @Override\n    public void write(org.apache.thrift.protocol.TProtocol prot, TTaskLaunchSpec struct) throws org.apache.thrift.TException {\n      TTupleProtocol oprot = (TTupleProtocol) prot;\n      BitSet optionals = new BitSet();\n      if (struct.isSetTaskId()) {\n        optionals.set(0);\n      }\n      if (struct.isSetMessage()) {\n        optionals.set(1);\n      }\n      oprot.writeBitSet(optionals, 2);\n      if (struct.isSetTaskId()) {\n        oprot.writeString(struct.taskId);\n      }\n      if (struct.isSetMessage()) {\n        oprot.writeBinary(struct.message);\n      }\n    }\n\n    @Override\n    public void read(org.apache.thrift.protocol.TProtocol prot, TTaskLaunchSpec struct) throws org.apache.thrift.TException {\n      TTupleProtocol iprot = (TTupleProtocol) prot;\n      BitSet incoming = iprot.readBitSet(2);\n      if (incoming.get(0)) {\n        struct.taskId = iprot.readString();\n        struct.setTaskIdIsSet(true);\n      }\n      if (incoming.get(1)) {\n        struct.message = iprot.readBinary();\n        struct.setMessageIsSet(true);\n      }\n    }\n  }\n\n}\n\n"
  },
  {
    "path": "src/main/gen-java/edu/berkeley/sparrow/thrift/TTaskSpec.java",
    "content": "/**\n * Autogenerated by Thrift Compiler (0.8.0)\n *\n * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING\n *  @generated\n */\npackage edu.berkeley.sparrow.thrift;\n\nimport org.apache.thrift.scheme.IScheme;\nimport org.apache.thrift.scheme.SchemeFactory;\nimport org.apache.thrift.scheme.StandardScheme;\n\nimport org.apache.thrift.scheme.TupleScheme;\nimport org.apache.thrift.protocol.TTupleProtocol;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.util.HashMap;\nimport java.util.EnumMap;\nimport java.util.Set;\nimport java.util.HashSet;\nimport java.util.EnumSet;\nimport java.util.Collections;\nimport java.util.BitSet;\nimport java.nio.ByteBuffer;\nimport java.util.Arrays;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\npublic class TTaskSpec implements org.apache.thrift.TBase<TTaskSpec, TTaskSpec._Fields>, java.io.Serializable, Cloneable {\n  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct(\"TTaskSpec\");\n\n  private static final org.apache.thrift.protocol.TField TASK_ID_FIELD_DESC = new org.apache.thrift.protocol.TField(\"taskId\", org.apache.thrift.protocol.TType.STRING, (short)1);\n  private static final org.apache.thrift.protocol.TField PREFERENCE_FIELD_DESC = new org.apache.thrift.protocol.TField(\"preference\", org.apache.thrift.protocol.TType.STRUCT, (short)2);\n  private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField(\"message\", org.apache.thrift.protocol.TType.STRING, (short)3);\n\n  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();\n  static {\n    schemes.put(StandardScheme.class, new TTaskSpecStandardSchemeFactory());\n    schemes.put(TupleScheme.class, new TTaskSpecTupleSchemeFactory());\n  }\n\n  public String taskId; // required\n  public TPlacementPreference preference; // required\n  public ByteBuffer message; // required\n\n  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */\n  public enum _Fields implements org.apache.thrift.TFieldIdEnum {\n    TASK_ID((short)1, \"taskId\"),\n    PREFERENCE((short)2, \"preference\"),\n    MESSAGE((short)3, \"message\");\n\n    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();\n\n    static {\n      for (_Fields field : EnumSet.allOf(_Fields.class)) {\n        byName.put(field.getFieldName(), field);\n      }\n    }\n\n    /**\n     * Find the _Fields constant that matches fieldId, or null if its not found.\n     */\n    public static _Fields findByThriftId(int fieldId) {\n      switch(fieldId) {\n        case 1: // TASK_ID\n          return TASK_ID;\n        case 2: // PREFERENCE\n          return PREFERENCE;\n        case 3: // MESSAGE\n          return MESSAGE;\n        default:\n          return null;\n      }\n    }\n\n    /**\n     * Find the _Fields constant that matches fieldId, throwing an exception\n     * if it is not found.\n     */\n    public static _Fields findByThriftIdOrThrow(int fieldId) {\n      _Fields fields = findByThriftId(fieldId);\n      if (fields == null) throw new IllegalArgumentException(\"Field \" + fieldId + \" doesn't exist!\");\n      return fields;\n    }\n\n    /**\n     * Find the _Fields constant that matches name, or null if its not found.\n     */\n    public static _Fields findByName(String name) {\n      return byName.get(name);\n    }\n\n    private final short _thriftId;\n    private final String _fieldName;\n\n    _Fields(short thriftId, String fieldName) {\n      _thriftId = thriftId;\n      _fieldName = fieldName;\n    }\n\n    public short getThriftFieldId() {\n      return _thriftId;\n    }\n\n    public String getFieldName() {\n      return _fieldName;\n    }\n  }\n\n  // isset id assignments\n  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;\n  static {\n    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);\n    tmpMap.put(_Fields.TASK_ID, new org.apache.thrift.meta_data.FieldMetaData(\"taskId\", org.apache.thrift.TFieldRequirementType.DEFAULT, \n        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));\n    tmpMap.put(_Fields.PREFERENCE, new org.apache.thrift.meta_data.FieldMetaData(\"preference\", org.apache.thrift.TFieldRequirementType.DEFAULT, \n        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TPlacementPreference.class)));\n    tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData(\"message\", org.apache.thrift.TFieldRequirementType.DEFAULT, \n        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING        , true)));\n    metaDataMap = Collections.unmodifiableMap(tmpMap);\n    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TTaskSpec.class, metaDataMap);\n  }\n\n  public TTaskSpec() {\n  }\n\n  public TTaskSpec(\n    String taskId,\n    TPlacementPreference preference,\n    ByteBuffer message)\n  {\n    this();\n    this.taskId = taskId;\n    this.preference = preference;\n    this.message = message;\n  }\n\n  /**\n   * Performs a deep copy on <i>other</i>.\n   */\n  public TTaskSpec(TTaskSpec other) {\n    if (other.isSetTaskId()) {\n      this.taskId = other.taskId;\n    }\n    if (other.isSetPreference()) {\n      this.preference = new TPlacementPreference(other.preference);\n    }\n    if (other.isSetMessage()) {\n      this.message = org.apache.thrift.TBaseHelper.copyBinary(other.message);\n;\n    }\n  }\n\n  public TTaskSpec deepCopy() {\n    return new TTaskSpec(this);\n  }\n\n  public void clear() {\n    this.taskId = null;\n    this.preference = null;\n    this.message = null;\n  }\n\n  public String getTaskId() {\n    return this.taskId;\n  }\n\n  public TTaskSpec setTaskId(String taskId) {\n    this.taskId = taskId;\n    return this;\n  }\n\n  public void unsetTaskId() {\n    this.taskId = null;\n  }\n\n  /** Returns true if field taskId is set (has been assigned a value) and false otherwise */\n  public boolean isSetTaskId() {\n    return this.taskId != null;\n  }\n\n  public void setTaskIdIsSet(boolean value) {\n    if (!value) {\n      this.taskId = null;\n    }\n  }\n\n  public TPlacementPreference getPreference() {\n    return this.preference;\n  }\n\n  public TTaskSpec setPreference(TPlacementPreference preference) {\n    this.preference = preference;\n    return this;\n  }\n\n  public void unsetPreference() {\n    this.preference = null;\n  }\n\n  /** Returns true if field preference is set (has been assigned a value) and false otherwise */\n  public boolean isSetPreference() {\n    return this.preference != null;\n  }\n\n  public void setPreferenceIsSet(boolean value) {\n    if (!value) {\n      this.preference = null;\n    }\n  }\n\n  public byte[] getMessage() {\n    setMessage(org.apache.thrift.TBaseHelper.rightSize(message));\n    return message == null ? null : message.array();\n  }\n\n  public ByteBuffer bufferForMessage() {\n    return message;\n  }\n\n  public TTaskSpec setMessage(byte[] message) {\n    setMessage(message == null ? (ByteBuffer)null : ByteBuffer.wrap(message));\n    return this;\n  }\n\n  public TTaskSpec setMessage(ByteBuffer message) {\n    this.message = message;\n    return this;\n  }\n\n  public void unsetMessage() {\n    this.message = null;\n  }\n\n  /** Returns true if field message is set (has been assigned a value) and false otherwise */\n  public boolean isSetMessage() {\n    return this.message != null;\n  }\n\n  public void setMessageIsSet(boolean value) {\n    if (!value) {\n      this.message = null;\n    }\n  }\n\n  public void setFieldValue(_Fields field, Object value) {\n    switch (field) {\n    case TASK_ID:\n      if (value == null) {\n        unsetTaskId();\n      } else {\n        setTaskId((String)value);\n      }\n      break;\n\n    case PREFERENCE:\n      if (value == null) {\n        unsetPreference();\n      } else {\n        setPreference((TPlacementPreference)value);\n      }\n      break;\n\n    case MESSAGE:\n      if (value == null) {\n        unsetMessage();\n      } else {\n        setMessage((ByteBuffer)value);\n      }\n      break;\n\n    }\n  }\n\n  public Object getFieldValue(_Fields field) {\n    switch (field) {\n    case TASK_ID:\n      return getTaskId();\n\n    case PREFERENCE:\n      return getPreference();\n\n    case MESSAGE:\n      return getMessage();\n\n    }\n    throw new IllegalStateException();\n  }\n\n  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */\n  public boolean isSet(_Fields field) {\n    if (field == null) {\n      throw new IllegalArgumentException();\n    }\n\n    switch (field) {\n    case TASK_ID:\n      return isSetTaskId();\n    case PREFERENCE:\n      return isSetPreference();\n    case MESSAGE:\n      return isSetMessage();\n    }\n    throw new IllegalStateException();\n  }\n\n  @Override\n  public boolean equals(Object that) {\n    if (that == null)\n      return false;\n    if (that instanceof TTaskSpec)\n      return this.equals((TTaskSpec)that);\n    return false;\n  }\n\n  public boolean equals(TTaskSpec that) {\n    if (that == null)\n      return false;\n\n    boolean this_present_taskId = true && this.isSetTaskId();\n    boolean that_present_taskId = true && that.isSetTaskId();\n    if (this_present_taskId || that_present_taskId) {\n      if (!(this_present_taskId && that_present_taskId))\n        return false;\n      if (!this.taskId.equals(that.taskId))\n        return false;\n    }\n\n    boolean this_present_preference = true && this.isSetPreference();\n    boolean that_present_preference = true && that.isSetPreference();\n    if (this_present_preference || that_present_preference) {\n      if (!(this_present_preference && that_present_preference))\n        return false;\n      if (!this.preference.equals(that.preference))\n        return false;\n    }\n\n    boolean this_present_message = true && this.isSetMessage();\n    boolean that_present_message = true && that.isSetMessage();\n    if (this_present_message || that_present_message) {\n      if (!(this_present_message && that_present_message))\n        return false;\n      if (!this.message.equals(that.message))\n        return false;\n    }\n\n    return true;\n  }\n\n  @Override\n  public int hashCode() {\n    return 0;\n  }\n\n  public int compareTo(TTaskSpec other) {\n    if (!getClass().equals(other.getClass())) {\n      return getClass().getName().compareTo(other.getClass().getName());\n    }\n\n    int lastComparison = 0;\n    TTaskSpec typedOther = (TTaskSpec)other;\n\n    lastComparison = Boolean.valueOf(isSetTaskId()).compareTo(typedOther.isSetTaskId());\n    if (lastComparison != 0) {\n      return lastComparison;\n    }\n    if (isSetTaskId()) {\n      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.taskId, typedOther.taskId);\n      if (lastComparison != 0) {\n        return lastComparison;\n      }\n    }\n    lastComparison = Boolean.valueOf(isSetPreference()).compareTo(typedOther.isSetPreference());\n    if (lastComparison != 0) {\n      return lastComparison;\n    }\n    if (isSetPreference()) {\n      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.preference, typedOther.preference);\n      if (lastComparison != 0) {\n        return lastComparison;\n      }\n    }\n    lastComparison = Boolean.valueOf(isSetMessage()).compareTo(typedOther.isSetMessage());\n    if (lastComparison != 0) {\n      return lastComparison;\n    }\n    if (isSetMessage()) {\n      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, typedOther.message);\n      if (lastComparison != 0) {\n        return lastComparison;\n      }\n    }\n    return 0;\n  }\n\n  public _Fields fieldForId(int fieldId) {\n    return _Fields.findByThriftId(fieldId);\n  }\n\n  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {\n    schemes.get(iprot.getScheme()).getScheme().read(iprot, this);\n  }\n\n  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {\n    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);\n  }\n\n  @Override\n  public String toString() {\n    StringBuilder sb = new StringBuilder(\"TTaskSpec(\");\n    boolean first = true;\n\n    sb.append(\"taskId:\");\n    if (this.taskId == null) {\n      sb.append(\"null\");\n    } else {\n      sb.append(this.taskId);\n    }\n    first = false;\n    if (!first) sb.append(\", \");\n    sb.append(\"preference:\");\n    if (this.preference == null) {\n      sb.append(\"null\");\n    } else {\n      sb.append(this.preference);\n    }\n    first = false;\n    if (!first) sb.append(\", \");\n    sb.append(\"message:\");\n    if (this.message == null) {\n      sb.append(\"null\");\n    } else {\n      org.apache.thrift.TBaseHelper.toString(this.message, sb);\n    }\n    first = false;\n    sb.append(\")\");\n    return sb.toString();\n  }\n\n  public void validate() throws org.apache.thrift.TException {\n    // check for required fields\n  }\n\n  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {\n    try {\n      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));\n    } catch (org.apache.thrift.TException te) {\n      throw new java.io.IOException(te.getMessage());\n    }\n  }\n\n  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {\n    try {\n      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));\n    } catch (org.apache.thrift.TException te) {\n      throw new java.io.IOException(te.getMessage());\n    }\n  }\n\n  private static class TTaskSpecStandardSchemeFactory implements SchemeFactory {\n    public TTaskSpecStandardScheme getScheme() {\n      return new TTaskSpecStandardScheme();\n    }\n  }\n\n  private static class TTaskSpecStandardScheme extends StandardScheme<TTaskSpec> {\n\n    public void read(org.apache.thrift.protocol.TProtocol iprot, TTaskSpec struct) throws org.apache.thrift.TException {\n      org.apache.thrift.protocol.TField schemeField;\n      iprot.readStructBegin();\n      while (true)\n      {\n        schemeField = iprot.readFieldBegin();\n        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { \n          break;\n        }\n        switch (schemeField.id) {\n          case 1: // TASK_ID\n            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {\n              struct.taskId = iprot.readString();\n              struct.setTaskIdIsSet(true);\n            } else { \n              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n            }\n            break;\n          case 2: // PREFERENCE\n            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {\n              struct.preference = new TPlacementPreference();\n              struct.preference.read(iprot);\n              struct.setPreferenceIsSet(true);\n            } else { \n              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n            }\n            break;\n          case 3: // MESSAGE\n            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {\n              struct.message = iprot.readBinary();\n              struct.setMessageIsSet(true);\n            } else { \n              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n            }\n            break;\n          default:\n            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n        }\n        iprot.readFieldEnd();\n      }\n      iprot.readStructEnd();\n\n      // check for required fields of primitive type, which can't be checked in the validate method\n      struct.validate();\n    }\n\n    public void write(org.apache.thrift.protocol.TProtocol oprot, TTaskSpec struct) throws org.apache.thrift.TException {\n      struct.validate();\n\n      oprot.writeStructBegin(STRUCT_DESC);\n      if (struct.taskId != null) {\n        oprot.writeFieldBegin(TASK_ID_FIELD_DESC);\n        oprot.writeString(struct.taskId);\n        oprot.writeFieldEnd();\n      }\n      if (struct.preference != null) {\n        oprot.writeFieldBegin(PREFERENCE_FIELD_DESC);\n        struct.preference.write(oprot);\n        oprot.writeFieldEnd();\n      }\n      if (struct.message != null) {\n        oprot.writeFieldBegin(MESSAGE_FIELD_DESC);\n        oprot.writeBinary(struct.message);\n        oprot.writeFieldEnd();\n      }\n      oprot.writeFieldStop();\n      oprot.writeStructEnd();\n    }\n\n  }\n\n  private static class TTaskSpecTupleSchemeFactory implements SchemeFactory {\n    public TTaskSpecTupleScheme getScheme() {\n      return new TTaskSpecTupleScheme();\n    }\n  }\n\n  private static class TTaskSpecTupleScheme extends TupleScheme<TTaskSpec> {\n\n    @Override\n    public void write(org.apache.thrift.protocol.TProtocol prot, TTaskSpec struct) throws org.apache.thrift.TException {\n      TTupleProtocol oprot = (TTupleProtocol) prot;\n      BitSet optionals = new BitSet();\n      if (struct.isSetTaskId()) {\n        optionals.set(0);\n      }\n      if (struct.isSetPreference()) {\n        optionals.set(1);\n      }\n      if (struct.isSetMessage()) {\n        optionals.set(2);\n      }\n      oprot.writeBitSet(optionals, 3);\n      if (struct.isSetTaskId()) {\n        oprot.writeString(struct.taskId);\n      }\n      if (struct.isSetPreference()) {\n        struct.preference.write(oprot);\n      }\n      if (struct.isSetMessage()) {\n        oprot.writeBinary(struct.message);\n      }\n    }\n\n    @Override\n    public void read(org.apache.thrift.protocol.TProtocol prot, TTaskSpec struct) throws org.apache.thrift.TException {\n      TTupleProtocol iprot = (TTupleProtocol) prot;\n      BitSet incoming = iprot.readBitSet(3);\n      if (incoming.get(0)) {\n        struct.taskId = iprot.readString();\n        struct.setTaskIdIsSet(true);\n      }\n      if (incoming.get(1)) {\n        struct.preference = new TPlacementPreference();\n        struct.preference.read(iprot);\n        struct.setPreferenceIsSet(true);\n      }\n      if (incoming.get(2)) {\n        struct.message = iprot.readBinary();\n        struct.setMessageIsSet(true);\n      }\n    }\n  }\n\n}\n\n"
  },
  {
    "path": "src/main/gen-java/edu/berkeley/sparrow/thrift/TUserGroupInfo.java",
    "content": "/**\n * Autogenerated by Thrift Compiler (0.8.0)\n *\n * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING\n *  @generated\n */\npackage edu.berkeley.sparrow.thrift;\n\nimport org.apache.thrift.scheme.IScheme;\nimport org.apache.thrift.scheme.SchemeFactory;\nimport org.apache.thrift.scheme.StandardScheme;\n\nimport org.apache.thrift.scheme.TupleScheme;\nimport org.apache.thrift.protocol.TTupleProtocol;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.util.HashMap;\nimport java.util.EnumMap;\nimport java.util.Set;\nimport java.util.HashSet;\nimport java.util.EnumSet;\nimport java.util.Collections;\nimport java.util.BitSet;\nimport java.nio.ByteBuffer;\nimport java.util.Arrays;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\npublic class TUserGroupInfo implements org.apache.thrift.TBase<TUserGroupInfo, TUserGroupInfo._Fields>, java.io.Serializable, Cloneable {\n  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct(\"TUserGroupInfo\");\n\n  private static final org.apache.thrift.protocol.TField USER_FIELD_DESC = new org.apache.thrift.protocol.TField(\"user\", org.apache.thrift.protocol.TType.STRING, (short)1);\n  private static final org.apache.thrift.protocol.TField GROUP_FIELD_DESC = new org.apache.thrift.protocol.TField(\"group\", org.apache.thrift.protocol.TType.STRING, (short)2);\n  private static final org.apache.thrift.protocol.TField PRIORITY_FIELD_DESC = new org.apache.thrift.protocol.TField(\"priority\", org.apache.thrift.protocol.TType.I32, (short)3);\n\n  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();\n  static {\n    schemes.put(StandardScheme.class, new TUserGroupInfoStandardSchemeFactory());\n    schemes.put(TupleScheme.class, new TUserGroupInfoTupleSchemeFactory());\n  }\n\n  public String user; // required\n  public String group; // required\n  public int priority; // required\n\n  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */\n  public enum _Fields implements org.apache.thrift.TFieldIdEnum {\n    USER((short)1, \"user\"),\n    GROUP((short)2, \"group\"),\n    PRIORITY((short)3, \"priority\");\n\n    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();\n\n    static {\n      for (_Fields field : EnumSet.allOf(_Fields.class)) {\n        byName.put(field.getFieldName(), field);\n      }\n    }\n\n    /**\n     * Find the _Fields constant that matches fieldId, or null if its not found.\n     */\n    public static _Fields findByThriftId(int fieldId) {\n      switch(fieldId) {\n        case 1: // USER\n          return USER;\n        case 2: // GROUP\n          return GROUP;\n        case 3: // PRIORITY\n          return PRIORITY;\n        default:\n          return null;\n      }\n    }\n\n    /**\n     * Find the _Fields constant that matches fieldId, throwing an exception\n     * if it is not found.\n     */\n    public static _Fields findByThriftIdOrThrow(int fieldId) {\n      _Fields fields = findByThriftId(fieldId);\n      if (fields == null) throw new IllegalArgumentException(\"Field \" + fieldId + \" doesn't exist!\");\n      return fields;\n    }\n\n    /**\n     * Find the _Fields constant that matches name, or null if its not found.\n     */\n    public static _Fields findByName(String name) {\n      return byName.get(name);\n    }\n\n    private final short _thriftId;\n    private final String _fieldName;\n\n    _Fields(short thriftId, String fieldName) {\n      _thriftId = thriftId;\n      _fieldName = fieldName;\n    }\n\n    public short getThriftFieldId() {\n      return _thriftId;\n    }\n\n    public String getFieldName() {\n      return _fieldName;\n    }\n  }\n\n  // isset id assignments\n  private static final int __PRIORITY_ISSET_ID = 0;\n  private BitSet __isset_bit_vector = new BitSet(1);\n  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;\n  static {\n    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);\n    tmpMap.put(_Fields.USER, new org.apache.thrift.meta_data.FieldMetaData(\"user\", org.apache.thrift.TFieldRequirementType.DEFAULT, \n        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));\n    tmpMap.put(_Fields.GROUP, new org.apache.thrift.meta_data.FieldMetaData(\"group\", org.apache.thrift.TFieldRequirementType.DEFAULT, \n        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));\n    tmpMap.put(_Fields.PRIORITY, new org.apache.thrift.meta_data.FieldMetaData(\"priority\", org.apache.thrift.TFieldRequirementType.DEFAULT, \n        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));\n    metaDataMap = Collections.unmodifiableMap(tmpMap);\n    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TUserGroupInfo.class, metaDataMap);\n  }\n\n  public TUserGroupInfo() {\n  }\n\n  public TUserGroupInfo(\n    String user,\n    String group,\n    int priority)\n  {\n    this();\n    this.user = user;\n    this.group = group;\n    this.priority = priority;\n    setPriorityIsSet(true);\n  }\n\n  /**\n   * Performs a deep copy on <i>other</i>.\n   */\n  public TUserGroupInfo(TUserGroupInfo other) {\n    __isset_bit_vector.clear();\n    __isset_bit_vector.or(other.__isset_bit_vector);\n    if (other.isSetUser()) {\n      this.user = other.user;\n    }\n    if (other.isSetGroup()) {\n      this.group = other.group;\n    }\n    this.priority = other.priority;\n  }\n\n  public TUserGroupInfo deepCopy() {\n    return new TUserGroupInfo(this);\n  }\n\n  public void clear() {\n    this.user = null;\n    this.group = null;\n    setPriorityIsSet(false);\n    this.priority = 0;\n  }\n\n  public String getUser() {\n    return this.user;\n  }\n\n  public TUserGroupInfo setUser(String user) {\n    this.user = user;\n    return this;\n  }\n\n  public void unsetUser() {\n    this.user = null;\n  }\n\n  /** Returns true if field user is set (has been assigned a value) and false otherwise */\n  public boolean isSetUser() {\n    return this.user != null;\n  }\n\n  public void setUserIsSet(boolean value) {\n    if (!value) {\n      this.user = null;\n    }\n  }\n\n  public String getGroup() {\n    return this.group;\n  }\n\n  public TUserGroupInfo setGroup(String group) {\n    this.group = group;\n    return this;\n  }\n\n  public void unsetGroup() {\n    this.group = null;\n  }\n\n  /** Returns true if field group is set (has been assigned a value) and false otherwise */\n  public boolean isSetGroup() {\n    return this.group != null;\n  }\n\n  public void setGroupIsSet(boolean value) {\n    if (!value) {\n      this.group = null;\n    }\n  }\n\n  public int getPriority() {\n    return this.priority;\n  }\n\n  public TUserGroupInfo setPriority(int priority) {\n    this.priority = priority;\n    setPriorityIsSet(true);\n    return this;\n  }\n\n  public void unsetPriority() {\n    __isset_bit_vector.clear(__PRIORITY_ISSET_ID);\n  }\n\n  /** Returns true if field priority is set (has been assigned a value) and false otherwise */\n  public boolean isSetPriority() {\n    return __isset_bit_vector.get(__PRIORITY_ISSET_ID);\n  }\n\n  public void setPriorityIsSet(boolean value) {\n    __isset_bit_vector.set(__PRIORITY_ISSET_ID, value);\n  }\n\n  public void setFieldValue(_Fields field, Object value) {\n    switch (field) {\n    case USER:\n      if (value == null) {\n        unsetUser();\n      } else {\n        setUser((String)value);\n      }\n      break;\n\n    case GROUP:\n      if (value == null) {\n        unsetGroup();\n      } else {\n        setGroup((String)value);\n      }\n      break;\n\n    case PRIORITY:\n      if (value == null) {\n        unsetPriority();\n      } else {\n        setPriority((Integer)value);\n      }\n      break;\n\n    }\n  }\n\n  public Object getFieldValue(_Fields field) {\n    switch (field) {\n    case USER:\n      return getUser();\n\n    case GROUP:\n      return getGroup();\n\n    case PRIORITY:\n      return Integer.valueOf(getPriority());\n\n    }\n    throw new IllegalStateException();\n  }\n\n  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */\n  public boolean isSet(_Fields field) {\n    if (field == null) {\n      throw new IllegalArgumentException();\n    }\n\n    switch (field) {\n    case USER:\n      return isSetUser();\n    case GROUP:\n      return isSetGroup();\n    case PRIORITY:\n      return isSetPriority();\n    }\n    throw new IllegalStateException();\n  }\n\n  @Override\n  public boolean equals(Object that) {\n    if (that == null)\n      return false;\n    if (that instanceof TUserGroupInfo)\n      return this.equals((TUserGroupInfo)that);\n    return false;\n  }\n\n  public boolean equals(TUserGroupInfo that) {\n    if (that == null)\n      return false;\n\n    boolean this_present_user = true && this.isSetUser();\n    boolean that_present_user = true && that.isSetUser();\n    if (this_present_user || that_present_user) {\n      if (!(this_present_user && that_present_user))\n        return false;\n      if (!this.user.equals(that.user))\n        return false;\n    }\n\n    boolean this_present_group = true && this.isSetGroup();\n    boolean that_present_group = true && that.isSetGroup();\n    if (this_present_group || that_present_group) {\n      if (!(this_present_group && that_present_group))\n        return false;\n      if (!this.group.equals(that.group))\n        return false;\n    }\n\n    boolean this_present_priority = true;\n    boolean that_present_priority = true;\n    if (this_present_priority || that_present_priority) {\n      if (!(this_present_priority && that_present_priority))\n        return false;\n      if (this.priority != that.priority)\n        return false;\n    }\n\n    return true;\n  }\n\n  @Override\n  public int hashCode() {\n    return 0;\n  }\n\n  public int compareTo(TUserGroupInfo other) {\n    if (!getClass().equals(other.getClass())) {\n      return getClass().getName().compareTo(other.getClass().getName());\n    }\n\n    int lastComparison = 0;\n    TUserGroupInfo typedOther = (TUserGroupInfo)other;\n\n    lastComparison = Boolean.valueOf(isSetUser()).compareTo(typedOther.isSetUser());\n    if (lastComparison != 0) {\n      return lastComparison;\n    }\n    if (isSetUser()) {\n      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.user, typedOther.user);\n      if (lastComparison != 0) {\n        return lastComparison;\n      }\n    }\n    lastComparison = Boolean.valueOf(isSetGroup()).compareTo(typedOther.isSetGroup());\n    if (lastComparison != 0) {\n      return lastComparison;\n    }\n    if (isSetGroup()) {\n      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.group, typedOther.group);\n      if (lastComparison != 0) {\n        return lastComparison;\n      }\n    }\n    lastComparison = Boolean.valueOf(isSetPriority()).compareTo(typedOther.isSetPriority());\n    if (lastComparison != 0) {\n      return lastComparison;\n    }\n    if (isSetPriority()) {\n      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.priority, typedOther.priority);\n      if (lastComparison != 0) {\n        return lastComparison;\n      }\n    }\n    return 0;\n  }\n\n  public _Fields fieldForId(int fieldId) {\n    return _Fields.findByThriftId(fieldId);\n  }\n\n  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {\n    schemes.get(iprot.getScheme()).getScheme().read(iprot, this);\n  }\n\n  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {\n    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);\n  }\n\n  @Override\n  public String toString() {\n    StringBuilder sb = new StringBuilder(\"TUserGroupInfo(\");\n    boolean first = true;\n\n    sb.append(\"user:\");\n    if (this.user == null) {\n      sb.append(\"null\");\n    } else {\n      sb.append(this.user);\n    }\n    first = false;\n    if (!first) sb.append(\", \");\n    sb.append(\"group:\");\n    if (this.group == null) {\n      sb.append(\"null\");\n    } else {\n      sb.append(this.group);\n    }\n    first = false;\n    if (!first) sb.append(\", \");\n    sb.append(\"priority:\");\n    sb.append(this.priority);\n    first = false;\n    sb.append(\")\");\n    return sb.toString();\n  }\n\n  public void validate() throws org.apache.thrift.TException {\n    // check for required fields\n  }\n\n  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {\n    try {\n      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));\n    } catch (org.apache.thrift.TException te) {\n      throw new java.io.IOException(te.getMessage());\n    }\n  }\n\n  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {\n    try {\n      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.\n      __isset_bit_vector = new BitSet(1);\n      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));\n    } catch (org.apache.thrift.TException te) {\n      throw new java.io.IOException(te.getMessage());\n    }\n  }\n\n  private static class TUserGroupInfoStandardSchemeFactory implements SchemeFactory {\n    public TUserGroupInfoStandardScheme getScheme() {\n      return new TUserGroupInfoStandardScheme();\n    }\n  }\n\n  private static class TUserGroupInfoStandardScheme extends StandardScheme<TUserGroupInfo> {\n\n    public void read(org.apache.thrift.protocol.TProtocol iprot, TUserGroupInfo struct) throws org.apache.thrift.TException {\n      org.apache.thrift.protocol.TField schemeField;\n      iprot.readStructBegin();\n      while (true)\n      {\n        schemeField = iprot.readFieldBegin();\n        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { \n          break;\n        }\n        switch (schemeField.id) {\n          case 1: // USER\n            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {\n              struct.user = iprot.readString();\n              struct.setUserIsSet(true);\n            } else { \n              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n            }\n            break;\n          case 2: // GROUP\n            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {\n              struct.group = iprot.readString();\n              struct.setGroupIsSet(true);\n            } else { \n              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n            }\n            break;\n          case 3: // PRIORITY\n            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {\n              struct.priority = iprot.readI32();\n              struct.setPriorityIsSet(true);\n            } else { \n              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n            }\n            break;\n          default:\n            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);\n        }\n        iprot.readFieldEnd();\n      }\n      iprot.readStructEnd();\n\n      // check for required fields of primitive type, which can't be checked in the validate method\n      struct.validate();\n    }\n\n    public void write(org.apache.thrift.protocol.TProtocol oprot, TUserGroupInfo struct) throws org.apache.thrift.TException {\n      struct.validate();\n\n      oprot.writeStructBegin(STRUCT_DESC);\n      if (struct.user != null) {\n        oprot.writeFieldBegin(USER_FIELD_DESC);\n        oprot.writeString(struct.user);\n        oprot.writeFieldEnd();\n      }\n      if (struct.group != null) {\n        oprot.writeFieldBegin(GROUP_FIELD_DESC);\n        oprot.writeString(struct.group);\n        oprot.writeFieldEnd();\n      }\n      oprot.writeFieldBegin(PRIORITY_FIELD_DESC);\n      oprot.writeI32(struct.priority);\n      oprot.writeFieldEnd();\n      oprot.writeFieldStop();\n      oprot.writeStructEnd();\n    }\n\n  }\n\n  private static class TUserGroupInfoTupleSchemeFactory implements SchemeFactory {\n    public TUserGroupInfoTupleScheme getScheme() {\n      return new TUserGroupInfoTupleScheme();\n    }\n  }\n\n  private static class TUserGroupInfoTupleScheme extends TupleScheme<TUserGroupInfo> {\n\n    @Override\n    public void write(org.apache.thrift.protocol.TProtocol prot, TUserGroupInfo struct) throws org.apache.thrift.TException {\n      TTupleProtocol oprot = (TTupleProtocol) prot;\n      BitSet optionals = new BitSet();\n      if (struct.isSetUser()) {\n        optionals.set(0);\n      }\n      if (struct.isSetGroup()) {\n        optionals.set(1);\n      }\n      if (struct.isSetPriority()) {\n        optionals.set(2);\n      }\n      oprot.writeBitSet(optionals, 3);\n      if (struct.isSetUser()) {\n        oprot.writeString(struct.user);\n      }\n      if (struct.isSetGroup()) {\n        oprot.writeString(struct.group);\n      }\n      if (struct.isSetPriority()) {\n        oprot.writeI32(struct.priority);\n      }\n    }\n\n    @Override\n    public void read(org.apache.thrift.protocol.TProtocol prot, TUserGroupInfo struct) throws org.apache.thrift.TException {\n      TTupleProtocol iprot = (TTupleProtocol) prot;\n      BitSet incoming = iprot.readBitSet(3);\n      if (incoming.get(0)) {\n        struct.user = iprot.readString();\n        struct.setUserIsSet(true);\n      }\n      if (incoming.get(1)) {\n        struct.group = iprot.readString();\n        struct.setGroupIsSet(true);\n      }\n      if (incoming.get(2)) {\n        struct.priority = iprot.readI32();\n        struct.setPriorityIsSet(true);\n      }\n    }\n  }\n\n}\n\n"
  },
  {
    "path": "src/main/java/edu/berkeley/sparrow/api/SparrowBackendClient.java",
    "content": "/*\n * Copyright 2013 The Regents of The University California\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *   http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage edu.berkeley.sparrow.api;\n\npublic class SparrowBackendClient {\n  \n}\n"
  },
  {
    "path": "src/main/java/edu/berkeley/sparrow/api/SparrowFrontendClient.java",
    "content": "/*\n * Copyright 2013 The Regents of The University California\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage edu.berkeley.sparrow.api;\n\nimport java.io.IOException;\nimport java.net.InetSocketAddress;\nimport java.util.List;\nimport java.util.concurrent.BlockingQueue;\nimport java.util.concurrent.LinkedBlockingQueue;\n\nimport org.apache.commons.configuration.PropertiesConfiguration;\nimport org.apache.log4j.Logger;\nimport org.apache.thrift.TException;\n\nimport edu.berkeley.sparrow.daemon.util.Network;\nimport edu.berkeley.sparrow.daemon.util.TClients;\nimport edu.berkeley.sparrow.daemon.util.TServers;\nimport edu.berkeley.sparrow.thrift.FrontendService;\nimport edu.berkeley.sparrow.thrift.IncompleteRequestException;\nimport edu.berkeley.sparrow.thrift.SchedulerService;\nimport edu.berkeley.sparrow.thrift.SchedulerService.Client;\nimport edu.berkeley.sparrow.thrift.TSchedulingRequest;\nimport edu.berkeley.sparrow.thrift.TUserGroupInfo;\n\n/**\n * Java client to Sparrow scheduling service. Once a client is initialize()'d it\n * can be used safely from multiple threads.\n */\npublic class SparrowFrontendClient {\n  public static boolean launchedServerAlready = false;\n\n  private final static Logger LOG = Logger.getLogger(SparrowFrontendClient.class);\n  private final static int NUM_CLIENTS = 8; // Number of concurrent requests we support\n  private final static int DEFAULT_LISTEN_PORT = 50201;\n\n  BlockingQueue<SchedulerService.Client> clients =\n      new LinkedBlockingQueue<SchedulerService.Client>();\n\n  /**\n   * Initialize a connection to a sparrow scheduler.\n   * @param sparrowSchedulerAddr. The socket address of the Sparrow scheduler.\n   * @param app. The application id. Note that this must be consistent across frontends\n   *             and backends.\n   * @param frontendServer. A class which implements the frontend server interface (for\n   *                        communication from Sparrow).\n   * @throws IOException\n   */\n  public void initialize(InetSocketAddress sparrowSchedulerAddr, String app,\n      FrontendService.Iface frontendServer)\n      throws TException, IOException {\n    initialize(sparrowSchedulerAddr, app, frontendServer, DEFAULT_LISTEN_PORT);\n  }\n\n  /**\n   * Initialize a connection to a sparrow scheduler.\n   * @param sparrowSchedulerAddr. The socket address of the Sparrow scheduler.\n   * @param app. The application id. Note that this must be consistent across frontends\n   *             and backends.\n   * @param frontendServer. A class which implements the frontend server interface (for\n   *                        communication from Sparrow).\n   * @param listenPort. The port on which to listen for request from the scheduler.\n   * @throws IOException\n   */\n  public void initialize(InetSocketAddress sparrowSchedulerAddr, String app,\n      FrontendService.Iface frontendServer, int listenPort)\n      throws TException, IOException {\n\n    FrontendService.Processor<FrontendService.Iface> processor =\n        new FrontendService.Processor<FrontendService.Iface>(frontendServer);\n\n    if (!launchedServerAlready) {\n      try {\n        TServers.launchThreadedThriftServer(listenPort, 8, processor);\n      } catch (IOException e) {\n        LOG.fatal(\"Couldn't launch server side of frontend\", e);\n      }\n      launchedServerAlready = true;\n    }\n\n    for (int i = 0; i < NUM_CLIENTS; i++) {\n      Client client = TClients.createBlockingSchedulerClient(\n          sparrowSchedulerAddr.getAddress().getHostAddress(), sparrowSchedulerAddr.getPort(),\n          60000);\n      clients.add(client);\n    }\n    clients.peek().registerFrontend(app, Network.getIPAddress(new PropertiesConfiguration())\n        + \":\" + listenPort);\n  }\n\n  public boolean submitJob(String app,\n      List<edu.berkeley.sparrow.thrift.TTaskSpec> tasks, TUserGroupInfo user)\n          throws TException {\n    return submitRequest(new TSchedulingRequest(app, tasks, user));\n  }\n\n  public boolean submitJob(String app, List<edu.berkeley.sparrow.thrift.TTaskSpec> tasks,\n  \t  TUserGroupInfo user, String description) {\n  \tTSchedulingRequest request = new TSchedulingRequest(app, tasks, user);\n  \trequest.setDescription(description);\n  \treturn submitRequest(request);\n  }\n\n  public boolean submitJob(String app,\n      List<edu.berkeley.sparrow.thrift.TTaskSpec> tasks, TUserGroupInfo user,\n      double probeRatio)\n          throws TException {\n    TSchedulingRequest request = new TSchedulingRequest(app, tasks, user);\n    request.setProbeRatio(probeRatio);\n    return submitRequest(request);\n  }\n\n  public boolean submitRequest(TSchedulingRequest request) {\n    try {\n      Client client = clients.take();\n      client.submitJob(request);\n      clients.put(client);\n    } catch (InterruptedException e) {\n      LOG.fatal(e);\n    } catch (TException e) {\n      LOG.error(\"Thrift exception when submitting job: \" + e.getMessage());\n      return false;\n    } catch (IncompleteRequestException e) {\n      LOG.error(e);\n    }\n    return true;\n  }\n\n  public void close() {\n    for (int i = 0; i < NUM_CLIENTS; i++) {\n      clients.poll().getOutputProtocol().getTransport().close();\n    }\n  }\n}\n"
  },
  {
    "path": "src/main/java/edu/berkeley/sparrow/daemon/SparrowConf.java",
    "content": "/*\n * Copyright 2013 The Regents of The University California\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *   http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage edu.berkeley.sparrow.daemon;\n\n/**\n * Configuration parameters for sparrow.\n */\npublic class SparrowConf {\n  // Values: \"debug\", \"info\", \"warn\", \"error\", \"fatal\"\n  public final static String LOG_LEVEL = \"log_level\";\n\n  public final static String SCHEDULER_THRIFT_PORT = \"scheduler.thrift.port\";\n  public final static String SCHEDULER_THRIFT_THREADS =\n      \"scheduler.thrift.threads\";\n  // Listen port for the state store --> scheduler interface\n  public final static String SCHEDULER_STATE_THRIFT_PORT = \"scheduler.state.thrift.port\";\n  public final static String SCHEDULER_STATE_THRIFT_THREADS =\n      \"scheduler.state.thrift.threads\";\n\n  /**\n   * Whether the scheduler should cancel outstanding reservations when all of a job's tasks have\n   * been scheduled.  Should be set to \"true\" or \"false\".\n   */\n  public final static String CANCELLATION = \"cancellation\";\n  public final static boolean DEFAULT_CANCELLATION = true;\n\n  /* List of ports corresponding to node monitors (backend interface) this daemon is\n   * supposed to run. In most deployment scenarios this will consist of a single port,\n   * or will be left unspecified in favor of the default port. */\n  public final static String NM_THRIFT_PORTS = \"agent.thrift.ports\";\n\n  /* List of ports corresponding to node monitors (internal interface) this daemon is\n   * supposed to run. In most deployment scenarios this will consist of a single port,\n   * or will be left unspecified in favor of the default port. */\n  public final static String INTERNAL_THRIFT_PORTS = \"internal_agent.thrift.ports\";\n\n  public final static String NM_THRIFT_THREADS = \"agent.thrift.threads\";\n  public final static String INTERNAL_THRIFT_THREADS =\n      \"internal_agent.thrift.threads\";\n  /** Type of task scheduler to use on node monitor. Values: \"fifo,\" \"round_robin, \" \"priority.\" */\n  public final static String NM_TASK_SCHEDULER_TYPE = \"node_monitor.task_scheduler\";\n\n  public final static String SYSTEM_MEMORY = \"system.memory\";\n  public final static int DEFAULT_SYSTEM_MEMORY = 1024;\n\n  public final static String SYSTEM_CPUS = \"system.cpus\";\n  public final static int DEFAULT_SYSTEM_CPUS = 4;\n\n  // Values: \"standalone\", \"configbased.\" Only \"configbased\" works currently.\n  public final static String DEPLYOMENT_MODE = \"deployment.mode\";\n  public final static String DEFAULT_DEPLOYMENT_MODE = \"production\";\n\n  /** The ratio of probes used in a scheduling decision to tasks. */\n  // For requests w/o constraints...\n  public final static String SAMPLE_RATIO = \"sample.ratio\";\n  public final static double DEFAULT_SAMPLE_RATIO = 1.05;\n  // For requests w/ constraints...\n  public final static String SAMPLE_RATIO_CONSTRAINED = \"sample.ratio.constrained\";\n  public final static int DEFAULT_SAMPLE_RATIO_CONSTRAINED = 2;\n\n  /** The hostname of this machine. */\n  public final static String HOSTNAME = \"hostname\";\n  /**\n   * Use an invalid default value, so that the \"special task set\" is only used by those\n   * who know what they're doing.\n   */\n  public final static int DEFAULT_SPECIAL_TASK_SET_SIZE = -1;\n\n  // Parameters for static operation.\n  /** Expects a comma-separated list of host:port pairs describing the address of the\n    * internal interface of the node monitors. */\n  public final static String STATIC_NODE_MONITORS = \"static.node_monitors\";\n  public final static String STATIC_APP_NAME = \"static.app.name\";\n\n  public static final String GET_TASK_PORT = \"get_task.port\";\n  \n  public final static String SPREAD_EVENLY_TASK_SET_SIZE = \"spread_evenly_task_set_size\";\n  public final static int DEFAULT_SPREAD_EVENLY_TASK_SET_SIZE = 1;\n}\n"
  },
  {
    "path": "src/main/java/edu/berkeley/sparrow/daemon/SparrowDaemon.java",
    "content": "/*\n * Copyright 2013 The Regents of The University California\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *   http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage edu.berkeley.sparrow.daemon;\n\nimport joptsimple.OptionParser;\nimport joptsimple.OptionSet;\n\nimport org.apache.commons.configuration.Configuration;\nimport org.apache.commons.configuration.ConfigurationException;\nimport org.apache.commons.configuration.PropertiesConfiguration;\nimport org.apache.log4j.BasicConfigurator;\nimport org.apache.log4j.Level;\nimport org.apache.log4j.Logger;\n\nimport edu.berkeley.sparrow.daemon.nodemonitor.NodeMonitorThrift;\nimport edu.berkeley.sparrow.daemon.scheduler.SchedulerThrift;\nimport edu.berkeley.sparrow.daemon.util.Logging;\n\n/**\n * A Sparrow Daemon includes both a scheduler and a node monitor.\n * The main() method launches a Sparrow daemon.\n */\npublic class SparrowDaemon {\n  // Eventually, we'll want to change this to something higher than debug.\n  public final static Level DEFAULT_LOG_LEVEL = Level.DEBUG;\n\n  public void initialize(Configuration conf) throws Exception {\n    Level logLevel = Level.toLevel(conf.getString(SparrowConf.LOG_LEVEL, \"\"),\n        DEFAULT_LOG_LEVEL);\n    Logger.getRootLogger().setLevel(logLevel);\n\n    // Start as many node monitors as specified in config\n    String[] nmPorts = conf.getStringArray(SparrowConf.NM_THRIFT_PORTS);\n    String[] inPorts = conf.getStringArray(SparrowConf.INTERNAL_THRIFT_PORTS);\n\n    if (nmPorts.length != inPorts.length) {\n      throw new ConfigurationException(SparrowConf.NM_THRIFT_PORTS + \" and \" +\n        SparrowConf.INTERNAL_THRIFT_PORTS + \" not of equal length\");\n    }\n    if (nmPorts.length > 1 &&\n        (!conf.getString(SparrowConf.DEPLYOMENT_MODE, \"\").equals(\"standalone\"))) {\n      throw new ConfigurationException(\"Mutliple NodeMonitors only allowed \" +\n      \t\t\"in standalone deployment\");\n    }\n    if (nmPorts.length == 0) {\n      (new NodeMonitorThrift()).initialize(conf,\n          NodeMonitorThrift.DEFAULT_NM_THRIFT_PORT,\n          NodeMonitorThrift.DEFAULT_INTERNAL_THRIFT_PORT);\n    }\n    else {\n      for (int i = 0; i < nmPorts.length; i++) {\n        (new NodeMonitorThrift()).initialize(conf,\n            Integer.parseInt(nmPorts[i]), Integer.parseInt(inPorts[i]));\n      }\n    }\n\n    SchedulerThrift scheduler = new SchedulerThrift();\n    scheduler.initialize(conf);\n  }\n\n  public static void main(String[] args) throws Exception {\n    OptionParser parser = new OptionParser();\n    parser.accepts(\"c\", \"configuration file (required)\").\n      withRequiredArg().ofType(String.class);\n    parser.accepts(\"help\", \"print help statement\");\n    OptionSet options = parser.parse(args);\n\n    if (options.has(\"help\") || !options.has(\"c\")) {\n      parser.printHelpOn(System.out);\n      System.exit(-1);\n    }\n\n    // Set up a simple configuration that logs on the console.\n    BasicConfigurator.configure();\n\n    Logging.configureAuditLogging();\n\n    String configFile = (String) options.valueOf(\"c\");\n    Configuration conf = new PropertiesConfiguration(configFile);\n    SparrowDaemon sparrowDaemon = new SparrowDaemon();\n    sparrowDaemon.initialize(conf);\n  }\n}\n"
  },
  {
    "path": "src/main/java/edu/berkeley/sparrow/daemon/StandaloneStateStore.java",
    "content": "/*\n * Copyright 2013 The Regents of The University California\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *   http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage edu.berkeley.sparrow.daemon;\n\nimport java.net.InetSocketAddress;\nimport java.util.HashMap;\nimport java.util.HashSet;\nimport java.util.Map;\nimport java.util.Set;\n\nimport edu.berkeley.sparrow.daemon.nodemonitor.StandaloneNodeMonitorState;\nimport edu.berkeley.sparrow.daemon.scheduler.StandaloneSchedulerState;\n\n/**\n * When Sparrow is running in standalone mode (single machine) it is\n * necessary to have a singleton global state store to coordinate data\n * between {@link StandaloneNodeMonitorState} and\n * {@link StandaloneSchedulerState}. This class acts as that state store.\n */\npublic class StandaloneStateStore {\n  private static final StandaloneStateStore instance =\n      new StandaloneStateStore();\n\n  public static StandaloneStateStore getInstance() {\n          return instance;\n  }\n\n  // appId -> map of app nodes\n  private Map<String, Set<InetSocketAddress>> applications;\n\n  // Private constructor prevents instantiation from other classes\n  private StandaloneStateStore() {\n    applications = new HashMap<String, Set<InetSocketAddress>>();\n  }\n\n  // SOURCE: StandaloneNodeMonitorState\n  public synchronized void registerBackend(\n      String appId, InetSocketAddress nmAddr) {\n    if (!this.applications.containsKey(appId)) {\n      this.applications.put(appId, new HashSet<InetSocketAddress>());\n    }\n    this.applications.get(appId).add(nmAddr);\n  }\n\n  // SOURCE: StandaloneSchedulerState\n  public synchronized Set<InetSocketAddress> getBackends(\n      String appId) {\n    if (applications.containsKey(appId)) {\n      return new HashSet<InetSocketAddress>(\n          applications.get(appId));\n    } else {\n      return new HashSet<InetSocketAddress>();\n    }\n  }\n}\n"
  },
  {
    "path": "src/main/java/edu/berkeley/sparrow/daemon/nodemonitor/ConfigNodeMonitorState.java",
    "content": "/*\n * Copyright 2013 The Regents of The University California\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *   http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage edu.berkeley.sparrow.daemon.nodemonitor;\n\nimport java.net.InetSocketAddress;\nimport java.util.Set;\n\nimport org.apache.commons.configuration.Configuration;\nimport org.apache.log4j.Logger;\n\nimport edu.berkeley.sparrow.daemon.SparrowConf;\nimport edu.berkeley.sparrow.daemon.util.ConfigUtil;\n\n/***\n * A {@link NodeMonitorState} implementation based on a static config file.\n */\npublic class ConfigNodeMonitorState implements NodeMonitorState {\n  private static final Logger LOG = Logger.getLogger(ConfigNodeMonitorState.class);\n\n  private Set<InetSocketAddress> nodeMonitors;\n  private String staticAppId;\n\n  @Override\n  public void initialize(Configuration conf) {\n    nodeMonitors = ConfigUtil.parseBackends(conf);\n    staticAppId = conf.getString(SparrowConf.STATIC_APP_NAME);\n  }\n\n  @Override\n  public boolean registerBackend(String appId, InetSocketAddress nodeMonitor) {\n    // Verify that the given backend information matches the static configuration.\n    if (!appId.equals(staticAppId)) {\n      LOG.error(\"Requested to register backend for app \" + appId +\n          \" but was expecting app \" + staticAppId);\n    } else if (!nodeMonitors.contains(nodeMonitor)) {\n      StringBuilder errorMessage = new StringBuilder();\n      for (InetSocketAddress nodeMonitorAddress : nodeMonitors) {\n        errorMessage.append(nodeMonitorAddress.toString());\n      }\n      throw new RuntimeException(\"Address \" + nodeMonitor.toString() +\n          \" not found among statically configured addreses for app \" + appId + \" (statically \" +\n          \"configured addresses include: \" + errorMessage.toString());\n    }\n\n    return true;\n  }\n}\n"
  },
  {
    "path": "src/main/java/edu/berkeley/sparrow/daemon/nodemonitor/FifoTaskScheduler.java",
    "content": "/*\n * Copyright 2013 The Regents of The University California\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *   http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage edu.berkeley.sparrow.daemon.nodemonitor;\n\nimport java.util.Iterator;\nimport java.util.concurrent.LinkedBlockingQueue;\n\nimport org.apache.log4j.Logger;\n\n/**\n * This scheduler assumes that backends can execute a fixed number of tasks (equal to\n * the number of cores on the machine) and uses a FIFO queue to determine the order to launch\n * tasks whenever outstanding tasks exceed this amount.\n */\npublic class FifoTaskScheduler extends TaskScheduler {\n  private final static Logger LOG = Logger.getLogger(FifoTaskScheduler.class);\n\n  public int maxActiveTasks;\n  public Integer activeTasks;\n  public LinkedBlockingQueue<TaskSpec> taskReservations =\n      new LinkedBlockingQueue<TaskSpec>();\n\n  public FifoTaskScheduler(int max) {\n    maxActiveTasks = max;\n    activeTasks = 0;\n  }\n\n  @Override\n  synchronized int handleSubmitTaskReservation(TaskSpec taskReservation) {\n    // This method, cancelTaskReservations(), and handleTaskCompleted() are synchronized to avoid\n    // race conditions between updating activeTasks and taskReservations.\n    if (activeTasks < maxActiveTasks) {\n      if (taskReservations.size() > 0) {\n        String errorMessage = \"activeTasks should be less than maxActiveTasks only \" +\n                              \"when no outstanding reservations.\";\n        LOG.error(errorMessage);\n        throw new IllegalStateException(errorMessage);\n      }\n      makeTaskRunnable(taskReservation);\n      ++activeTasks;\n      LOG.debug(\"Making task for request \" + taskReservation.requestId + \" runnable (\" +\n                activeTasks + \" of \" + maxActiveTasks + \" task slots currently filled)\");\n      return 0;\n    }\n    LOG.debug(\"All \" + maxActiveTasks + \" task slots filled.\");\n    int queuedReservations = taskReservations.size();\n    try {\n      LOG.debug(\"Enqueueing task reservation with request id \" + taskReservation.requestId +\n                \" because all task slots filled. \" + queuedReservations +\n                \" already enqueued reservations.\");\n      taskReservations.put(taskReservation);\n    } catch (InterruptedException e) {\n      LOG.fatal(e);\n    }\n    return queuedReservations;\n  }\n\n  @Override\n  synchronized int cancelTaskReservations(String requestId) {\n    int numReservationsCancelled = 0;\n    Iterator<TaskSpec> reservationsIterator = taskReservations.iterator();\n    while (reservationsIterator.hasNext()) {\n      TaskSpec reservation = reservationsIterator.next();\n      if (reservation.requestId == requestId) {\n        reservationsIterator.remove();\n        ++numReservationsCancelled;\n      }\n    }\n    return numReservationsCancelled;\n  }\n\n  @Override\n  protected void handleTaskFinished(String requestId, String taskId) {\n    attemptTaskLaunch(requestId, taskId);\n  }\n\n  @Override\n  protected void handleNoTaskForReservation(TaskSpec taskSpec) {\n    attemptTaskLaunch(taskSpec.previousRequestId, taskSpec.previousTaskId);\n  }\n\n  /**\n   * Attempts to launch a new task.\n   *\n   * The parameters {@code lastExecutedRequestId} and {@code lastExecutedTaskId} are used purely\n   * for logging purposes, to determine how long the node monitor spends trying to find a new\n   * task to execute. This method needs to be synchronized to prevent a race condition with\n   * {@link handleSubmitTaskReservation}.\n   */\n  private synchronized void attemptTaskLaunch(\n      String lastExecutedRequestId, String lastExecutedTaskId) {\n    TaskSpec reservation = taskReservations.poll();\n    if (reservation != null) {\n      reservation.previousRequestId = lastExecutedRequestId;\n      reservation.previousTaskId = lastExecutedTaskId;\n      makeTaskRunnable(reservation);\n    } else {\n      activeTasks -= 1;\n    }\n  }\n\n  @Override\n  int getMaxActiveTasks() {\n    return maxActiveTasks;\n  }\n}\n"
  },
  {
    "path": "src/main/java/edu/berkeley/sparrow/daemon/nodemonitor/NoQueueTaskScheduler.java",
    "content": "/*\n * Copyright 2013 The Regents of The University California\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *   http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage edu.berkeley.sparrow.daemon.nodemonitor;\n\n\n\n\n/**\n * A {@link TaskScheduler} which makes tasks instantly available for launch.\n *\n * This does not perform any resource management or queuing. It can be used for\n * applications which do not want Sparrow to perform any explicit resource management\n * but still want Sparrow to launch tasks.\n */\npublic class NoQueueTaskScheduler extends TaskScheduler {\n\n  @Override\n  int handleSubmitTaskReservation(TaskSpec taskReservation) {\n    // Make this task instantly runnable\n    makeTaskRunnable(taskReservation);\n    return 0;\n  }\n\n  @Override\n  int cancelTaskReservations(String requestId) {\n    // Do nothing. No reservations cancelled.\n    return 0;\n  }\n\n  @Override\n  protected void handleTaskFinished(String requestId, String taskId) {\n    // Do nothing.\n\n  }\n\n  @Override\n  protected void handleNoTaskForReservation(TaskSpec taskSpec) {\n    // Do nothing.\n\n  }\n\n\n  @Override\n  int getMaxActiveTasks() {\n    return -1;\n  }\n\n}\n"
  },
  {
    "path": "src/main/java/edu/berkeley/sparrow/daemon/nodemonitor/NodeMonitor.java",
    "content": "/*\n * Copyright 2013 The Regents of The University California\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *   http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage edu.berkeley.sparrow.daemon.nodemonitor;\n\nimport java.io.IOException;\nimport java.net.InetSocketAddress;\nimport java.net.UnknownHostException;\nimport java.nio.ByteBuffer;\nimport java.util.ArrayList;\nimport java.util.HashMap;\nimport java.util.List;\nimport java.util.concurrent.ConcurrentMap;\n\nimport org.apache.commons.configuration.Configuration;\nimport org.apache.log4j.Logger;\nimport org.apache.thrift.TException;\nimport org.apache.thrift.async.AsyncMethodCallback;\n\nimport com.google.common.collect.Maps;\n\nimport edu.berkeley.sparrow.daemon.SparrowConf;\nimport edu.berkeley.sparrow.daemon.util.Logging;\nimport edu.berkeley.sparrow.daemon.util.Network;\nimport edu.berkeley.sparrow.daemon.util.Resources;\nimport edu.berkeley.sparrow.daemon.util.ThriftClientPool;\nimport edu.berkeley.sparrow.thrift.SchedulerService;\nimport edu.berkeley.sparrow.thrift.SchedulerService.AsyncClient;\nimport edu.berkeley.sparrow.thrift.SchedulerService.AsyncClient.sendFrontendMessage_call;\nimport edu.berkeley.sparrow.thrift.TEnqueueTaskReservationsRequest;\nimport edu.berkeley.sparrow.thrift.TFullTaskId;\n\n/**\n * A Node Monitor which is responsible for communicating with application\n * backends. This class is wrapped by multiple thrift servers, so it may\n * be concurrently accessed when handling multiple function calls\n * simultaneously.\n */\npublic class NodeMonitor {\n  private final static Logger LOG = Logger.getLogger(NodeMonitor.class);\n  private final static Logger AUDIT_LOG = Logging.getAuditLogger(TaskScheduler.class);\n\n  private static NodeMonitorState state;\n  private HashMap<String, InetSocketAddress> appSockets =\n      new HashMap<String, InetSocketAddress>();\n  private HashMap<String, List<TFullTaskId>> appTasks =\n      new HashMap<String, List<TFullTaskId>>();\n  // Map to scheduler socket address for each request id.\n  private ConcurrentMap<String, InetSocketAddress> requestSchedulers =\n      Maps.newConcurrentMap();\n  private ThriftClientPool<SchedulerService.AsyncClient> schedulerClientPool =\n      new ThriftClientPool<SchedulerService.AsyncClient>(\n          new ThriftClientPool.SchedulerServiceMakerFactory());\n  private TaskScheduler scheduler;\n  private TaskLauncherService taskLauncherService;\n  private String ipAddress;\n\n  public void initialize(Configuration conf, int nodeMonitorInternalPort)\n      throws UnknownHostException {\n    String mode = conf.getString(SparrowConf.DEPLYOMENT_MODE, \"unspecified\");\n    if (mode.equals(\"standalone\")) {\n      state = new StandaloneNodeMonitorState();\n    } else if (mode.equals(\"configbased\")) {\n      state = new ConfigNodeMonitorState();\n    } else {\n      throw new RuntimeException(\"Unsupported deployment mode: \" + mode);\n    }\n    try {\n      state.initialize(conf);\n    } catch (IOException e) {\n      LOG.fatal(\"Error initializing node monitor state.\", e);\n    }\n    int mem = Resources.getSystemMemoryMb(conf);\n    LOG.info(\"Using memory allocation: \" + mem);\n\n    ipAddress = Network.getIPAddress(conf);\n\n    int cores = Resources.getSystemCPUCount(conf);\n    LOG.info(\"Using core allocation: \" + cores);\n\n    String task_scheduler_type = conf.getString(SparrowConf.NM_TASK_SCHEDULER_TYPE, \"fifo\");\n    if (task_scheduler_type.equals(\"round_robin\")) {\n      scheduler = new RoundRobinTaskScheduler(cores);\n    } else if (task_scheduler_type.equals(\"fifo\")) {\n      scheduler = new FifoTaskScheduler(cores);\n    } else if (task_scheduler_type.equals(\"priority\")) {\n      scheduler = new PriorityTaskScheduler(cores);\n    } else {\n      throw new RuntimeException(\"Unsupported task scheduler type: \" + mode);\n    }\n    scheduler.initialize(conf, nodeMonitorInternalPort);\n    taskLauncherService = new TaskLauncherService();\n    taskLauncherService.initialize(conf, scheduler, nodeMonitorInternalPort);\n  }\n\n  /**\n   * Registers the backend with assumed 0 load, and returns true if successful.\n   * Returns false if the backend was already registered.\n   */\n  public boolean registerBackend(String appId, InetSocketAddress nmAddr,\n      InetSocketAddress backendAddr) {\n    LOG.debug(Logging.functionCall(appId, nmAddr, backendAddr));\n    if (appSockets.containsKey(appId)) {\n      LOG.warn(\"Attempt to re-register app \" + appId);\n      return false;\n    }\n    appSockets.put(appId, backendAddr);\n    appTasks.put(appId, new ArrayList<TFullTaskId>());\n    return state.registerBackend(appId, nmAddr);\n  }\n\n  /**\n   * Account for tasks which have finished.\n   */\n  public void tasksFinished(List<TFullTaskId> tasks) {\n    LOG.debug(Logging.functionCall(tasks));\n    scheduler.tasksFinished(tasks);\n  }\n\n  public boolean enqueueTaskReservations(TEnqueueTaskReservationsRequest request) {\n    LOG.debug(Logging.functionCall(request));\n    AUDIT_LOG.info(Logging.auditEventString(\"node_monitor_enqueue_task_reservation\",\n                                            ipAddress, request.requestId));\n    LOG.info(\"Received enqueue task reservation request from \" + ipAddress + \" for request \" +\n             request.requestId);\n\n    InetSocketAddress schedulerAddress = new InetSocketAddress(\n        request.getSchedulerAddress().getHost(), request.getSchedulerAddress().getPort());\n    requestSchedulers.put(request.getRequestId(), schedulerAddress);\n\n    InetSocketAddress socket = appSockets.get(request.getAppId());\n    if (socket == null) {\n      LOG.error(\"No socket stored for \" + request.getAppId() + \" (never registered?). \" +\n      \t\t\"Can't launch task.\");\n      return false;\n    }\n    scheduler.submitTaskReservations(request, socket);\n    return true;\n  }\n\n  public void cancelTaskReservations(String requestId) {\n    int numReservationsCancelled = scheduler.cancelTaskReservations(requestId);\n    AUDIT_LOG.debug(Logging.auditEventString(\n        \"node_monitor_cancellation\", ipAddress, requestId, numReservationsCancelled));\n  }\n\n  private class sendFrontendMessageCallback implements\n  AsyncMethodCallback<sendFrontendMessage_call> {\n    private InetSocketAddress frontendSocket;\n    private AsyncClient client;\n    public sendFrontendMessageCallback(InetSocketAddress socket, AsyncClient client) {\n      frontendSocket = socket;\n      this.client = client;\n    }\n\n    public void onComplete(sendFrontendMessage_call response) {\n      try { schedulerClientPool.returnClient(frontendSocket, client); }\n      catch (Exception e) { LOG.error(e); }\n    }\n\n    public void onError(Exception exception) {\n      try { schedulerClientPool.returnClient(frontendSocket, client); }\n      catch (Exception e) { LOG.error(e); }\n      LOG.error(exception);\n    }\n  }\n\n  public void sendFrontendMessage(String app, TFullTaskId taskId,\n      int status, ByteBuffer message) {\n    LOG.debug(Logging.functionCall(app, taskId, message));\n    InetSocketAddress scheduler = requestSchedulers.get(taskId.requestId);\n    if (scheduler == null) {\n      LOG.error(\"Did not find any scheduler info for request: \" + taskId);\n      return;\n    }\n\n    try {\n      AsyncClient client = schedulerClientPool.borrowClient(scheduler);\n      client.sendFrontendMessage(app, taskId, status, message,\n          new sendFrontendMessageCallback(scheduler, client));\n      LOG.debug(\"finished sending message\");\n    } catch (IOException e) {\n      LOG.error(e);\n    } catch (TException e) {\n      LOG.error(e);\n    } catch (Exception e) {\n      LOG.error(e);\n    }\n  }\n}\n"
  },
  {
    "path": "src/main/java/edu/berkeley/sparrow/daemon/nodemonitor/NodeMonitorState.java",
    "content": "/*\n * Copyright 2013 The Regents of The University California\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *   http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage edu.berkeley.sparrow.daemon.nodemonitor;\n\nimport java.io.IOException;\nimport java.net.InetSocketAddress;\n\nimport org.apache.commons.configuration.Configuration;\n\n\npublic interface NodeMonitorState {\n  /**\n   * Initialize state storage. This should open connections to any external\n   * services if required.\n   * @throws IOException \n   */\n  public void initialize(Configuration conf) throws IOException;\n  \n  /**\n   * Register a backend identified by {@code appId} which can be reached via\n   * a NodeMonitor running at the given address. The node is assumed to have\n   * resources given by {@code capacity}.\n   */\n  public boolean registerBackend(String appId, InetSocketAddress nodeMonitor);\n}\n"
  },
  {
    "path": "src/main/java/edu/berkeley/sparrow/daemon/nodemonitor/NodeMonitorThrift.java",
    "content": "/*\n * Copyright 2013 The Regents of The University California\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *   http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage edu.berkeley.sparrow.daemon.nodemonitor;\n\nimport java.io.IOException;\nimport java.net.InetAddress;\nimport java.net.InetSocketAddress;\nimport java.nio.ByteBuffer;\nimport java.util.List;\n\nimport org.apache.commons.configuration.Configuration;\nimport org.apache.thrift.TException;\n\nimport com.google.common.base.Optional;\n\nimport edu.berkeley.sparrow.daemon.SparrowConf;\nimport edu.berkeley.sparrow.daemon.util.Serialization;\nimport edu.berkeley.sparrow.daemon.util.TServers;\nimport edu.berkeley.sparrow.thrift.InternalService;\nimport edu.berkeley.sparrow.thrift.NodeMonitorService;\nimport edu.berkeley.sparrow.thrift.TCancelTaskReservationsRequest;\nimport edu.berkeley.sparrow.thrift.TEnqueueTaskReservationsRequest;\nimport edu.berkeley.sparrow.thrift.TFullTaskId;\n\n/**\n * This class extends the thrift Sparrow node monitor interface. It wraps the\n * {@link NodeMonitor} class and delegates most calls to that class.\n */\npublic class NodeMonitorThrift implements NodeMonitorService.Iface,\n                                          InternalService.Iface {\n  // Defaults if not specified by configuration\n  public final static int DEFAULT_NM_THRIFT_PORT = 20501;\n  public final static int DEFAULT_NM_THRIFT_THREADS = 32;\n  public final static int DEFAULT_INTERNAL_THRIFT_PORT = 20502;\n  public final static int DEFAULT_INTERNAL_THRIFT_THREADS = 8;\n\n  private NodeMonitor nodeMonitor = new NodeMonitor();\n  // The socket addr (ip:port) where we listen for requests from other Sparrow daemons.\n  // Used when registering backends with the state store.\n  private InetSocketAddress internalAddr;\n\n  /**\n   * Initialize this thrift service.\n   *\n   * This spawns 2 multi-threaded thrift servers, one exposing the app-facing\n   * agent service and the other exposing the internal-facing agent service,\n   * and listens for requests to both servers. We require explicit specification of the\n   * ports for these respective interfaces, since they cannot always be determined from\n   * within this class under certain configurations (e.g. a config file specifies\n   * multiple NodeMonitors).\n   */\n  public void initialize(Configuration conf, int nmPort, int internalPort)\n      throws IOException {\n    nodeMonitor.initialize(conf, internalPort);\n\n    // Setup application-facing agent service.\n    NodeMonitorService.Processor<NodeMonitorService.Iface> processor =\n        new NodeMonitorService.Processor<NodeMonitorService.Iface>(this);\n\n    int threads = conf.getInt(SparrowConf.NM_THRIFT_THREADS,\n        DEFAULT_NM_THRIFT_THREADS);\n    TServers.launchThreadedThriftServer(nmPort, threads, processor);\n\n    // Setup internal-facing agent service.\n    InternalService.Processor<InternalService.Iface> internalProcessor =\n        new InternalService.Processor<InternalService.Iface>(this);\n    int internalThreads = conf.getInt(\n        SparrowConf.INTERNAL_THRIFT_THREADS,\n        DEFAULT_INTERNAL_THRIFT_THREADS);\n    TServers.launchThreadedThriftServer(internalPort, internalThreads, internalProcessor);\n\n    internalAddr = new InetSocketAddress(InetAddress.getLocalHost(), internalPort);\n  }\n\n  @Override\n  public boolean registerBackend(String app, String backendSocket) throws TException {\n    Optional<InetSocketAddress> backendAddr = Serialization.strToSocket(backendSocket);\n    if (!backendAddr.isPresent()) {\n      return false; // TODO: maybe we should throw some exception here?\n    }\n    return nodeMonitor.registerBackend(app, internalAddr, backendAddr.get());\n  }\n\n  @Override\n  public void sendFrontendMessage(String app, TFullTaskId taskId,\n      int status, ByteBuffer message) throws TException {\n    nodeMonitor.sendFrontendMessage(app, taskId, status, message);\n  }\n\n  @Override\n  public void tasksFinished(List<TFullTaskId> tasks) throws TException {\n    nodeMonitor.tasksFinished(tasks);\n  }\n\n  @Override\n  public boolean enqueueTaskReservations(TEnqueueTaskReservationsRequest request)\n      throws TException {\n    return nodeMonitor.enqueueTaskReservations(request);\n  }\n\n  @Override\n  public void cancelTaskReservations(TCancelTaskReservationsRequest request)\n      throws TException {\n    nodeMonitor.cancelTaskReservations(request.requestId);\n  }\n}\n"
  },
  {
    "path": "src/main/java/edu/berkeley/sparrow/daemon/nodemonitor/PriorityTaskScheduler.java",
    "content": "/*\n * Copyright 2013 The Regents of The University California\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *   http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage edu.berkeley.sparrow.daemon.nodemonitor;\n\nimport java.util.Iterator;\nimport java.util.LinkedList;\nimport java.util.Map.Entry;\nimport java.util.Queue;\nimport java.util.TreeMap;\n\nimport org.apache.log4j.Logger;\n\nimport com.google.common.collect.Maps;\n\n/**\n * A {@link TaskScheduler} that launches tasks in strict priority order. Priorities are\n * integral values specified in the scheduling request.\n *\n * TODO: Would be better to pre-configure priorities -- users shouldn't be able to specify\n * whatever priority they want in the scheduling request.\n */\npublic class PriorityTaskScheduler extends TaskScheduler {\n  private final static Logger LOG = Logger.getLogger(PriorityTaskScheduler.class);\n\n  /** Queue of tasks of each priority. */\n  private TreeMap<Integer, Queue<TaskSpec>> priorityQueues = Maps.newTreeMap();\n  int numQueuedReservations;\n\n  public int maxActiveTasks;\n  public Integer activeTasks;\n\n  public PriorityTaskScheduler(int maxActiveTasks) {\n    this.maxActiveTasks = maxActiveTasks;\n    activeTasks = 0;\n    numQueuedReservations = 0;\n  }\n\n  @Override\n  synchronized int handleSubmitTaskReservation(TaskSpec taskReservation) {\n     /* Because of the need to check the free resources and then, depending on the result, start a\n      * new task, this method must be synchronized.\n      */\n    int priority = taskReservation.user.getPriority();\n    if (!priorityQueues.containsKey(priority)) {\n      priorityQueues.put(priority, new LinkedList<TaskSpec>());\n    }\n\n    if (activeTasks < maxActiveTasks) {\n      if (numQueuedReservations > 0) {\n        String errorMessage = \"activeTasks should be less than maxActiveTasks only \" +\n            \"when no outstanding reservations.\";\n        LOG.error(errorMessage);\n        throw new IllegalStateException(errorMessage);\n      }\n      makeTaskRunnable(taskReservation);\n      ++activeTasks;\n      LOG.debug(\"Making task for request \" + taskReservation.requestId + \" with priority \" +\n                priority + \" runnable (\" + activeTasks + \" of \" + maxActiveTasks +\n                \" task slots currently filled)\");\n      return 0;\n    }\n\n    LOG.debug(\"All \" + maxActiveTasks + \" task slots filled.\");\n    Queue<TaskSpec> reservations = priorityQueues.get(priority);\n    LOG.debug(\"Adding reservation for priority \" + priority + \". \" + reservations.size() +\n              \" reservations already queued for that priority, and \" + numQueuedReservations +\n              \" total reservations queued.\");\n    reservations.add(taskReservation);\n    return ++numQueuedReservations;\n  }\n\n  @Override\n  synchronized int cancelTaskReservations(String requestId) {\n    int numReservationsCancelled = 0;\n    for (Queue<TaskSpec> taskSpecs : priorityQueues.values()) {\n      Iterator<TaskSpec> iterator = taskSpecs.iterator();\n      while (iterator.hasNext()) {\n        TaskSpec reservation = iterator.next();\n        if (reservation.requestId == requestId) {\n          ++numReservationsCancelled;\n          iterator.remove();\n        }\n      }\n    }\n    return numReservationsCancelled;\n  }\n\n  @Override\n  protected void handleTaskFinished(String requestId, String taskId) {\n    attemptTaskLaunch(requestId, taskId);\n  }\n\n  @Override\n  protected void handleNoTaskForReservation(TaskSpec taskSpec) {\n    attemptTaskLaunch(taskSpec.previousRequestId, taskSpec.previousTaskId);\n  }\n\n  /**\n   * Attempts to launch a new task.\n   *\n   * The parameters {@code lastExecutedRequestId} and {@code lastExecutedTaskId} are used purely\n   * for logging purposes, to determine how long the node monitor spends trying to find a new\n   * task to execute. This method needs to be synchronized to prevent a race condition with\n   * {@link handleSubmitTaskReservation}.\n   */\n  private synchronized void attemptTaskLaunch(\n      String lastExecutedRequestId, String lastExecutedTaskId) {\n    if (numQueuedReservations != 0) {\n      // Launch a task for the lowest valued priority with queued tasks.\n      for (Entry<Integer, Queue<TaskSpec>> entry : priorityQueues.entrySet()) {\n        TaskSpec nextTask = entry.getValue().poll();\n        if (nextTask != null) {\n          LOG.debug(\"Launching task for request \" + nextTask.requestId + \" (priority \" +\n                    entry.getKey() + \")\");\n          nextTask.previousRequestId = lastExecutedRequestId;\n          nextTask.previousTaskId = lastExecutedTaskId;\n          makeTaskRunnable(nextTask);\n          numQueuedReservations--;\n          return;\n        }\n      }\n      String errorMessage = (\"numQueuedReservations=\" + numQueuedReservations +\n          \" but no queued tasks found.\");\n      throw new IllegalStateException(errorMessage);\n    } else {\n      LOG.debug(\"No queued tasks, so not launching anything.\");\n      activeTasks -= 1;\n    }\n  }\n\n  @Override\n  int getMaxActiveTasks() {\n    return maxActiveTasks;\n  }\n\n}\n"
  },
  {
    "path": "src/main/java/edu/berkeley/sparrow/daemon/nodemonitor/RoundRobinTaskScheduler.java",
    "content": "/*\n * Copyright 2013 The Regents of The University California\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *   http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage edu.berkeley.sparrow.daemon.nodemonitor;\n\nimport java.util.ArrayList;\nimport java.util.HashMap;\nimport java.util.Iterator;\nimport java.util.LinkedList;\nimport java.util.Queue;\n\nimport org.apache.log4j.Logger;\n\nimport com.google.common.collect.Maps;\n\n/**\n * A {@link TaskScheduler} which round-robins requests over per-user queues.\n *\n * When a user is allocated a \"slot\", this scheduler attempts to fetch a task for the next\n * queued reservation.  If a task for the given reservation is not available, the scheduler will\n * try to launch anothe task for the same user.\n *\n * NOTE: This currently round-robins over users, rather than applications. Not sure\n * what we want here going forward.\n */\npublic class RoundRobinTaskScheduler extends TaskScheduler {\n  private final static Logger LOG = Logger.getLogger(RoundRobinTaskScheduler.class);\n\n  private HashMap<String, Queue<TaskSpec>> userQueues = Maps.newHashMap();\n  int numQueuedReservations;\n\n  public int maxActiveTasks;\n  public Integer activeTasks;\n\n  private ArrayList<String> users = new ArrayList<String>();\n  private int currentIndex = 0; // Round robin index, always used (mod n) where n is\n                                // the number of users.\n\n  public RoundRobinTaskScheduler(int maxActiveTasks) {\n    this.maxActiveTasks = maxActiveTasks;\n    activeTasks = 0;\n    numQueuedReservations = 0;\n  }\n\n  @Override\n  synchronized int handleSubmitTaskReservation(TaskSpec taskReservation) {\n     /* Because of the need to check the free resources and then, depending on the result, start a\n      * new task, this method must be synchronized.\n      */\n    String user = taskReservation.user.getUser();\n    if (!userQueues.containsKey(user)) {\n      users.add(user);\n      userQueues.put(user, new LinkedList<TaskSpec>());\n    }\n\n    if (activeTasks < maxActiveTasks) {\n      if (numQueuedReservations > 0) {\n        String errorMessage = \"activeTasks should be less than maxActiveTasks only \" +\n            \"when no outstanding reservations.\";\n        LOG.error(errorMessage);\n        throw new IllegalStateException(errorMessage);\n      }\n      makeTaskRunnable(taskReservation);\n      // Set current Index to immediately after this user, to reflect the fact that a task for this\n      // user was the most recent one to be given a chance to run.\n      currentIndex = (users.indexOf(taskReservation.user.getUser()) + 1) % users.size();\n      ++activeTasks;\n      LOG.debug(\"Making task for request \" + taskReservation.requestId + \" runnable (\" +\n                activeTasks + \" of \" + maxActiveTasks + \" task slots currently filled)\");\n      return 0;\n    }\n\n    LOG.debug(\"All \" + maxActiveTasks + \" task slots filled.\");\n    Queue<TaskSpec> reservations = userQueues.get(user);\n    LOG.debug(\"Adding reservation for user \" + user + \". \" + reservations.size() +\n              \" reservations already queued for user, and \" + numQueuedReservations +\n              \" total reservations queued.\");\n    reservations.add(taskReservation);\n    return ++numQueuedReservations;\n  }\n\n  @Override\n  synchronized int cancelTaskReservations(String requestId) {\n    int numReservationsCancelled = 0;\n    for (Queue<TaskSpec> taskReservations : userQueues.values()) {\n      Iterator<TaskSpec> iterator = taskReservations.iterator();\n      while (iterator.hasNext()) {\n        TaskSpec reservation = iterator.next();\n        if (reservation.requestId == requestId) {\n          iterator.remove();\n          ++numReservationsCancelled;\n        }\n      }\n    }\n    return numReservationsCancelled;\n  }\n\n  @Override\n  protected void handleTaskFinished(String requestId, String taskId) {\n    attemptTaskLaunch(requestId, taskId);\n  }\n\n  @Override\n  protected void handleNoTaskForReservation(TaskSpec taskSpec) {\n    if (attemptTaskLaunchForUser(\n        taskSpec.previousRequestId, taskSpec.previousTaskId, taskSpec.user.getUser())) {\n      // Don't update currentIndex! Trying to launch another task for a user whose previous\n      // reservations couldn't be fulfilled shouldn't affect round robin ordering.\n      return;\n    }\n    attemptTaskLaunch(taskSpec.previousRequestId, taskSpec.previousTaskId);\n  }\n\n  /**\n   * Attempts to launch a new task, using round-robin ordering to determine the user.\n   *\n   * The parameters {@code lastExecutedRequestId} and {@code lastExecutedTaskId} are used purely\n   * for logging purposes, to determine how long the node monitor spends trying to find a new\n   * task to execute. This method must be synchronized to prevent a race condition with\n   * {@link handleSubmitTaskReservation}.\n   */\n  private synchronized void attemptTaskLaunch(String lastExecutedRequestId, String lastExecutedTaskId) {\n    if (numQueuedReservations != 0) {\n      /* Scan through the list of users (starting at currentIndex) and find the first\n       * one with a pending task. If we find a pending task, make that task runnable\n       * and update the round robin index.\n       *\n       * Note that this implementation assumes that we can take an arbitrary task and,\n       * by virtue of a task having just finished, have enough resources to execute it.\n       * This makes sense for scheduling similarly sized tasks (e.g. just scheduling cores)\n       * but will not be the case if tasks take different amounts of resources. */\n      for (int offset = 0; offset < users.size(); offset++) {\n        String user = users.get((currentIndex + offset) % users.size());\n        if (attemptTaskLaunchForUser(lastExecutedRequestId, lastExecutedTaskId, user)) {\n          currentIndex = (currentIndex + offset + 1) % users.size();\n          return;\n        }\n      }\n      String errorMessage = (\"numQueuedReservations=\" + numQueuedReservations +\n                             \" but no queued tasks found.\");\n      throw new IllegalStateException(errorMessage);\n    } else {\n      LOG.debug(\"No queued tasks, so not launching anything.\");\n      activeTasks -= 1;\n    }\n  }\n\n  /**\n   * Launches a task for the given user, if that user has any tasks queued.\n   *\n   * Returns true if a task was launched for the given user. This method must be synchronized to\n   * avoid concurrent concurrent modification to {@link userQueues} in\n   * {@link handleSubmitTaskReservation}.\n   */\n  private synchronized boolean attemptTaskLaunchForUser(String lastExecutedTaskRequestId,\n      String lastExecutedTaskId, String user) {\n    Queue<TaskSpec> considering = userQueues.get(user);\n    TaskSpec nextTask = considering.poll();\n    if (nextTask != null) {\n      LOG.debug(\"Task for user \" + user + \", request \" + nextTask.requestId +\n                \" now runnable.\");\n      nextTask.previousRequestId = lastExecutedTaskRequestId;\n      nextTask.previousTaskId = lastExecutedTaskId;\n      makeTaskRunnable(nextTask);\n      numQueuedReservations--;\n      /* Never remove users from the queue, because it will make currentIndex no longer right,\n       * and we don't expect user churn right now. */\n      return true;\n    }\n    LOG.debug(\"Skipping user \" + user + \" that has no runnable tasks.\");\n    return false;\n  }\n\n  @Override\n  int getMaxActiveTasks() {\n    return maxActiveTasks;\n  }\n\n}\n"
  },
  {
    "path": "src/main/java/edu/berkeley/sparrow/daemon/nodemonitor/StandaloneNodeMonitorState.java",
    "content": "/*\n * Copyright 2013 The Regents of The University California\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *   http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage edu.berkeley.sparrow.daemon.nodemonitor;\n\nimport java.net.InetSocketAddress;\n\nimport org.apache.commons.configuration.Configuration;\n\nimport edu.berkeley.sparrow.daemon.StandaloneStateStore;\n\n/**\n * A {@link NodeMonitorState} implementation for use in standalone mode.\n */\npublic class StandaloneNodeMonitorState implements NodeMonitorState {\n  private StandaloneStateStore stateStore = StandaloneStateStore.getInstance();\n \n  @Override\n  public void initialize(Configuration conf) {\n    // Nothing required\n  }\n  \n  @Override\n  public boolean registerBackend(String appId, InetSocketAddress nmAddr) {\n    stateStore.registerBackend(appId, nmAddr);\n    return true;\n  }\n}\n"
  },
  {
    "path": "src/main/java/edu/berkeley/sparrow/daemon/nodemonitor/TaskLauncherService.java",
    "content": "/*\n * Copyright 2013 The Regents of The University California\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage edu.berkeley.sparrow.daemon.nodemonitor;\n\nimport java.io.IOException;\nimport java.net.InetSocketAddress;\nimport java.util.HashMap;\nimport java.util.List;\nimport java.util.concurrent.ExecutorService;\nimport java.util.concurrent.Executors;\n\nimport org.apache.commons.configuration.Configuration;\nimport org.apache.log4j.Logger;\nimport org.apache.thrift.TException;\n\nimport com.google.common.collect.Lists;\nimport com.google.common.collect.Maps;\n\nimport edu.berkeley.sparrow.daemon.nodemonitor.TaskScheduler.TaskSpec;\nimport edu.berkeley.sparrow.daemon.scheduler.SchedulerThrift;\nimport edu.berkeley.sparrow.daemon.util.Logging;\nimport edu.berkeley.sparrow.daemon.util.Network;\nimport edu.berkeley.sparrow.daemon.util.Resources;\nimport edu.berkeley.sparrow.daemon.util.TClients;\nimport edu.berkeley.sparrow.thrift.BackendService;\nimport edu.berkeley.sparrow.thrift.GetTaskService;\nimport edu.berkeley.sparrow.thrift.TFullTaskId;\nimport edu.berkeley.sparrow.thrift.THostPort;\nimport edu.berkeley.sparrow.thrift.TTaskLaunchSpec;\n\n/**\n * TaskLauncher service consumes TaskReservations produced by {@link TaskScheduler.getNextTask}.\n * For each TaskReservation, the TaskLauncherService attempts to fetch the task specification from\n * the scheduler that sent the reservation using the {@code getTask} RPC; if it successfully\n * fetches a task, it launches the task on the appropriate backend.\n *\n * TaskLauncherService uses multiple threads to launch tasks. Each thread keeps a client for\n * each scheduler, and a client for each application backend, and the TaskLauncherService uses\n * a number of threads equal to the number of slots available for running tasks on the machine.\n */\npublic class TaskLauncherService {\n  private final static Logger LOG = Logger.getLogger(TaskLauncherService.class);\n  private final static Logger AUDIT_LOG = Logging.getAuditLogger(TaskLauncherService.class);\n\n  /* The number of threads used by the service. */\n  private int numThreads;\n\n  private THostPort nodeMonitorInternalAddress;\n\n  private TaskScheduler scheduler;\n\n  /** A runnable that spins in a loop asking for tasks to launch and launching them. */\n  private class TaskLaunchRunnable implements Runnable {\n\n    /** Client to use to communicate with each scheduler (indexed by scheduler hostname). */\n    private HashMap<String, GetTaskService.Client> schedulerClients = Maps.newHashMap();\n\n    /** Client to use to communicate with each application backend (indexed by backend address). */\n    private HashMap<InetSocketAddress, BackendService.Client> backendClients = Maps.newHashMap();\n\n    @Override\n    public void run() {\n      while (true) {\n        TaskSpec task = scheduler.getNextTask(); // blocks until task is ready\n\n        List<TTaskLaunchSpec> taskLaunchSpecs = executeGetTaskRpc(task);\n        AUDIT_LOG.info(Logging.auditEventString(\"node_monitor_get_task_complete\", task.requestId,\n            nodeMonitorInternalAddress.getHost()));\n\n        if (taskLaunchSpecs.isEmpty()) {\n          LOG.debug(\"Didn't receive a task for request \" + task.requestId);\n          scheduler.noTaskForReservation(task);\n          continue;\n        }\n        if (taskLaunchSpecs.size() > 1) {\n          LOG.warn(\"Received \" + taskLaunchSpecs +\n                   \" task launch specifications; ignoring all but the first one.\");\n        }\n        task.taskSpec = taskLaunchSpecs.get(0);\n        LOG.debug(\"Received task for request \" + task.requestId + \", task \" +\n                  task.taskSpec.getTaskId());\n\n        // Launch the task on the backend.\n        AUDIT_LOG.info(Logging.auditEventString(\"node_monitor_task_launch\",\n            task.requestId,\n            nodeMonitorInternalAddress.getHost(),\n            task.taskSpec.getTaskId(),\n            task.previousRequestId,\n            task.previousTaskId));\n        executeLaunchTaskRpc(task);\n        LOG.debug(\"Launched task \" + task.taskSpec.getTaskId() + \" for request \" + task.requestId +\n            \" on application backend at system time \" + System.currentTimeMillis());\n      }\n\n    }\n\n    /** Uses a getTask() RPC to get the task specification from the appropriate scheduler. */\n    private List<TTaskLaunchSpec> executeGetTaskRpc(TaskSpec task) {\n      String schedulerAddress = task.schedulerAddress.getAddress().getHostAddress();\n      if (!schedulerClients.containsKey(schedulerAddress)) {\n        try {\n          schedulerClients.put(schedulerAddress,\n              TClients.createBlockingGetTaskClient(\n                  task.schedulerAddress.getAddress().getHostAddress(),\n                  SchedulerThrift.DEFAULT_GET_TASK_PORT));\n        } catch (IOException e) {\n          LOG.error(\"Error creating thrift client: \" + e.getMessage());\n          List<TTaskLaunchSpec> emptyTaskLaunchSpecs = Lists.newArrayList();\n          return emptyTaskLaunchSpecs;\n        }\n      }\n      GetTaskService.Client getTaskClient = schedulerClients.get(schedulerAddress);\n\n      long startTimeMillis = System.currentTimeMillis();\n      long startGCCount = Logging.getGCCount();\n\n      LOG.debug(\"Attempting to get task for request \" + task.requestId);\n      AUDIT_LOG.debug(Logging.auditEventString(\"node_monitor_get_task_launch\", task.requestId,\n          nodeMonitorInternalAddress.getHost()));\n      List<TTaskLaunchSpec> taskLaunchSpecs;\n      try {\n        taskLaunchSpecs = getTaskClient.getTask(task.requestId, nodeMonitorInternalAddress);\n      } catch (TException e) {\n        LOG.error(\"Error when launching getTask RPC:\" + e.getMessage());\n        List<TTaskLaunchSpec> emptyTaskLaunchSpecs = Lists.newArrayList();\n        return emptyTaskLaunchSpecs;\n      }\n\n      long rpcTime = System.currentTimeMillis() - startTimeMillis;\n      long numGarbageCollections = Logging.getGCCount() - startGCCount;\n      LOG.debug(\"GetTask() RPC for request \" + task.requestId + \" completed in \" +  rpcTime +\n                \"ms (\" + numGarbageCollections + \"GCs occured during RPC)\");\n      return taskLaunchSpecs;\n    }\n\n    /** Executes an RPC to launch a task on an application backend. */\n    private void executeLaunchTaskRpc(TaskSpec task) {\n      if (!backendClients.containsKey(task.appBackendAddress)) {\n        try {\n          backendClients.put(task.appBackendAddress,\n              TClients.createBlockingBackendClient(task.appBackendAddress));\n        } catch (IOException e) {\n          LOG.error(\"Error creating thrift client: \" + e.getMessage());\n          return;\n        }\n      }\n      BackendService.Client backendClient = backendClients.get(task.appBackendAddress);\n      THostPort schedulerHostPort = Network.socketAddressToThrift(task.schedulerAddress);\n      TFullTaskId taskId = new TFullTaskId(task.taskSpec.getTaskId(), task.requestId,\n          task.appId, schedulerHostPort);\n      try {\n        backendClient.launchTask(task.taskSpec.bufferForMessage(), taskId, task.user);\n      } catch (TException e) {\n        LOG.error(\"Unable to launch task on backend \" + task.appBackendAddress + \":\" + e);\n      }\n    }\n  }\n\n  public void initialize(Configuration conf, TaskScheduler scheduler,\n      int nodeMonitorPort) {\n    numThreads = scheduler.getMaxActiveTasks();\n    if (numThreads <= 0) {\n      // If the scheduler does not enforce a maximum number of tasks, just use a number of\n      // threads equal to the number of cores.\n      numThreads = Resources.getSystemCPUCount(conf);\n    }\n    this.scheduler = scheduler;\n    nodeMonitorInternalAddress = new THostPort(Network.getIPAddress(conf), nodeMonitorPort);\n    ExecutorService service = Executors.newFixedThreadPool(numThreads);\n    for (int i = 0; i < numThreads; i++) {\n      service.submit(new TaskLaunchRunnable());\n    }\n  }\n}\n"
  },
  {
    "path": "src/main/java/edu/berkeley/sparrow/daemon/nodemonitor/TaskScheduler.java",
    "content": "/*\n * Copyright 2013 The Regents of The University California\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *   http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage edu.berkeley.sparrow.daemon.nodemonitor;\n\nimport java.net.InetSocketAddress;\nimport java.util.List;\nimport java.util.concurrent.BlockingQueue;\nimport java.util.concurrent.LinkedBlockingQueue;\n\nimport org.apache.commons.configuration.Configuration;\nimport org.apache.log4j.Logger;\n\nimport edu.berkeley.sparrow.daemon.util.Logging;\nimport edu.berkeley.sparrow.daemon.util.Network;\nimport edu.berkeley.sparrow.thrift.TEnqueueTaskReservationsRequest;\nimport edu.berkeley.sparrow.thrift.TFullTaskId;\nimport edu.berkeley.sparrow.thrift.TTaskLaunchSpec;\nimport edu.berkeley.sparrow.thrift.TUserGroupInfo;\n\n/**\n * A TaskScheduler is a buffer that holds task reservations until an application backend is\n * available to run the task. When a backend is ready, the TaskScheduler requests the task\n * from the {@link Scheduler} that submitted the reservation.\n *\n * Each scheduler will implement a different policy determining when to launch tasks.\n *\n * Schedulers are required to be thread safe, as they will be accessed concurrently from\n * multiple threads.\n */\npublic abstract class TaskScheduler {\n  protected class TaskSpec {\n    public String appId;\n    public TUserGroupInfo user;\n    public String requestId;\n\n    public InetSocketAddress schedulerAddress;\n    public InetSocketAddress appBackendAddress;\n\n    /**\n     * ID of the task that previously ran in the slot this task is using. Used\n     * to track how long it takes to fill an empty slot on a slave. Empty if this task was launched\n     * immediately, because there were empty slots available on the slave.  Filled in when\n     * the task is launched.\n     */\n    public String previousRequestId;\n    public String previousTaskId;\n\n    /** Filled in after the getTask() RPC completes. */\n    public TTaskLaunchSpec taskSpec;\n\n    public TaskSpec(TEnqueueTaskReservationsRequest request, InetSocketAddress appBackendAddress) {\n      appId = request.getAppId();\n      user = request.getUser();\n      requestId = request.getRequestId();\n      schedulerAddress = new InetSocketAddress(request.getSchedulerAddress().getHost(),\n                                               request.getSchedulerAddress().getPort());\n      this.appBackendAddress = appBackendAddress;\n      previousRequestId = \"\";\n      previousTaskId = \"\";\n    }\n  }\n\n  private final static Logger LOG = Logger.getLogger(TaskScheduler.class);\n  private final static Logger AUDIT_LOG = Logging.getAuditLogger(TaskScheduler.class);\n  private String ipAddress;\n\n  protected Configuration conf;\n  private final BlockingQueue<TaskSpec> runnableTaskQueue =\n      new LinkedBlockingQueue<TaskSpec>();\n\n  /** Initialize the task scheduler, passing it the current available resources\n   *  on the machine. */\n  void initialize(Configuration conf, int nodeMonitorPort) {\n    this.conf = conf;\n    this.ipAddress = Network.getIPAddress(conf);\n  }\n\n  /**\n   * Get the next task available for launching. This will block until a task is available.\n   */\n  TaskSpec getNextTask() {\n    TaskSpec task = null;\n    try {\n      task = runnableTaskQueue.take();\n    } catch (InterruptedException e) {\n      LOG.fatal(e);\n    }\n    return task;\n  }\n\n  /**\n   * Returns the current number of runnable tasks (for testing).\n   */\n  int runnableTasks() {\n    return runnableTaskQueue.size();\n  }\n\n  void tasksFinished(List<TFullTaskId> finishedTasks) {\n    for (TFullTaskId t : finishedTasks) {\n      AUDIT_LOG.info(Logging.auditEventString(\"task_completed\", t.getRequestId(), t.getTaskId()));\n      handleTaskFinished(t.getRequestId(), t.getTaskId());\n    }\n  }\n\n  void noTaskForReservation(TaskSpec taskReservation) {\n    AUDIT_LOG.info(Logging.auditEventString(\"node_monitor_get_task_no_task\",\n                                            taskReservation.requestId,\n                                            taskReservation.previousRequestId,\n                                            taskReservation.previousTaskId));\n    handleNoTaskForReservation(taskReservation);\n  }\n\n  protected void makeTaskRunnable(TaskSpec task) {\n    try {\n      LOG.debug(\"Putting reservation for request \" + task.requestId + \" in runnable queue\");\n      runnableTaskQueue.put(task);\n    } catch (InterruptedException e) {\n      LOG.fatal(\"Unable to add task to runnable queue: \" + e.getMessage());\n    }\n  }\n\n  public synchronized void submitTaskReservations(TEnqueueTaskReservationsRequest request,\n                                                  InetSocketAddress appBackendAddress) {\n    for (int i = 0; i < request.getNumTasks(); ++i) {\n      LOG.debug(\"Creating reservation \" + i + \" for request \" + request.getRequestId());\n      TaskSpec reservation = new TaskSpec(request, appBackendAddress);\n      int queuedReservations = handleSubmitTaskReservation(reservation);\n      AUDIT_LOG.info(Logging.auditEventString(\"reservation_enqueued\", ipAddress, request.requestId,\n                                              queuedReservations));\n    }\n  }\n\n  // TASK SCHEDULERS MUST IMPLEMENT THE FOLLOWING.\n\n  /**\n   * Handles a task reservation. Returns the number of queued reservations.\n   */\n  abstract int handleSubmitTaskReservation(TaskSpec taskReservation);\n\n  /**\n   * Cancels all task reservations with the given request id. Returns the number of task\n   * reservations cancelled.\n   */\n  abstract int cancelTaskReservations(String requestId);\n\n  /**\n   * Handles the completion of a task that has finished executing.\n   */\n  protected abstract void handleTaskFinished(String requestId, String taskId);\n\n  /**\n   * Handles the case when the node monitor tried to launch a task for a reservation, but\n   * the corresponding scheduler didn't return a task (typically because all of the corresponding\n   * job's tasks have been launched).\n   */\n  protected abstract void handleNoTaskForReservation(TaskSpec taskSpec);\n\n  /**\n   * Returns the maximum number of active tasks allowed (the number of slots).\n   *\n   * -1 signals that the scheduler does not enforce a maximum number of active tasks.\n   */\n  abstract int getMaxActiveTasks();\n}\n"
  },
  {
    "path": "src/main/java/edu/berkeley/sparrow/daemon/scheduler/CancellationService.java",
    "content": "/*\n * Copyright 2013 The Regents of The University California\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *   http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage edu.berkeley.sparrow.daemon.scheduler;\n\nimport java.net.InetSocketAddress;\nimport java.util.concurrent.BlockingQueue;\nimport java.util.concurrent.LinkedBlockingQueue;\n\nimport org.apache.log4j.Logger;\nimport org.apache.thrift.async.AsyncMethodCallback;\n\nimport edu.berkeley.sparrow.daemon.util.ThriftClientPool;\nimport edu.berkeley.sparrow.thrift.InternalService;\nimport edu.berkeley.sparrow.thrift.InternalService.AsyncClient;\nimport edu.berkeley.sparrow.thrift.InternalService.AsyncClient.cancelTaskReservations_call;\nimport edu.berkeley.sparrow.thrift.TCancelTaskReservationsRequest;\nimport edu.berkeley.sparrow.thrift.THostPort;\n\npublic class CancellationService implements Runnable {\n  private ThriftClientPool<InternalService.AsyncClient> clientPool;\n  private final BlockingQueue<Cancellation> cancellationQueue;\n  private final static Logger LOG = Logger.getLogger(CancellationService.class);\n\n  private class Cancellation {\n    public String requestId;\n    public InetSocketAddress nodeMonitorAddress;\n\n    public Cancellation (String requestId, InetSocketAddress nodeMonitorAddress) {\n      this.requestId = requestId;\n      this.nodeMonitorAddress = nodeMonitorAddress;\n    }\n  }\n\n  public CancellationService(ThriftClientPool<InternalService.AsyncClient> clientPool) {\n    this.clientPool = clientPool;\n    this.cancellationQueue = new LinkedBlockingQueue<Cancellation>();\n  }\n\n  public void addCancellation(String requestId, THostPort nodeMonitorAddress) {\n    InetSocketAddress socketAddress = new InetSocketAddress(\n        nodeMonitorAddress.host, nodeMonitorAddress.port);\n    this.cancellationQueue.add(new Cancellation(requestId, socketAddress));\n  }\n\n  public void run() {\n    while (true) {\n      Cancellation cancellation = null;\n      try {\n        cancellation = cancellationQueue.take();\n      } catch (InterruptedException e) {\n        LOG.fatal(e);\n      }\n\n      try {\n        InternalService.AsyncClient client = clientPool.borrowClient(\n            cancellation.nodeMonitorAddress);\n        LOG.debug(\"Cancelling tasks for request \" + cancellation.requestId + \" on node \" +\n            cancellation.nodeMonitorAddress);\n        client.cancelTaskReservations(\n            new TCancelTaskReservationsRequest(cancellation.requestId),\n            new CancelTaskReservationsCallback(cancellation.nodeMonitorAddress));\n      } catch (Exception e) {\n        LOG.error(\"Error cancelling request \" + cancellation.requestId + \" on node \" +\n                  cancellation.nodeMonitorAddress+ \": \" + e.getMessage());\n      }\n    }\n  }\n\n  /** A callback for CancelTaskReservations() RPCs that returns the client to the client pool. */\n  private class CancelTaskReservationsCallback\n  implements AsyncMethodCallback<cancelTaskReservations_call> {\n    InetSocketAddress nodeMonitorAddress;\n\n    public CancelTaskReservationsCallback(InetSocketAddress nodeMonitorAddress) {\n      this.nodeMonitorAddress = nodeMonitorAddress;\n    }\n\n    @Override\n    public void onComplete(cancelTaskReservations_call response) {\n      try {\n        clientPool.returnClient(nodeMonitorAddress, (AsyncClient) response.getClient());\n      } catch (Exception e) {\n        LOG.error(\"Error returning client to node monitor client pool: \" + e);\n      }\n    }\n\n    @Override\n    public void onError(Exception exception) {\n      LOG.error(\"Error executing cancelTaskReservations RPC: \" + exception);\n    }\n\n  }\n\n}\n"
  },
  {
    "path": "src/main/java/edu/berkeley/sparrow/daemon/scheduler/ConfigSchedulerState.java",
    "content": "/*\n * Copyright 2013 The Regents of The University California\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *   http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage edu.berkeley.sparrow.daemon.scheduler;\n\nimport java.net.InetSocketAddress;\nimport java.util.Set;\n\nimport org.apache.commons.configuration.Configuration;\nimport org.apache.log4j.Logger;\n\nimport edu.berkeley.sparrow.daemon.SparrowConf;\nimport edu.berkeley.sparrow.daemon.util.ConfigUtil;\n\n/**\n * Scheduler state that operates based on a static configuration file.\n */\npublic class ConfigSchedulerState implements SchedulerState {\n  private static final Logger LOG = Logger.getLogger(ConfigSchedulerState.class);\n\n  Set<InetSocketAddress> backends;\n  private Configuration conf;\n\n  @Override\n  public void initialize(Configuration conf) {\n    backends = ConfigUtil.parseBackends(conf);\n    this.conf = conf;\n  }\n\n  @Override\n  public boolean watchApplication(String appId) {\n    if (!appId.equals(conf.getString(SparrowConf.STATIC_APP_NAME))) {\n      LOG.warn(\"Requested watch for app \" + appId +\n          \" but was expecting app \" + conf.getString(SparrowConf.STATIC_APP_NAME));\n    }\n    return true;\n  }\n\n  @Override\n  public Set<InetSocketAddress> getBackends(String appId) {\n    if (!appId.equals(conf.getString(SparrowConf.STATIC_APP_NAME))) {\n     LOG.warn(\"Requested backends for app \" + appId +\n          \" but was expecting app \" + conf.getString(SparrowConf.STATIC_APP_NAME));\n    }\n    return backends;\n  }\n\n}\n"
  },
  {
    "path": "src/main/java/edu/berkeley/sparrow/daemon/scheduler/ConstrainedTaskPlacer.java",
    "content": "/*\n * Copyright 2013 The Regents of The University California\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *   http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage edu.berkeley.sparrow.daemon.scheduler;\n\nimport java.net.InetAddress;\nimport java.net.InetSocketAddress;\nimport java.net.UnknownHostException;\nimport java.util.Collection;\nimport java.util.Collections;\nimport java.util.HashMap;\nimport java.util.HashSet;\nimport java.util.LinkedList;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.Map.Entry;\nimport java.util.Set;\n\nimport org.apache.log4j.Logger;\n\nimport com.google.common.collect.Lists;\nimport com.google.common.collect.Maps;\n\nimport edu.berkeley.sparrow.daemon.util.Logging;\nimport edu.berkeley.sparrow.thrift.TEnqueueTaskReservationsRequest;\nimport edu.berkeley.sparrow.thrift.THostPort;\nimport edu.berkeley.sparrow.thrift.TSchedulingRequest;\nimport edu.berkeley.sparrow.thrift.TTaskLaunchSpec;\nimport edu.berkeley.sparrow.thrift.TTaskSpec;\nimport edu.berkeley.sparrow.thrift.TUserGroupInfo;\n\n/**\n * The constrained task placer may be used to place jobs with tasks that are some combination of\n * constrained and unconstrained, or jobs that just have constrained tasks.\n */\npublic class ConstrainedTaskPlacer implements TaskPlacer {\n  private static final Logger LOG = Logger.getLogger(ConstrainedTaskPlacer.class);\n\n  /** Constrained tasks that have been launched. */\n  private Set<TTaskLaunchSpec> launchedConstrainedTasks;\n\n  /**\n   * For each node monitor, the constrained tasks that can be launched there. Unconstrained\n   * tasks will never appear in this mapping.  Constrained tasks for which\n   * reservations were made on the backend are placed at the beginning of the list; any other\n   * constrained tasks that can run on the backend are placed at the end of the list.\n   */\n  private Map<THostPort, List<TTaskLaunchSpec>> unlaunchedConstrainedTasks;\n\n  /**\n   * For each node monitor where reservations were enqueued, the number of reservations that were\n   * enqueued there.\n   */\n  private Map<THostPort, Integer> outstandingReservations;\n\n  /** Whether the remaining reservations have been cancelled. */\n  boolean cancelled;\n\n  /** Number of tasks that still need to be placed. */\n  private int numRemainingTasks;\n\n  private double probeRatio;\n\n  /** Id of the request associated with this task placer. */\n  String requestId;\n\n  /**\n   * Tasks that are unconstrained, so can be placed on any node monitor, that have not yet been\n   * launched.\n   */\n  List<TTaskLaunchSpec> unlaunchedUnconstrainedTasks;\n\n  ConstrainedTaskPlacer(String requestId, double probeRatio){\n    this.requestId = requestId;\n    this.probeRatio = probeRatio;\n    launchedConstrainedTasks = new HashSet<TTaskLaunchSpec>();\n    unlaunchedConstrainedTasks = new HashMap<THostPort, List<TTaskLaunchSpec>>();\n    unlaunchedUnconstrainedTasks = Lists.newArrayList();\n    outstandingReservations = new HashMap<THostPort, Integer>();\n  }\n\n  @Override\n  public Map<InetSocketAddress, TEnqueueTaskReservationsRequest>\n  getEnqueueTaskReservationsRequests(\n      TSchedulingRequest schedulingRequest, String requestId,\n      Collection<InetSocketAddress> nodes, THostPort schedulerAddress) {\n    LOG.debug(Logging.functionCall(schedulingRequest, requestId, nodes, schedulerAddress));\n    numRemainingTasks = schedulingRequest.getTasksSize();\n\n    // Tracks number of tasks to be enqueued at each node monitor.\n    HashMap<InetSocketAddress, TEnqueueTaskReservationsRequest> requests = Maps.newHashMap();\n\n    // Create a mapping of node monitor hostnames to socket addresses, to use to map node\n    // preferences to the node monitor InetSocketAddresss.\n    // TODO: Perform this in the scheduler, and reuse the mapping across multiple\n    //       ConstrainedTaskPlacers?\n    HashMap<InetAddress, InetSocketAddress> addrToSocket = Maps.newHashMap();\n    for (InetSocketAddress node : nodes) {\n      if (addrToSocket.containsKey(node.getAddress())) {\n        // TODO: Should we support this case?  Seems like it's only useful for testing.\n        LOG.warn(\"Two node monitors at \" + node.getAddress() + \"; only one will be used for \" +\n                 \"scheduling.\");\n      }\n      addrToSocket.put(node.getAddress(), node);\n    }\n\n    /* Shuffle tasks, to ensure that we don't use the same set of machines each time a job is\n     * submitted. */\n    List<TTaskSpec> taskList = Lists.newArrayList(schedulingRequest.getTasks());\n    Collections.shuffle(taskList);\n\n    List<TTaskSpec> unconstrainedTasks = Lists.newArrayList();\n\n    for (TTaskSpec task : taskList) {\n      if (task.preference == null || task.preference.nodes == null ||\n          task.preference.nodes.size() == 0) {\n        unconstrainedTasks.add(task);\n        continue;\n      }\n\n      List<InetSocketAddress> preferredNodes = taskPreferencesToSocketList(task, addrToSocket);\n\n      TTaskLaunchSpec taskLaunchSpec = new TTaskLaunchSpec(task.getTaskId(),\n                                                           task.bufferForMessage());\n\n      int numEnqueuedNodes = 0;\n      for (InetSocketAddress addr : preferredNodes) {\n        THostPort hostPort = new THostPort(addr.getAddress().getHostAddress(), addr.getPort());\n        if (!unlaunchedConstrainedTasks.containsKey(hostPort)) {\n          unlaunchedConstrainedTasks.put(\n              hostPort, new LinkedList<TTaskLaunchSpec>());\n        }\n\n        if (numEnqueuedNodes < probeRatio) {\n          // TODO: Try to select nodes that haven't already been used by another task.\n          if (!requests.containsKey(addr)) {\n            TEnqueueTaskReservationsRequest request = new TEnqueueTaskReservationsRequest(\n                schedulingRequest.getApp(), schedulingRequest.getUser(), requestId,\n                schedulerAddress, 1);\n            requests.put(addr, request);\n          } else {\n            // IsSetNumTasks should already be true, because it was set when the request was\n            // created.\n            requests.get(addr).numTasks += 1;\n          }\n\n          unlaunchedConstrainedTasks.get(hostPort).add(0, taskLaunchSpec);\n          numEnqueuedNodes += 1;\n        } else {\n          // As an optimization, add the task at the end of the list of tasks on the node monitor,\n          // so that if all the tasks responsible for probing the node monitor have been launched\n          // when the node monitor is ready to launch a task, and this task hasn't been launched\n          // yet, this task can use the node monitor. This means that there may be more entries in\n          // nodeMonitorsToTasks than in nodeMonitorTaskCount for some addresses.\n          unlaunchedConstrainedTasks.get(hostPort).add(taskLaunchSpec);\n        }\n      }\n\n      if (numEnqueuedNodes < probeRatio) {\n        // This case can occur when the probeRatio is greater than the size of preferred nodes.\n        LOG.info(\"For request \" + requestId + \",task \" + task.taskId +\n                 \", only created enqueueTaskRequests on \" +\n                 numEnqueuedNodes + \" node monitors, which is fewer than specified by the \" +\n                 \"probe ratio (\" + probeRatio + \")\");\n      }\n    }\n\n    LOG.debug(\"Request \" + requestId + \": created enqueue task reservation requests at \" +\n              requests.keySet().size() + \" node monitors for constrained tasks. \" +\n              unconstrainedTasks.size() + \" unconstrained tasks\");\n\n    if (unconstrainedTasks.size() > 0) {\n      addRequestsForUnconstrainedTasks(\n          unconstrainedTasks, requestId, schedulingRequest.getApp(), schedulingRequest.getUser(),\n          schedulerAddress, nodes, requests);\n    }\n\n    populateOutstandingReservations(requests);\n\n    return requests;\n  }\n\n  private void populateOutstandingReservations(\n      Map<InetSocketAddress, TEnqueueTaskReservationsRequest> requests) {\n    for (Entry<InetSocketAddress, TEnqueueTaskReservationsRequest> entry: requests.entrySet()) {\n      THostPort hostPort = new THostPort(\n          entry.getKey().getAddress().getHostAddress(), entry.getKey().getPort());\n      outstandingReservations.put(hostPort, entry.getValue().numTasks);\n    }\n  }\n\n  /**\n   * Adds enqueue task reservation requests for {@link unconstrainedTasks} to {@link requests}.\n   * {@link nodeMonitors} specifies the running node monitors that enqueue task reservations may\n   * be placed on.\n   */\n  private void addRequestsForUnconstrainedTasks(\n      List<TTaskSpec> unconstrainedTasks, String requestId, String appId, TUserGroupInfo user,\n      THostPort schedulerAddress, Collection<InetSocketAddress> nodeMonitors,\n      HashMap<InetSocketAddress, TEnqueueTaskReservationsRequest> requests) {\n    /* Identify the node monitors that aren't already being used for the constrained tasks, and\n     * place all of reservations on those nodes (to try to spread the reservations evenly\n     * throughout the cluster). */\n    List<InetSocketAddress> unusedNodeMonitors = Lists.newArrayList();\n    for (InetSocketAddress nodeMonitor : nodeMonitors) {\n      if (!requests.containsKey(nodeMonitor)) {\n         unusedNodeMonitors.add(nodeMonitor);\n      }\n    }\n    Collections.shuffle(unusedNodeMonitors);\n    LOG.info(\"Request \" + requestId + \": \" + unusedNodeMonitors.size() +\n             \" node monitors that were unused by constrained tasks so may be used for \" +\n             \"unconstrained tasks.\");\n\n    int reservationsToLaunch = (int) Math.ceil(probeRatio * unconstrainedTasks.size());\n    int reservationsCreated = 0;\n\n    for (InetSocketAddress nodeMonitor : unusedNodeMonitors) {\n      if (requests.containsKey(nodeMonitor)) {\n        LOG.error(\"Adding enqueueTaskReservations requests for unused node monitors, so they \" +\n                  \"should not already have any enqueueTaskReservation requests.\");\n      }\n\n      TEnqueueTaskReservationsRequest request = new TEnqueueTaskReservationsRequest(\n          appId, user, requestId, schedulerAddress, 1);\n      requests.put(nodeMonitor, request);\n      reservationsCreated++;\n\n      if (reservationsCreated >= reservationsToLaunch) {\n        break;\n      }\n    }\n\n    if (reservationsCreated < reservationsToLaunch) {\n      LOG.error(\"Trying to launch more reservations than there are nodes; this use case is not \" +\n                \"currently supported\");\n    }\n\n    for (TTaskSpec task : unconstrainedTasks) {\n      TTaskLaunchSpec taskLaunchSpec = new TTaskLaunchSpec(\n          task.getTaskId(), task.bufferForMessage());\n      unlaunchedUnconstrainedTasks.add(taskLaunchSpec);\n    }\n\n  }\n\n  /**\n   * Converts the preferences for the task (which contain host names) to a list of socket\n   * addresses. We return the preferences as socket addresses because the addresses are used to\n   * open a client for the node monitor (so need to be InetSocketAddreses).\n   */\n  private List<InetSocketAddress> taskPreferencesToSocketList(\n      TTaskSpec task, HashMap<InetAddress, InetSocketAddress> addrToSocket) {\n    // Preferred nodes for this task.\n    List<InetSocketAddress> preferredNodes = Lists.newLinkedList();\n\n    // Convert the preferences (which contain host names) to a list of socket addresses.\n    Collections.shuffle(task.preference.nodes);\n    for (String node : task.preference.nodes) {\n      try {\n       InetAddress addr = InetAddress.getByName(node);\n       if (addrToSocket.containsKey(addr)) {\n         preferredNodes.add(addrToSocket.get(addr));\n       } else {\n         LOG.warn(\"Placement constraint for unknown node \" + node);\n         LOG.warn(\"Node address: \" + addr);\n         String knownAddrs = \"\";\n         for (InetAddress knownAddress: addrToSocket.keySet()) {\n           knownAddrs += \" \" + knownAddress.getHostAddress();\n         }\n         LOG.warn(\"Know about: \" + knownAddrs);\n       }\n      } catch (UnknownHostException e) {\n        LOG.warn(\"Got placement constraint for unresolvable node \" + node);\n      }\n    }\n\n    return preferredNodes;\n  }\n\n  @Override\n  public List<TTaskLaunchSpec> assignTask(THostPort nodeMonitorAddress) {\n    assert outstandingReservations.containsKey(nodeMonitorAddress);\n    Integer numOutstandingReservations = outstandingReservations.get(nodeMonitorAddress);\n    if (numOutstandingReservations == 1) {\n      outstandingReservations.remove(nodeMonitorAddress);\n    } else {\n      outstandingReservations.put(nodeMonitorAddress, numOutstandingReservations - 1);\n    }\n\n    TTaskLaunchSpec taskSpec = getConstrainedTask(nodeMonitorAddress);\n    if (taskSpec != null) {\n      this.launchedConstrainedTasks.add(taskSpec);\n      LOG.debug(\"Request \" + requestId + \", node monitor \" + nodeMonitorAddress.toString() +\n          \": Assigning task.\");\n      --numRemainingTasks;\n      assert numRemainingTasks >= 0;\n      return Lists.newArrayList(taskSpec);\n    } else {\n      List<TTaskLaunchSpec> taskSpecs = getUnconstrainedTask(nodeMonitorAddress);\n      numRemainingTasks -= taskSpecs.size();\n      assert numRemainingTasks >= 0;\n      return taskSpecs;\n    }\n  }\n\n  /**\n   * Returns an unlaunched task that is constrained to run on the given node.\n   *\n   * Returns null if no such task exists.\n   */\n  private TTaskLaunchSpec getConstrainedTask(THostPort nodeMonitorAddress) {\n    List<TTaskLaunchSpec> taskSpecs = unlaunchedConstrainedTasks.get(nodeMonitorAddress);\n    if (taskSpecs == null) {\n      StringBuilder nodeMonitors = new StringBuilder();\n      for (THostPort nodeMonitor: unlaunchedConstrainedTasks.keySet()) {\n        if (nodeMonitors.length() > 0) {\n          nodeMonitors.append(\",\");\n        }\n        nodeMonitors.append(nodeMonitor.toString());\n      }\n      LOG.debug(\"Request \" + requestId + \", node monitor \" + nodeMonitorAddress.toString() +\n          \": Node monitor not in the set of node monitors where constrained tasks were \" +\n          \"enqueued: \" + nodeMonitors.toString() +\n          \"; attempting to launch an unconstrained task).\");\n      return null;\n    }\n\n    while (!taskSpecs.isEmpty()) {\n      TTaskLaunchSpec currentSpec = taskSpecs.remove(0);\n      if (!this.launchedConstrainedTasks.contains(currentSpec)) {\n        return currentSpec;\n      }\n    }\n    LOG.debug(\"Request \" + requestId + \", node monitor \" + nodeMonitorAddress.toString() +\n        \": Not assigning a constrained task (no remaining unlaunched tasks that prefer \" +\n        \"this node).\");\n    return null;\n  }\n\n  private List<TTaskLaunchSpec> getUnconstrainedTask(THostPort nodeMonitorAddress) {\n    if (this.unlaunchedUnconstrainedTasks.size() == 0) {\n      LOG.debug(\"Request \" + requestId + \", node monitor \" + nodeMonitorAddress.toString() +\n                \": Not assigning a task (no remaining unconstrained unlaunched tasks)\");\n      return Lists.newArrayList();\n    }\n    TTaskLaunchSpec spec = unlaunchedUnconstrainedTasks.get(0);\n    unlaunchedUnconstrainedTasks.remove(0);\n    LOG.debug(\"Request \" + requestId + \", node monitor \" + nodeMonitorAddress.toString() +\n              \": Assigning task \" + spec.getTaskId());\n    return Lists.newArrayList(spec);\n  }\n\n  @Override\n  public boolean allTasksPlaced() {\n    return numRemainingTasks == 0;\n  }\n\n  @Override\n  public Set<THostPort> getOutstandingNodeMonitorsForCancellation() {\n    if (!cancelled) {\n      cancelled = true;\n      return outstandingReservations.keySet();\n    }\n    return new HashSet<THostPort>();\n  }\n}\n"
  },
  {
    "path": "src/main/java/edu/berkeley/sparrow/daemon/scheduler/Scheduler.java",
    "content": "/*\n * Copyright 2013 The Regents of The University California\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage edu.berkeley.sparrow.daemon.scheduler;\n\nimport java.io.IOException;\nimport java.net.InetSocketAddress;\nimport java.nio.ByteBuffer;\nimport java.util.Collections;\nimport java.util.HashMap;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.Map.Entry;\nimport java.util.Set;\nimport java.util.concurrent.ConcurrentMap;\nimport java.util.concurrent.atomic.AtomicInteger;\n\nimport org.apache.commons.configuration.Configuration;\nimport org.apache.log4j.Logger;\nimport org.apache.thrift.TException;\nimport org.apache.thrift.async.AsyncMethodCallback;\n\nimport com.google.common.base.Optional;\nimport com.google.common.collect.Lists;\nimport com.google.common.collect.Maps;\n\nimport edu.berkeley.sparrow.daemon.SparrowConf;\nimport edu.berkeley.sparrow.daemon.util.Logging;\nimport edu.berkeley.sparrow.daemon.util.Network;\nimport edu.berkeley.sparrow.daemon.util.Serialization;\nimport edu.berkeley.sparrow.daemon.util.ThriftClientPool;\nimport edu.berkeley.sparrow.thrift.FrontendService;\nimport edu.berkeley.sparrow.thrift.FrontendService.AsyncClient.frontendMessage_call;\nimport edu.berkeley.sparrow.thrift.InternalService;\nimport edu.berkeley.sparrow.thrift.InternalService.AsyncClient;\nimport edu.berkeley.sparrow.thrift.InternalService.AsyncClient.enqueueTaskReservations_call;\nimport edu.berkeley.sparrow.thrift.TEnqueueTaskReservationsRequest;\nimport edu.berkeley.sparrow.thrift.TFullTaskId;\nimport edu.berkeley.sparrow.thrift.THostPort;\nimport edu.berkeley.sparrow.thrift.TPlacementPreference;\nimport edu.berkeley.sparrow.thrift.TSchedulingRequest;\nimport edu.berkeley.sparrow.thrift.TTaskLaunchSpec;\nimport edu.berkeley.sparrow.thrift.TTaskSpec;\n\n/**\n * This class implements the Sparrow scheduler functionality.\n */\npublic class Scheduler {\n  private final static Logger LOG = Logger.getLogger(Scheduler.class);\n  private final static Logger AUDIT_LOG = Logging.getAuditLogger(Scheduler.class);\n\n  /** Used to uniquely identify requests arriving at this scheduler. */\n  private AtomicInteger counter = new AtomicInteger(0);\n\n  /** How many times the special case has been triggered. */\n  private AtomicInteger specialCaseCounter = new AtomicInteger(0);\n\n  private THostPort address;\n\n  /** Socket addresses for each frontend. */\n  HashMap<String, InetSocketAddress> frontendSockets =\n      new HashMap<String, InetSocketAddress>();\n\n  /**\n   * Service that handles cancelling outstanding reservations for jobs that have already been\n   * scheduled.  Only instantiated if {@code SparrowConf.CANCELLATION} is set to true.\n   */\n  private CancellationService cancellationService;\n  private boolean useCancellation;\n\n  /** Thrift client pool for communicating with node monitors */\n  ThriftClientPool<InternalService.AsyncClient> nodeMonitorClientPool =\n      new ThriftClientPool<InternalService.AsyncClient>(\n          new ThriftClientPool.InternalServiceMakerFactory());\n\n  /** Thrift client pool for communicating with front ends. */\n  private ThriftClientPool<FrontendService.AsyncClient> frontendClientPool =\n      new ThriftClientPool<FrontendService.AsyncClient>(\n          new ThriftClientPool.FrontendServiceMakerFactory());\n\n  /** Information about cluster workload due to other schedulers. */\n  private SchedulerState state;\n\n  /** Probe ratios to use if the probe ratio is not explicitly set in the request. */\n  private double defaultProbeRatioUnconstrained;\n  private double defaultProbeRatioConstrained;\n\n  /**\n   * For each request, the task placer that should be used to place the request's tasks. Indexed\n   * by the request ID.\n   */\n  private ConcurrentMap<String, TaskPlacer> requestTaskPlacers;\n\n  /**\n   * When a job includes SPREAD_EVENLY in the description and has this number of tasks,\n   * Sparrow spreads the tasks evenly over machines to evenly cache data. We need this (in\n   * addition to the SPREAD_EVENLY descriptor) because only the reduce phase -- not the map\n   * phase -- should be spread.\n   */\n  private int spreadEvenlyTaskSetSize;\n\n  private Configuration conf;\n\n  public void initialize(Configuration conf, InetSocketAddress socket) throws IOException {\n    address = Network.socketAddressToThrift(socket);\n    String mode = conf.getString(SparrowConf.DEPLYOMENT_MODE, \"unspecified\");\n    this.conf = conf;\n    if (mode.equals(\"standalone\")) {\n      state = new StandaloneSchedulerState();\n    } else if (mode.equals(\"configbased\")) {\n      state = new ConfigSchedulerState();\n    } else {\n      throw new RuntimeException(\"Unsupported deployment mode: \" + mode);\n    }\n\n    state.initialize(conf);\n\n    defaultProbeRatioUnconstrained = conf.getDouble(SparrowConf.SAMPLE_RATIO,\n        SparrowConf.DEFAULT_SAMPLE_RATIO);\n    defaultProbeRatioConstrained = conf.getDouble(SparrowConf.SAMPLE_RATIO_CONSTRAINED,\n        SparrowConf.DEFAULT_SAMPLE_RATIO_CONSTRAINED);\n\n    requestTaskPlacers = Maps.newConcurrentMap();\n\n    useCancellation = conf.getBoolean(SparrowConf.CANCELLATION, SparrowConf.DEFAULT_CANCELLATION);\n    if (useCancellation) {\n      LOG.debug(\"Initializing cancellation service\");\n      cancellationService = new CancellationService(nodeMonitorClientPool);\n      new Thread(cancellationService).start();\n    } else {\n      LOG.debug(\"Not using cancellation\");\n    }\n\n    spreadEvenlyTaskSetSize = conf.getInt(SparrowConf.SPREAD_EVENLY_TASK_SET_SIZE,\n    \t\t\t\tSparrowConf.DEFAULT_SPREAD_EVENLY_TASK_SET_SIZE);\n  }\n\n  public boolean registerFrontend(String appId, String addr) {\n    LOG.debug(Logging.functionCall(appId, addr));\n    Optional<InetSocketAddress> socketAddress = Serialization.strToSocket(addr);\n    if (!socketAddress.isPresent()) {\n      LOG.error(\"Bad address from frontend: \" + addr);\n      return false;\n    }\n    frontendSockets.put(appId, socketAddress.get());\n    return state.watchApplication(appId);\n  }\n\n  /**\n   * Callback for enqueueTaskReservations() that returns the client to the client pool.\n   */\n  private class EnqueueTaskReservationsCallback\n  implements AsyncMethodCallback<enqueueTaskReservations_call> {\n    String requestId;\n    InetSocketAddress nodeMonitorAddress;\n    long startTimeMillis;\n\n    public EnqueueTaskReservationsCallback(String requestId, InetSocketAddress nodeMonitorAddress) {\n      this.requestId = requestId;\n      this.nodeMonitorAddress = nodeMonitorAddress;\n      this.startTimeMillis = System.currentTimeMillis();\n    }\n\n    public void onComplete(enqueueTaskReservations_call response) {\n      AUDIT_LOG.debug(Logging.auditEventString(\n          \"scheduler_complete_enqueue_task\", requestId,\n          nodeMonitorAddress.getAddress().getHostAddress()));\n      long totalTime = System.currentTimeMillis() - startTimeMillis;\n      LOG.debug(\"Enqueue Task RPC to \" + nodeMonitorAddress.getAddress().getHostAddress() +\n                \" for request \" + requestId + \" completed in \" + totalTime + \"ms\");\n      try {\n        nodeMonitorClientPool.returnClient(nodeMonitorAddress, (AsyncClient) response.getClient());\n      } catch (Exception e) {\n        LOG.error(\"Error returning client to node monitor client pool: \" + e);\n      }\n      return;\n    }\n\n    public void onError(Exception exception) {\n      // Do not return error client to pool\n      LOG.error(\"Error executing enqueueTaskReservation RPC:\" + exception);\n    }\n  }\n\n  /** Adds constraints such that tasks in the job will be spread evenly across the cluster.\n   *\n   *  We expect three of these special jobs to be submitted; 3 sequential calls to this\n   *  method will result in spreading the tasks for the 3 jobs across the cluster such that no\n   *  more than 1 task is assigned to each machine.\n   */\n  private TSchedulingRequest addConstraintsToSpreadTasks(TSchedulingRequest req)\n  \t\t\t\tthrows TException {\n    LOG.info(\"Handling spread tasks request: \" + req);\n    int specialCaseIndex = specialCaseCounter.incrementAndGet();\n    if (specialCaseIndex < 1 || specialCaseIndex > 3) {\n      LOG.error(\"Invalid special case index: \" + specialCaseIndex);\n    }\n\n    // No tasks have preferences and we have the magic number of tasks\n    TSchedulingRequest newReq = new TSchedulingRequest();\n    newReq.user = req.user;\n    newReq.app = req.app;\n    newReq.probeRatio = req.probeRatio;\n\n    List<InetSocketAddress> allBackends = Lists.newArrayList();\n    List<InetSocketAddress> backends = Lists.newArrayList();\n    // We assume the below always returns the same order (invalid assumption?)\n    for (InetSocketAddress backend : state.getBackends(req.app)) {\n      allBackends.add(backend);\n    }\n\n    // Each time this is called, we restrict to 1/3 of the nodes in the cluster\n    for (int i = 0; i < allBackends.size(); i++) {\n      if (i % 3 == specialCaseIndex - 1) {\n        backends.add(allBackends.get(i));\n      }\n    }\n    Collections.shuffle(backends);\n\n    if (!(allBackends.size() >= (req.getTasks().size() * 3))) {\n      LOG.error(\"Special case expects at least three times as many machines as tasks.\");\n      return null;\n    }\n    LOG.info(backends);\n    for (int i = 0; i < req.getTasksSize(); i++) {\n      TTaskSpec task = req.getTasks().get(i);\n      TTaskSpec newTask = new TTaskSpec();\n      newTask.message = task.message;\n      newTask.taskId = task.taskId;\n      newTask.preference = new TPlacementPreference();\n      newTask.preference.addToNodes(backends.get(i).getHostName());\n      newReq.addToTasks(newTask);\n    }\n    LOG.info(\"New request: \" + newReq);\n    return newReq;\n  }\n\n  /** Checks whether we should add constraints to this job to evenly spread tasks over machines.\n   *\n   * This is a hack used to force Spark to cache data in 3 locations: we run 3 select * queries\n   * on the same table and spread the tasks for those queries evenly across the cluster such that\n   * the input data for the query is triple replicated and spread evenly across the cluster.\n   *\n   * We signal that Sparrow should use this hack by adding SPREAD_TASKS to the job's description.\n   */\n  private boolean isSpreadTasksJob(TSchedulingRequest request) {\n  \tif ((request.getDescription() != null) &&\n  \t\t\t(request.getDescription().indexOf(\"SPREAD_EVENLY\") != -1)) {\n  \t\t// Need to check to see if there are 3 constraints; if so, it's the map phase of the\n  \t\t// first job that reads the data from HDFS, so we shouldn't override the constraints.\n  \t\tfor (TTaskSpec t: request.getTasks()) {\n        if (t.getPreference() != null && (t.getPreference().getNodes() != null)  &&\n            (t.getPreference().getNodes().size() == 3)) {\n        \tLOG.debug(\"Not special case: one of request's tasks had 3 preferences\");\n          return false;\n        }\n      }\n      if (request.getTasks().size() != spreadEvenlyTaskSetSize) {\n      \tLOG.debug(\"Not special case: job had \" + request.getTasks().size() +\n            \" tasks rather than the expected \" + spreadEvenlyTaskSetSize);\n        return false;\n      }\n    \tif (specialCaseCounter.get() >= 3) {\n    \t\tLOG.error(\"Not using special case because special case code has already been \" +\n    \t      \" called 3 more more times!\");\n    \t\treturn false;\n    \t}\n      LOG.debug(\"Spreading tasks for job with \" + request.getTasks().size() + \" tasks\");\n  \t\treturn true;\n  \t}\n  \tLOG.debug(\"Not special case: description did not contain SPREAD_EVENLY\");\n  \treturn false;\n  }\n\n  public void submitJob(TSchedulingRequest request) throws TException {\n    // Short-circuit case that is used for liveness checking\n    if (request.tasks.size() == 0) { return; }\n    if (isSpreadTasksJob(request)) {\n      handleJobSubmission(addConstraintsToSpreadTasks(request));\n    } else {\n      handleJobSubmission(request);\n    }\n  }\n\n  public void handleJobSubmission(TSchedulingRequest request) throws TException {\n    LOG.debug(Logging.functionCall(request));\n\n    long start = System.currentTimeMillis();\n\n    String requestId = getRequestId();\n\n    String user = \"\";\n    if (request.getUser() != null && request.getUser().getUser() != null) {\n      user = request.getUser().getUser();\n    }\n    String description = \"\";\n    if (request.getDescription() != null) {\n    \tdescription = request.getDescription();\n    }\n\n    String app = request.getApp();\n    List<TTaskSpec> tasks = request.getTasks();\n    Set<InetSocketAddress> backends = state.getBackends(app);\n    LOG.debug(\"NumBackends: \" + backends.size());\n    boolean constrained = false;\n    for (TTaskSpec task : tasks) {\n      constrained = constrained || (\n          task.preference != null &&\n          task.preference.nodes != null &&\n          !task.preference.nodes.isEmpty());\n    }\n    // Logging the address here is somewhat redundant, since all of the\n    // messages in this particular log file come from the same address.\n    // However, it simplifies the process of aggregating the logs, and will\n    // also be useful when we support multiple daemons running on a single\n    // machine.\n    AUDIT_LOG.info(Logging.auditEventString(\"arrived\", requestId,\n                                            request.getTasks().size(),\n                                            address.getHost(), address.getPort(),\n                                            user, description, constrained));\n\n    TaskPlacer taskPlacer;\n    if (constrained) {\n      if (request.isSetProbeRatio()) {\n        taskPlacer = new ConstrainedTaskPlacer(requestId, request.getProbeRatio());\n      } else {\n        taskPlacer = new ConstrainedTaskPlacer(requestId, defaultProbeRatioConstrained);\n      }\n    } else {\n      if (request.isSetProbeRatio()) {\n        taskPlacer = new UnconstrainedTaskPlacer(requestId, request.getProbeRatio());\n      } else {\n        taskPlacer = new UnconstrainedTaskPlacer(requestId, defaultProbeRatioUnconstrained);\n      }\n    }\n    requestTaskPlacers.put(requestId, taskPlacer);\n\n    Map<InetSocketAddress, TEnqueueTaskReservationsRequest> enqueueTaskReservationsRequests;\n    enqueueTaskReservationsRequests = taskPlacer.getEnqueueTaskReservationsRequests(\n        request, requestId, backends, address);\n\n    // Request to enqueue a task at each of the selected nodes.\n    for (Entry<InetSocketAddress, TEnqueueTaskReservationsRequest> entry :\n      enqueueTaskReservationsRequests.entrySet())  {\n      try {\n        InternalService.AsyncClient client = nodeMonitorClientPool.borrowClient(entry.getKey());\n        LOG.debug(\"Launching enqueueTask for request \" + requestId + \"on node: \" + entry.getKey());\n        AUDIT_LOG.debug(Logging.auditEventString(\n            \"scheduler_launch_enqueue_task\", entry.getValue().requestId,\n            entry.getKey().getAddress().getHostAddress()));\n        client.enqueueTaskReservations(\n            entry.getValue(), new EnqueueTaskReservationsCallback(requestId, entry.getKey()));\n      } catch (Exception e) {\n        LOG.error(\"Error enqueuing task on node \" + entry.getKey().toString() + \":\" + e);\n      }\n    }\n\n    long end = System.currentTimeMillis();\n    LOG.debug(\"All tasks enqueued for request \" + requestId + \"; returning. Total time: \" +\n              (end - start) + \" milliseconds\");\n  }\n\n  public List<TTaskLaunchSpec> getTask(\n      String requestId, THostPort nodeMonitorAddress) {\n    /* TODO: Consider making this synchronized to avoid the need for synchronization in\n     * the task placers (although then we'd lose the ability to parallelize over task placers). */\n    LOG.debug(Logging.functionCall(requestId, nodeMonitorAddress));\n    TaskPlacer taskPlacer = requestTaskPlacers.get(requestId);\n    if (taskPlacer == null) {\n      LOG.debug(\"Received getTask() request for request \" + requestId + \", which had no more \" +\n          \"unplaced tasks\");\n      return Lists.newArrayList();\n    }\n\n    synchronized(taskPlacer) {\n      List<TTaskLaunchSpec> taskLaunchSpecs = taskPlacer.assignTask(nodeMonitorAddress);\n      if (taskLaunchSpecs == null || taskLaunchSpecs.size() > 1) {\n        LOG.error(\"Received invalid task placement for request \" + requestId + \": \" +\n                  taskLaunchSpecs.toString());\n        return Lists.newArrayList();\n      } else if (taskLaunchSpecs.size() == 1) {\n        AUDIT_LOG.info(Logging.auditEventString(\"scheduler_assigned_task\", requestId,\n            taskLaunchSpecs.get(0).taskId,\n            nodeMonitorAddress.getHost()));\n      } else {\n        AUDIT_LOG.info(Logging.auditEventString(\"scheduler_get_task_no_task\", requestId,\n                                                nodeMonitorAddress.getHost()));\n      }\n\n      if (taskPlacer.allTasksPlaced()) {\n        LOG.debug(\"All tasks placed for request \" + requestId);\n        requestTaskPlacers.remove(requestId);\n        if (useCancellation) {\n          Set<THostPort> outstandingNodeMonitors =\n              taskPlacer.getOutstandingNodeMonitorsForCancellation();\n          for (THostPort nodeMonitorToCancel : outstandingNodeMonitors) {\n            cancellationService.addCancellation(requestId, nodeMonitorToCancel);\n          }\n        }\n      }\n      return taskLaunchSpecs;\n    }\n  }\n\n  /**\n   * Returns an ID that identifies a request uniquely (across all Sparrow schedulers).\n   *\n   * This should only be called once for each request (it will return a different\n   * identifier if called a second time).\n   *\n   * TODO: Include the port number, so this works when there are multiple schedulers\n   * running on a single machine.\n   */\n  private String getRequestId() {\n    /* The request id is a string that includes the IP address of this scheduler followed\n     * by the counter.  We use a counter rather than a hash of the request because there\n     * may be multiple requests to run an identical job. */\n    return String.format(\"%s_%d\", Network.getIPAddress(conf), counter.getAndIncrement());\n  }\n\n  private class sendFrontendMessageCallback implements\n  AsyncMethodCallback<frontendMessage_call> {\n    private InetSocketAddress frontendSocket;\n    private FrontendService.AsyncClient client;\n    public sendFrontendMessageCallback(InetSocketAddress socket, FrontendService.AsyncClient client) {\n      frontendSocket = socket;\n      this.client = client;\n    }\n\n    public void onComplete(frontendMessage_call response) {\n      try { frontendClientPool.returnClient(frontendSocket, client); }\n      catch (Exception e) { LOG.error(e); }\n    }\n\n    public void onError(Exception exception) {\n      // Do not return error client to pool\n      LOG.error(\"Error sending frontend message callback: \" + exception);\n    }\n  }\n\n  public void sendFrontendMessage(String app, TFullTaskId taskId,\n      int status, ByteBuffer message) {\n    LOG.debug(Logging.functionCall(app, taskId, message));\n    InetSocketAddress frontend = frontendSockets.get(app);\n    if (frontend == null) {\n      LOG.error(\"Requested message sent to unregistered app: \" + app);\n    }\n    try {\n      FrontendService.AsyncClient client = frontendClientPool.borrowClient(frontend);\n      client.frontendMessage(taskId, status, message,\n          new sendFrontendMessageCallback(frontend, client));\n    } catch (IOException e) {\n      LOG.error(\"Error launching message on frontend: \" + app, e);\n    } catch (TException e) {\n      LOG.error(\"Error launching message on frontend: \" + app, e);\n    } catch (Exception e) {\n      LOG.error(\"Error launching message on frontend: \" + app, e);\n    }\n  }\n}\n"
  },
  {
    "path": "src/main/java/edu/berkeley/sparrow/daemon/scheduler/SchedulerState.java",
    "content": "/*\n * Copyright 2013 The Regents of The University California\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *   http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage edu.berkeley.sparrow.daemon.scheduler;\n\nimport java.io.IOException;\nimport java.net.InetSocketAddress;\nimport java.util.Set;\n\nimport org.apache.commons.configuration.Configuration;\n\n/**\n * State storage for the Sparrow {@link Scheduler}. This is stored in its\n * own class since state storage may involve communicating to external services\n * such as ZooKeeper.\n */\npublic interface SchedulerState {\n\n  /**\n   * Initialize state storage. This should open connections to any external\n   * services if required.\n   * @throws IOException\n   */\n  public void initialize(Configuration conf) throws IOException;\n\n  /**\n   * Signal that state storage will be queried for information about\n   * {@code appId} in the future.\n   */\n  public boolean watchApplication(String appId);\n\n  /**\n   * Get the backends available for a particular application. Each backend includes a\n   * resource vector giving current available resources. TODO: this might be changed\n   * to include more detailed information per-node.\n   */\n  public Set<InetSocketAddress> getBackends(String appId);\n}\n"
  },
  {
    "path": "src/main/java/edu/berkeley/sparrow/daemon/scheduler/SchedulerThrift.java",
    "content": "/*\n * Copyright 2013 The Regents of The University California\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *   http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage edu.berkeley.sparrow.daemon.scheduler;\n\nimport java.io.IOException;\nimport java.net.InetSocketAddress;\nimport java.nio.ByteBuffer;\nimport java.util.List;\n\nimport org.apache.commons.configuration.Configuration;\nimport org.apache.thrift.TException;\n\nimport edu.berkeley.sparrow.daemon.SparrowConf;\nimport edu.berkeley.sparrow.daemon.util.Network;\nimport edu.berkeley.sparrow.daemon.util.TServers;\nimport edu.berkeley.sparrow.thrift.SchedulerService;\nimport edu.berkeley.sparrow.thrift.GetTaskService;\nimport edu.berkeley.sparrow.thrift.TFullTaskId;\nimport edu.berkeley.sparrow.thrift.THostPort;\nimport edu.berkeley.sparrow.thrift.TSchedulingRequest;\nimport edu.berkeley.sparrow.thrift.TTaskLaunchSpec;\n\n/**\n * This class extends the thrift sparrow scheduler interface. It wraps the\n * {@link Scheduler} class and delegates most calls to that class.\n */\npublic class SchedulerThrift implements SchedulerService.Iface, GetTaskService.Iface {\n  // Defaults if not specified by configuration\n  public final static int DEFAULT_SCHEDULER_THRIFT_PORT = 20503;\n  private final static int DEFAULT_SCHEDULER_THRIFT_THREADS = 8;\n  public final static int DEFAULT_GET_TASK_PORT = 20507;\n\n  private Scheduler scheduler = new Scheduler();\n\n  /**\n   * Initialize this thrift service.\n   *\n   * This spawns a multi-threaded thrift server and listens for Sparrow\n   * scheduler requests.\n   */\n  public void initialize(Configuration conf) throws IOException {\n    SchedulerService.Processor<SchedulerService.Iface> processor =\n        new SchedulerService.Processor<SchedulerService.Iface>(this);\n    int port = conf.getInt(SparrowConf.SCHEDULER_THRIFT_PORT,\n        DEFAULT_SCHEDULER_THRIFT_PORT);\n    int threads = conf.getInt(SparrowConf.SCHEDULER_THRIFT_THREADS,\n        DEFAULT_SCHEDULER_THRIFT_THREADS);\n    String hostname = Network.getHostName(conf);\n    InetSocketAddress addr = new InetSocketAddress(hostname, port);\n    scheduler.initialize(conf, addr);\n    TServers.launchThreadedThriftServer(port, threads, processor);\n    int getTaskPort = conf.getInt(SparrowConf.GET_TASK_PORT,\n        DEFAULT_GET_TASK_PORT);\n    GetTaskService.Processor<GetTaskService.Iface> getTaskprocessor =\n        new GetTaskService.Processor<GetTaskService.Iface>(this);\n    TServers.launchSingleThreadThriftServer(getTaskPort, getTaskprocessor);\n  }\n\n  @Override\n  public boolean registerFrontend(String app, String socketAddress) {\n    return scheduler.registerFrontend(app, socketAddress);\n  }\n\n  @Override\n  public void submitJob(TSchedulingRequest req)\n      throws TException {\n    scheduler.submitJob(req);\n  }\n\n  @Override\n  public void sendFrontendMessage(String app, TFullTaskId taskId,\n      int status, ByteBuffer message) throws TException {\n    scheduler.sendFrontendMessage(app, taskId, status, message);\n  }\n\n  @Override\n  public List<TTaskLaunchSpec> getTask(String requestId, THostPort nodeMonitorAddress)\n      throws TException {\n    return scheduler.getTask(requestId, nodeMonitorAddress);\n  }\n}\n"
  },
  {
    "path": "src/main/java/edu/berkeley/sparrow/daemon/scheduler/StandaloneSchedulerState.java",
    "content": "/*\n * Copyright 2013 The Regents of The University California\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *   http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage edu.berkeley.sparrow.daemon.scheduler;\n\nimport java.net.InetSocketAddress;\nimport java.util.Set;\n\nimport org.apache.commons.configuration.Configuration;\n\nimport edu.berkeley.sparrow.daemon.StandaloneStateStore;\n\n/**\n * Implementation of state storage for use in a standalone deployment of\n * Sparrow.\n */\npublic class StandaloneSchedulerState implements SchedulerState {\n  private StandaloneStateStore state = StandaloneStateStore.getInstance();\n  @Override\n  public void initialize(Configuration conf) {\n  }\n\n  @Override\n  public boolean watchApplication(String appId) {\n    return true;\n  }\n\n  @Override\n  public Set<InetSocketAddress> getBackends(String appId) {\n    return state.getBackends(appId);\n  }\n}\n"
  },
  {
    "path": "src/main/java/edu/berkeley/sparrow/daemon/scheduler/TaskPlacer.java",
    "content": "/*\n * Copyright 2013 The Regents of The University California\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *   http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage edu.berkeley.sparrow.daemon.scheduler;\n\nimport java.net.InetSocketAddress;\nimport java.util.Collection;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.Set;\n\nimport edu.berkeley.sparrow.daemon.SparrowConf;\nimport edu.berkeley.sparrow.thrift.TEnqueueTaskReservationsRequest;\nimport edu.berkeley.sparrow.thrift.THostPort;\nimport edu.berkeley.sparrow.thrift.TSchedulingRequest;\nimport edu.berkeley.sparrow.thrift.TTaskLaunchSpec;\n\n/***\n * A TaskPlacer is responsible for assigning the tasks in a job to backends. Assigning tasks to\n * backends occurs in two phases:\n *   (1) Task reservations are enqueued on backends. Typically more task reservations are enqueued\n *       than there are tasks that need to run (the ratio of task reservations to tasks is set\n *       using {@link SparrowConf.SAMPLE_RATIO} and {@link SparrowConf.SAMPLE_RATIO_CONSTRAINED}).\n *   (2) When backends are ready to run a task, they reply to the scheduler with a GetTask()\n *       RPC. The scheduler passes this call on to the task placer; if there are tasks remaining\n *       that can be run on that machine, the TaskPlacer responds with a specification for the\n *       task.\n * A TaskPlacer is responsible for determining where to enqueue task reservations, and how to\n * assign tasks to backends once a backend signals that it's ready to execute a task. TaskPlacers\n * are created per-job and persist state across these two phases.\n *\n * TaskPlacers are not thread safe; access to a particular TaskPlacer should be serialized.\n */\npublic interface TaskPlacer {\n\n  /**\n   * Returns a mapping of node monitor socket addresses to {@link TEnqueueTaskReservationRequest}s\n   * that should be send to those node monitors. The caller is responsible for ensuring that\n   * {@link schedulingRequest} is properly filled out.\n   */\n  public Map<InetSocketAddress, TEnqueueTaskReservationsRequest>\n      getEnqueueTaskReservationsRequests(\n          TSchedulingRequest schedulingRequest, String requestId,\n          Collection<InetSocketAddress> nodes, THostPort schedulerAddress);\n\n  /**\n   * Returns a List of {@link TTaskLaunchSpec}s describing tasks that should be launched from the\n   * give node monitor.  Always returns either 0 or 1 tasks.\n   */\n  public List<TTaskLaunchSpec> assignTask(THostPort nodeMonitorAddress);\n\n  /** Returns true if all of the job's tasks have been placed. */\n  public boolean allTasksPlaced();\n\n  /** Returns the node monitors with outstanding reservations for this request.\n   *\n   * After this method is called once, the TaskPlacer assumes all those node monitors were sent\n   * cancellation messages, so it will not return any node monitors in the future. */\n  public Set<THostPort> getOutstandingNodeMonitorsForCancellation();\n}\n"
  },
  {
    "path": "src/main/java/edu/berkeley/sparrow/daemon/scheduler/UnconstrainedTaskPlacer.java",
    "content": "/*\n * Copyright 2013 The Regents of The University California\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage edu.berkeley.sparrow.daemon.scheduler;\n\nimport java.net.InetSocketAddress;\nimport java.util.Collection;\nimport java.util.Collections;\nimport java.util.HashMap;\nimport java.util.HashSet;\nimport java.util.LinkedList;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.Set;\n\nimport org.apache.log4j.Logger;\n\nimport com.google.common.collect.Lists;\nimport com.google.common.collect.Maps;\n\nimport edu.berkeley.sparrow.daemon.util.Logging;\nimport edu.berkeley.sparrow.thrift.TEnqueueTaskReservationsRequest;\nimport edu.berkeley.sparrow.thrift.THostPort;\nimport edu.berkeley.sparrow.thrift.TSchedulingRequest;\nimport edu.berkeley.sparrow.thrift.TTaskLaunchSpec;\nimport edu.berkeley.sparrow.thrift.TTaskSpec;\n\n/**\n * A task placer for jobs whose tasks have no placement constraints.\n */\npublic class UnconstrainedTaskPlacer implements TaskPlacer {\n  private static final Logger LOG = Logger.getLogger(UnconstrainedTaskPlacer.class);\n\n  /** Specifications for tasks that have not yet been launched. */\n  List<TTaskLaunchSpec> unlaunchedTasks;\n\n  /**\n   * For each node monitor where reservations were enqueued, the number of reservations that were\n   * enqueued there.\n   */\n  private Map<THostPort, Integer> outstandingReservations;\n\n  /** Whether the remaining reservations have been cancelled. */\n  boolean cancelled;\n\n  /**\n   * Id of the request associated with this task placer.\n   */\n  String requestId;\n\n  private double probeRatio;\n\n  UnconstrainedTaskPlacer(String requestId, double probeRatio) {\n    this.requestId = requestId;\n    this.probeRatio = probeRatio;\n    unlaunchedTasks = new LinkedList<TTaskLaunchSpec>();\n    outstandingReservations = new HashMap<THostPort, Integer>();\n    cancelled = false;\n  }\n\n  @Override\n  public Map<InetSocketAddress, TEnqueueTaskReservationsRequest>\n      getEnqueueTaskReservationsRequests(\n          TSchedulingRequest schedulingRequest, String requestId,\n          Collection<InetSocketAddress> nodes, THostPort schedulerAddress) {\n    LOG.debug(Logging.functionCall(schedulingRequest, requestId, nodes, schedulerAddress));\n\n    int numTasks = schedulingRequest.getTasks().size();\n    int reservationsToLaunch = (int) Math.ceil(probeRatio * numTasks);\n    LOG.debug(\"Request \" + requestId + \": Creating \" + reservationsToLaunch +\n              \" task reservations for \" + numTasks + \" tasks\");\n\n    // Get a random subset of nodes by shuffling list.\n    List<InetSocketAddress> nodeList = Lists.newArrayList(nodes);\n    Collections.shuffle(nodeList);\n    if (reservationsToLaunch < nodeList.size())\n      nodeList = nodeList.subList(0, reservationsToLaunch);\n\n    for (TTaskSpec task : schedulingRequest.getTasks()) {\n      TTaskLaunchSpec taskLaunchSpec = new TTaskLaunchSpec(task.getTaskId(),\n                                                           task.bufferForMessage());\n      unlaunchedTasks.add(taskLaunchSpec);\n    }\n\n    HashMap<InetSocketAddress, TEnqueueTaskReservationsRequest> requests = Maps.newHashMap();\n\n    int numReservationsPerNode = 1;\n    if (nodeList.size() < reservationsToLaunch) {\n    \tnumReservationsPerNode = reservationsToLaunch / nodeList.size();\n    }\n    StringBuilder debugString = new StringBuilder();\n    for (int i = 0; i < nodeList.size(); i++) {\n      int numReservations = numReservationsPerNode;\n      if (reservationsToLaunch % nodeList.size() > i)\n    \t++numReservations;\n      InetSocketAddress node = nodeList.get(i);\n      debugString.append(node.getAddress().getHostAddress() + \":\" + node.getPort());\n      debugString.append(\";\");\n      // TODO: this needs to be a count!\n      outstandingReservations.put(\n          new THostPort(node.getAddress().getHostAddress(), node.getPort()),\n          numReservations);\n      TEnqueueTaskReservationsRequest request = new TEnqueueTaskReservationsRequest(\n          schedulingRequest.getApp(), schedulingRequest.getUser(), requestId,\n          schedulerAddress, numReservations);\n      requests.put(node, request);\n    }\n    LOG.debug(\"Request \" + requestId + \": Launching enqueueReservation on \" +\n        nodeList.size() + \" node monitors: \" + debugString.toString());\n    return requests;\n  }\n\n  @Override\n  public List<TTaskLaunchSpec> assignTask(THostPort nodeMonitorAddress) {\n\tInteger numOutstandingReservations = outstandingReservations.get(nodeMonitorAddress);\n\tif (numOutstandingReservations == null) {\n\t\tLOG.error(\"Node monitor \" + nodeMonitorAddress +\n\t\t    \" not in list of outstanding reservations\");\n\t\treturn Lists.newArrayList();\n\t}\n    if (numOutstandingReservations == 1) {\n      outstandingReservations.remove(nodeMonitorAddress);\n    } else {\n      outstandingReservations.put(nodeMonitorAddress, numOutstandingReservations - 1);\n    }\n\n    if (unlaunchedTasks.isEmpty()) {\n      LOG.debug(\"Request \" + requestId + \", node monitor \" + nodeMonitorAddress.toString() +\n               \": Not assigning a task (no remaining unlaunched tasks).\");\n      return Lists.newArrayList();\n    } else {\n      TTaskLaunchSpec launchSpec = unlaunchedTasks.get(0);\n      unlaunchedTasks.remove(0);\n      LOG.debug(\"Request \" + requestId + \", node monitor \" + nodeMonitorAddress.toString() +\n                \": Assigning task\");\n      return Lists.newArrayList(launchSpec);\n    }\n  }\n\n  @Override\n  public boolean allTasksPlaced() {\n    return unlaunchedTasks.isEmpty();\n  }\n\n  @Override\n  public Set<THostPort> getOutstandingNodeMonitorsForCancellation() {\n    if (!cancelled) {\n      cancelled = true;\n      return outstandingReservations.keySet();\n    }\n    return new HashSet<THostPort>();\n  }\n}\n"
  },
  {
    "path": "src/main/java/edu/berkeley/sparrow/daemon/util/ConfigUtil.java",
    "content": "/*\n * Copyright 2013 The Regents of The University California\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *   http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage edu.berkeley.sparrow.daemon.util;\n\nimport java.net.InetSocketAddress;\nimport java.util.HashSet;\nimport java.util.Set;\n\nimport org.apache.commons.configuration.Configuration;\nimport org.apache.log4j.Logger;\n\nimport com.google.common.base.Optional;\n\nimport edu.berkeley.sparrow.daemon.SparrowConf;\nimport edu.berkeley.sparrow.thrift.TResourceVector;\n\n/**\n * Utilities to aid the configuration file-based scheduler and node monitor.\n */\npublic class ConfigUtil {\n  private final static Logger LOG = Logger.getLogger(ConfigUtil.class);\n\n  /**\n   * Parses the list of backends from a {@link Configuration}.\n   *\n   * Returns a map of address of backends to a {@link TResourceVector} describing the\n   * total resource capacity for that backend.\n   */\n  public static Set<InetSocketAddress> parseBackends(\n      Configuration conf) {\n    if (!conf.containsKey(SparrowConf.STATIC_NODE_MONITORS)) {\n      throw new RuntimeException(\"Missing configuration node monitor list\");\n    }\n\n    Set<InetSocketAddress> backends = new HashSet<InetSocketAddress>();\n\n    for (String node: conf.getStringArray(SparrowConf.STATIC_NODE_MONITORS)) {\n      Optional<InetSocketAddress> addr = Serialization.strToSocket(node);\n      if (!addr.isPresent()) {\n        LOG.warn(\"Bad backend address: \" + node);\n        continue;\n      }\n      backends.add(addr.get());\n    }\n\n    return backends;\n  }\n}\n"
  },
  {
    "path": "src/main/java/edu/berkeley/sparrow/daemon/util/Logging.java",
    "content": "/*\n * Copyright 2013 The Regents of The University California\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *   http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage edu.berkeley.sparrow.daemon.util;\n\nimport java.io.IOException;\nimport java.lang.management.GarbageCollectorMXBean;\nimport java.lang.management.ManagementFactory;\nimport java.util.Random;\n\nimport org.apache.log4j.FileAppender;\nimport org.apache.log4j.Level;\nimport org.apache.log4j.Logger;\nimport org.apache.log4j.PatternLayout;\n\nimport com.google.common.base.Joiner;\n\npublic class Logging {\n  public final static String AUDIT_LOGGER_NAME = \"audit\";\n  public final static String AUDIT_LOG_FILENAME_FORMAT = \"sparrow_audit.%d.%d.log\";\n  public final static String AUDIT_LOG_FORMAT = \"%c\\t%m%n\";\n\n  private static Joiner paramJoiner = Joiner.on(\",\").useForNull(\"null\");\n  private static Joiner auditParamJoiner = Joiner.on(\"\\t\");\n  private static Joiner auditEventParamJoiner = Joiner.on(\":\");\n\n  /**\n   * Sets up audit logging to log to a file named based on the current time (in\n   * ms).\n   *\n   * The logger is configured to effectively ignore the log level.\n   *\n   * @throws IOException\n   *           if the audit log file could not be opened for writing.\n   */\n  public static void configureAuditLogging() throws IOException {\n    PatternLayout layout = new PatternLayout(AUDIT_LOG_FORMAT);\n    // This assumes that no other daemon will be started within 1 millisecond.\n    String filename = String.format(AUDIT_LOG_FILENAME_FORMAT,\n        System.currentTimeMillis(), new Random().nextInt(Integer.MAX_VALUE));\n    FileAppender fileAppender = new FileAppender(layout, filename);\n    Logger auditLogger = Logger.getLogger(Logging.AUDIT_LOGGER_NAME);\n    auditLogger.addAppender(fileAppender);\n    auditLogger.setLevel(Level.ALL);\n    /*\n     * We don't want audit messages to be appended to the main appender, which\n     * is intended for potentially user-facing messages.\n     */\n    auditLogger.setAdditivity(false);\n  }\n\n  /** Returns the total count of garbage collections. */\n  public static long getGCCount() {\n    long totalGarbageCollections = 0;\n\n    for (GarbageCollectorMXBean gc : ManagementFactory\n        .getGarbageCollectorMXBeans()) {\n      long count = gc.getCollectionCount();\n      if (count >= 0) {\n        totalGarbageCollections += count;\n      }\n    }\n    return totalGarbageCollections;\n  }\n\n  /** Returns the total time that has been spent on garbage collection. */\n  public static long getGCTime() {\n    long garbageCollectionTime = 0;\n\n    for (GarbageCollectorMXBean gc : ManagementFactory\n        .getGarbageCollectorMXBeans()) {\n      long time = gc.getCollectionTime();\n      if (time >= 0) {\n        garbageCollectionTime += time;\n      }\n    }\n    return garbageCollectionTime;\n  }\n\n  /**\n   * Returns a log string for the given event, starting with the epoch time.\n   */\n  public static String auditEventString(Object... params) {\n    return auditParamJoiner.join(System.currentTimeMillis(),\n        auditEventParamJoiner.join(params));\n  }\n\n  /**\n   * Returns a logger to be used for audit logging messages for the given class.\n   */\n  @SuppressWarnings(\"rawtypes\")\n  public static Logger getAuditLogger(Class clazz) {\n    return Logger.getLogger(String.format(\"%s.%s\", AUDIT_LOGGER_NAME,\n        clazz.getName()));\n  }\n\n  /**\n   * Return a function name (determined via reflection) and all its parameters\n   * (passed) in a consistent stringformat. Very helpful in logging function\n   * calls throughout our program.\n   */\n  public static String functionCall(Object... params) {\n    String name = Thread.currentThread().getStackTrace()[2].getMethodName();\n    return name + \": [\" + paramJoiner.join(params) + \"]\";\n  }\n}\n"
  },
  {
    "path": "src/main/java/edu/berkeley/sparrow/daemon/util/Network.java",
    "content": "/*\n * Copyright 2013 The Regents of The University California\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *   http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage edu.berkeley.sparrow.daemon.util;\n\nimport java.net.InetAddress;\nimport java.net.InetSocketAddress;\nimport java.net.UnknownHostException;\n\nimport org.apache.commons.configuration.Configuration;\n\nimport edu.berkeley.sparrow.daemon.SparrowConf;\nimport edu.berkeley.sparrow.thrift.THostPort;\n\npublic class Network {\n  \n  public static THostPort socketAddressToThrift(InetSocketAddress address) {\n    return new THostPort(address.getAddress().getHostAddress(), address.getPort());\n  }\n\n  /** Return the hostname of this machine, based on configured value, or system\n   * Interrogation. */\n  public static String getHostName(Configuration conf) {\n    String defaultHostname = null;\n    try {\n      defaultHostname = InetAddress.getLocalHost().getHostName();\n    } catch (UnknownHostException e) {\n      defaultHostname = \"localhost\";\n    }\n    return conf.getString(SparrowConf.HOSTNAME, defaultHostname); \n  }\n  \n  /**\n   * Return the IP address of this machine, as determined from the hostname\n   * specified in configuration or from querying the machine.\n   */\n  public static String getIPAddress(Configuration conf) {\n    String hostname = getHostName(conf);\n    try {\n      return InetAddress.getByName(hostname).getHostAddress();\n    } catch (UnknownHostException e) {\n      return \"IP UNKNOWN\";\n    }\n  }\n}\n"
  },
  {
    "path": "src/main/java/edu/berkeley/sparrow/daemon/util/Resolution.java",
    "content": "/*\n * Copyright 2013 The Regents of The University California\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *   http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage edu.berkeley.sparrow.daemon.util;\n\npublic class Resolution {\n\n}\n"
  },
  {
    "path": "src/main/java/edu/berkeley/sparrow/daemon/util/Resources.java",
    "content": "/*\n * Copyright 2013 The Regents of The University California\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *   http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage edu.berkeley.sparrow.daemon.util;\n\nimport java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\nimport org.apache.commons.configuration.Configuration;\n\nimport edu.berkeley.sparrow.daemon.SparrowConf;\n\n/** Utilities for interrogating system resources. */\npublic class Resources {\n  public static int getSystemMemoryMb(Configuration conf) {\n    int systemMemory = -1;\n    try {\n      Process p = Runtime.getRuntime().exec(\"cat /proc/meminfo\");  \n      BufferedReader in = new BufferedReader(new InputStreamReader(p.getInputStream()));\n      String line = in.readLine();\n      while (line != null) {\n        if (line.contains(\"MemTotal\")) { \n          String[] parts = line.split(\"\\\\s+\");\n          if (parts.length > 1) {\n            int memory = Integer.parseInt(parts[1]) / 1000;\n            systemMemory = memory;\n          }\n        }\n        line = in.readLine();\n      }\n    } catch (IOException e) {}\n    if (conf.containsKey(SparrowConf.SYSTEM_MEMORY)) {\n      return conf.getInt(SparrowConf.SYSTEM_MEMORY);\n    } else {\n      if (systemMemory != -1) {\n        return systemMemory;\n      } else {\n        return SparrowConf.DEFAULT_SYSTEM_MEMORY;\n      }\n    }\n  }\n  \n  public static int getSystemCPUCount(Configuration conf) {\n    // No system interrogation yet\n    return conf.getInt(SparrowConf.SYSTEM_CPUS, SparrowConf.DEFAULT_SYSTEM_CPUS);\n  }\n}\n"
  },
  {
    "path": "src/main/java/edu/berkeley/sparrow/daemon/util/Serialization.java",
    "content": "/*\n * Copyright 2013 The Regents of The University California\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *   http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage edu.berkeley.sparrow.daemon.util;\n\nimport java.net.InetSocketAddress;\nimport java.nio.ByteBuffer;\n\nimport com.google.common.base.Optional;\n\n/** Utility functions for serializing data types to/from string representation .**/\npublic class Serialization {\n  public static Optional<InetSocketAddress> strToSocket(String in) {\n    String[] parts = in.split(\":\");\n    if (parts.length != 2) {\n      return Optional.absent();\n    }\n    String host = parts[0];\n    // This deals with the wonky way Java InetAddress toString() represents an address:\n    // \"hostname/IP\"\n    if (parts[0].contains(\"/\")) {\n      host = parts[0].split(\"/\")[1];\n    }\n    try {\n      return Optional.of(new InetSocketAddress(\n        host, Integer.parseInt(parts[1])));\n    } catch (NumberFormatException e) {\n      return Optional.absent();\n    }\n  }\n  \n  public static byte[] getByteBufferContents(ByteBuffer buffer) {\n    byte[] out = new byte[buffer.limit() - buffer.position()];\n    buffer.get(out);\n    return out;\n  }\n}\n"
  },
  {
    "path": "src/main/java/edu/berkeley/sparrow/daemon/util/TClients.java",
    "content": "/*\n * Copyright 2013 The Regents of The University California\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *   http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage edu.berkeley.sparrow.daemon.util;\n\nimport java.io.IOException;\nimport java.net.InetSocketAddress;\n\nimport org.apache.log4j.Logger;\nimport org.apache.thrift.protocol.TBinaryProtocol;\nimport org.apache.thrift.protocol.TProtocol;\nimport org.apache.thrift.transport.TFramedTransport;\nimport org.apache.thrift.transport.TSocket;\nimport org.apache.thrift.transport.TTransport;\nimport org.apache.thrift.transport.TTransportException;\n\nimport edu.berkeley.sparrow.thrift.BackendService;\nimport edu.berkeley.sparrow.thrift.FrontendService;\nimport edu.berkeley.sparrow.thrift.GetTaskService;\nimport edu.berkeley.sparrow.thrift.NodeMonitorService;\nimport edu.berkeley.sparrow.thrift.SchedulerService;\nimport edu.berkeley.sparrow.thrift.StateStoreService;\n\n/**\n * Helper functions for creating Thrift clients for various Sparrow interfaces.\n */\npublic class TClients {\n  private final static Logger LOG = Logger.getLogger(TClients.class);\n\n  public static NodeMonitorService.Client createBlockingNmClient(String host, int port)\n      throws IOException {\n    return createBlockingNmClient(host, port, 0);\n  }\n\n  public static NodeMonitorService.Client createBlockingNmClient(String host, int port,\n      int timeout)\n      throws IOException {\n    TTransport tr = new TFramedTransport(new TSocket(host, port, timeout));\n    try {\n      tr.open();\n    } catch (TTransportException e) {\n      LOG.warn(\"Error creating node monitor client to \" + host + \":\" + port);\n      throw new IOException(e);\n    }\n    TProtocol proto = new TBinaryProtocol(tr);\n    NodeMonitorService.Client client = new NodeMonitorService.Client(proto);\n    return client;\n  }\n\n  public static SchedulerService.Client createBlockingSchedulerClient(\n      InetSocketAddress socket) throws IOException {\n    return createBlockingSchedulerClient(socket.getAddress().getHostAddress(), socket.getPort());\n  }\n\n  public static SchedulerService.Client createBlockingSchedulerClient(\n      String host, int port) throws IOException {\n    return createBlockingSchedulerClient(host, port, 0);\n  }\n\n  public static SchedulerService.Client createBlockingSchedulerClient(\n      String host, int port, int timeout) throws IOException {\n    TTransport tr = new TFramedTransport(new TSocket(host, port, timeout));\n    try {\n      tr.open();\n    } catch (TTransportException e) {\n      LOG.warn(\"Error creating scheduler client to \" + host + \":\" + port);\n      throw new IOException(e);\n    }\n    TProtocol proto = new TBinaryProtocol(tr);\n    SchedulerService.Client client = new SchedulerService.Client(proto);\n    return client;\n  }\n\n  public static GetTaskService.Client createBlockingGetTaskClient(\n      InetSocketAddress socket) throws IOException {\n    return createBlockingGetTaskClient(socket.getAddress().getHostAddress(), socket.getPort());\n  }\n\n  public static GetTaskService.Client createBlockingGetTaskClient(\n      String host, int port) throws IOException {\n    return createBlockingGetTaskClient(host, port, 0);\n  }\n\n  public static GetTaskService.Client createBlockingGetTaskClient(\n      String host, int port, int timeout) throws IOException {\n    TTransport tr = new TFramedTransport(new TSocket(host, port, timeout));\n    try {\n      tr.open();\n    } catch (TTransportException e) {\n      LOG.warn(\"Error creating scheduler client to \" + host + \":\" + port);\n      throw new IOException(e);\n    }\n    TProtocol proto = new TBinaryProtocol(tr);\n    GetTaskService.Client client = new GetTaskService.Client(proto);\n    return client;\n  }\n\n  public static BackendService.Client createBlockingBackendClient(\n      InetSocketAddress socket) throws IOException {\n    return createBlockingBackendClient(socket.getAddress().getHostAddress(), socket.getPort());\n  }\n\n  public static BackendService.Client createBlockingBackendClient(\n      String host, int port) throws IOException {\n    TTransport tr = new TFramedTransport(new TSocket(host, port));\n    try {\n      tr.open();\n    } catch (TTransportException e) {\n      LOG.warn(\"Error creating backend client to \" + host + \":\" + port);\n      throw new IOException(e);\n    }\n    TProtocol proto = new TBinaryProtocol(tr);\n    BackendService.Client client = new BackendService.Client(proto);\n    return client;\n  }\n\n  public static StateStoreService.Client createBlockingStateStoreClient(\n      String host, int port) throws IOException {\n    TTransport tr = new TFramedTransport(new TSocket(host, port));\n    try {\n      tr.open();\n    } catch (TTransportException e) {\n      LOG.warn(\"Error creating state store client to \" + host + \":\" + port);\n      throw new IOException(e);\n    }\n    TProtocol proto = new TBinaryProtocol(tr);\n    StateStoreService.Client client = new StateStoreService.Client(proto);\n    return client;\n  }\n\n  public static FrontendService.Client createBlockingFrontendClient(\n      InetSocketAddress socket) throws IOException {\n    return createBlockingFrontendClient(socket.getAddress().getHostAddress(), socket.getPort());\n  }\n\n  public static FrontendService.Client createBlockingFrontendClient(\n      String host, int port) throws IOException {\n    TTransport tr = new TFramedTransport(new TSocket(host, port));\n    try {\n      tr.open();\n    } catch (TTransportException e) {\n      LOG.warn(\"Error creating state store client to \" + host + \":\" + port);\n      throw new IOException(e);\n    }\n    TProtocol proto = new TBinaryProtocol(tr);\n    FrontendService.Client client = new FrontendService.Client(proto);\n    return client;\n  }\n}\n"
  },
  {
    "path": "src/main/java/edu/berkeley/sparrow/daemon/util/TServers.java",
    "content": "/*\n * Copyright 2013 The Regents of The University California\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *   http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage edu.berkeley.sparrow.daemon.util;\n\nimport java.io.IOException;\n\nimport org.apache.log4j.Logger;\nimport org.apache.thrift.TProcessor;\nimport org.apache.thrift.protocol.TBinaryProtocol;\nimport org.apache.thrift.server.TNonblockingServer;\nimport org.apache.thrift.server.TServer;\nimport org.apache.thrift.server.TThreadedSelectorServer;\nimport org.apache.thrift.transport.TFramedTransport;\nimport org.apache.thrift.transport.TNonblockingServerSocket;\nimport org.apache.thrift.transport.TNonblockingServerTransport;\nimport org.apache.thrift.transport.TTransportException;\n\n/***\n * Helper functions for dispatching Thrift servers.\n */\npublic class TServers {\n  private final static Logger LOG = Logger.getLogger(TServers.class);\n  private final static int SELECTOR_THREADS = 4;\n\n  /**\n   * Launch a single threaded nonblocking IO server. All requests to this server will be\n   * handled in a single thread, so its requests should not contain blocking functions.\n   */\n  public static void launchSingleThreadThriftServer(int port, TProcessor processor)\n      throws IOException {\n    LOG.info(\"Staring async thrift server of type: \" + processor.getClass().toString()\n        + \" on port \" + port);\n    TNonblockingServerTransport serverTransport;\n    try {\n      serverTransport = new TNonblockingServerSocket(port);\n    } catch (TTransportException e) {\n      throw new IOException(e);\n    }\n    TNonblockingServer.Args serverArgs = new TNonblockingServer.Args(serverTransport);\n    serverArgs.processor(processor);\n    TServer server = new TNonblockingServer(serverArgs);\n    new Thread(new TServerRunnable(server)).start();\n  }\n\n  /**\n   * Launch a multi-threaded Thrift server with the given {@code processor}. Note that\n   * internally this creates an expanding thread pool of at most {@code threads} threads,\n   * and requests are queued whenever that thread pool is saturated.\n   */\n  public static void launchThreadedThriftServer(int port, int threads,\n      TProcessor processor) throws IOException {\n    LOG.info(\"Staring async thrift server of type: \" + processor.getClass().toString()\n    \t\t+ \" on port \" + port);\n    TNonblockingServerTransport serverTransport;\n    try {\n      serverTransport = new TNonblockingServerSocket(port);\n    } catch (TTransportException e) {\n      throw new IOException(e);\n    }\n    TThreadedSelectorServer.Args serverArgs = new TThreadedSelectorServer.Args(serverTransport);\n    serverArgs.transportFactory(new TFramedTransport.Factory());\n    serverArgs.protocolFactory(new TBinaryProtocol.Factory());\n    serverArgs.processor(processor);\n    serverArgs.selectorThreads(SELECTOR_THREADS);\n    serverArgs.workerThreads(threads);\n    TServer server = new TThreadedSelectorServer(serverArgs);\n    new Thread(new TServerRunnable(server)).start();\n  }\n\n /**\n  * Runnable class to wrap thrift servers in their own thread.\n  */\n  private static class TServerRunnable implements Runnable {\n    private TServer server;\n\n    public TServerRunnable(TServer server) {\n      this.server = server;\n    }\n\n    public void run() {\n      this.server.serve();\n    }\n  }\n}\n"
  },
  {
    "path": "src/main/java/edu/berkeley/sparrow/daemon/util/ThriftClientPool.java",
    "content": "/*\n * Copyright 2013 The Regents of The University California\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *   http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage edu.berkeley.sparrow.daemon.util;\n\nimport java.io.IOException;\nimport java.net.InetSocketAddress;\nimport java.util.HashMap;\n\nimport org.apache.commons.pool.KeyedPoolableObjectFactory;\nimport org.apache.commons.pool.impl.GenericKeyedObjectPool;\nimport org.apache.commons.pool.impl.GenericKeyedObjectPool.Config;\nimport org.apache.log4j.Logger;\nimport org.apache.thrift.async.TAsyncClient;\nimport org.apache.thrift.async.TAsyncClientManager;\nimport org.apache.thrift.protocol.TBinaryProtocol;\nimport org.apache.thrift.protocol.TProtocolFactory;\nimport org.apache.thrift.transport.TNonblockingSocket;\nimport org.apache.thrift.transport.TNonblockingTransport;\n\nimport edu.berkeley.sparrow.thrift.FrontendService;\nimport edu.berkeley.sparrow.thrift.GetTaskService;\nimport edu.berkeley.sparrow.thrift.InternalService;\nimport edu.berkeley.sparrow.thrift.NodeMonitorService;\nimport edu.berkeley.sparrow.thrift.PongService;\nimport edu.berkeley.sparrow.thrift.SchedulerService;\n\n/** A pool of nonblocking thrift async connections. */\npublic class ThriftClientPool<T extends TAsyncClient> {\n  // Default configurations for underlying pool\n  /** See {@link GenericKeyedObjectPool.Config} */\n  public static int MIN_IDLE_CLIENTS_PER_ADDR = 0;\n  /** See {@link GenericKeyedObjectPool.Config} */\n  public static int EVICTABLE_IDLE_TIME_MILLIS = 1000;\n  /** See {@link GenericKeyedObjectPool.Config} */\n  public static int TIME_BETWEEN_EVICTION_RUNS_MILLIS = -1;\n  /** See {@link GenericKeyedObjectPool.Config} */\n  public static int MAX_ACTIVE_CLIENTS_PER_ADDR = 16;\n\n  private static final Logger LOG = Logger.getLogger(ThriftClientPool.class);\n\n  /** Get the configuration parameters used on the underlying client pool. */\n  protected static Config getPoolConfig() {\n    Config conf = new Config();\n    conf.minIdle = MIN_IDLE_CLIENTS_PER_ADDR;\n    conf.maxIdle = -1;\n    conf.minEvictableIdleTimeMillis = EVICTABLE_IDLE_TIME_MILLIS;\n    conf.timeBetweenEvictionRunsMillis = TIME_BETWEEN_EVICTION_RUNS_MILLIS;\n    conf.maxActive = MAX_ACTIVE_CLIENTS_PER_ADDR;\n    conf.whenExhaustedAction = GenericKeyedObjectPool.WHEN_EXHAUSTED_BLOCK;\n    return conf;\n  }\n\n  /** Clients need to provide an instance of this factory which is capable of creating\n   * the a thrift client of type <T>. */\n  public interface MakerFactory<T> {\n    public T create(TNonblockingTransport tr, TAsyncClientManager mgr,\n        TProtocolFactory factory);\n  }\n\n  // MakerFactory implementations for Sparrow interfaces...\n  public static class InternalServiceMakerFactory\n    implements MakerFactory<InternalService.AsyncClient> {\n    @Override\n    public InternalService.AsyncClient create(TNonblockingTransport tr,\n        TAsyncClientManager mgr, TProtocolFactory factory) {\n      return new InternalService.AsyncClient(factory, mgr, tr);\n    }\n  }\n\n  public static class NodeMonitorServiceMakerFactory\n    implements MakerFactory<NodeMonitorService.AsyncClient> {\n    @Override\n    public NodeMonitorService.AsyncClient create(TNonblockingTransport tr,\n        TAsyncClientManager mgr, TProtocolFactory factory) {\n      return new NodeMonitorService.AsyncClient(factory, mgr, tr);\n    }\n  }\n\n  public static class SchedulerServiceMakerFactory\n    implements MakerFactory<SchedulerService.AsyncClient> {\n    @Override\n    public SchedulerService.AsyncClient create(TNonblockingTransport tr,\n        TAsyncClientManager mgr, TProtocolFactory factory) {\n      return new SchedulerService.AsyncClient(factory, mgr, tr);\n    }\n  }\n\n  public static class FrontendServiceMakerFactory\n    implements MakerFactory<FrontendService.AsyncClient> {\n    @Override\n    public FrontendService.AsyncClient create(TNonblockingTransport tr,\n        TAsyncClientManager mgr, TProtocolFactory factory) {\n      return new FrontendService.AsyncClient(factory, mgr, tr);\n    }\n  }\n\n  public static class GetTaskServiceMakerFactory\n  implements MakerFactory<GetTaskService.AsyncClient> {\n    @Override\n    public GetTaskService.AsyncClient create(TNonblockingTransport tr,\n        TAsyncClientManager mgr, TProtocolFactory factory) {\n      return new GetTaskService.AsyncClient(factory, mgr, tr);\n    }\n  }\n\n  public static class PongServiceMakerFactory\n  implements MakerFactory<PongService.AsyncClient> {\n    @Override\n    public PongService.AsyncClient create(TNonblockingTransport tr,\n        TAsyncClientManager mgr, TProtocolFactory factory) {\n      return new PongService.AsyncClient(factory, mgr, tr);\n    }\n  }\n\n  private class PoolFactory implements KeyedPoolableObjectFactory<InetSocketAddress, T> {\n    // Thrift clients do not expose their underlying transports, so we track them\n    // separately here to let us call close() on the transport associated with a\n    // particular client.\n    private HashMap<T, TNonblockingTransport> transports =\n        new HashMap<T, TNonblockingTransport>();\n    private MakerFactory<T> maker;\n\n    public PoolFactory(MakerFactory<T> maker) {\n      this.maker = maker;\n    }\n\n    @Override\n    public void destroyObject(InetSocketAddress socket, T client) throws Exception {\n      transports.get(client).close();\n      transports.remove(client);\n    }\n\n    @Override\n    public T makeObject(InetSocketAddress socket) throws Exception {\n      TNonblockingTransport nbTr = new TNonblockingSocket(\n          socket.getAddress().getHostAddress(), socket.getPort());\n      TProtocolFactory factory = new TBinaryProtocol.Factory();\n      T client = maker.create(nbTr, clientManager, factory);\n      transports.put(client, nbTr);\n      return client;\n    }\n\n    @Override\n    public boolean validateObject(InetSocketAddress socket, T client) {\n      return transports.get(client).isOpen();\n    }\n\n    @Override\n    public void activateObject(InetSocketAddress socket, T client) throws Exception {\n      // Nothing to do here\n    }\n\n    @Override\n    public void passivateObject(InetSocketAddress socket, T client)\n        throws Exception {\n      // Nothing to do here\n    }\n  }\n\n  /** Pointer to shared selector thread. */\n  TAsyncClientManager clientManager;\n\n  /** Underlying object pool. */\n  private GenericKeyedObjectPool<InetSocketAddress, T> pool;\n\n  public ThriftClientPool(MakerFactory<T> maker) {\n    pool = new GenericKeyedObjectPool<InetSocketAddress, T>(new PoolFactory(maker),\n        getPoolConfig());\n    try {\n      clientManager = new TAsyncClientManager();\n    } catch (IOException e) {\n      LOG.fatal(e);\n    }\n  }\n\n  /** Constructor (for unit tests) which overrides default configuration. */\n  protected ThriftClientPool(MakerFactory<T> maker, Config conf) {\n    this(maker);\n    pool.setConfig(conf);\n  }\n\n  /** Borrows a client from the pool. */\n  public T borrowClient(InetSocketAddress socket)\n      throws Exception {\n    return pool.borrowObject(socket);\n  }\n\n  /** Returns a client to the pool. */\n  public void returnClient(InetSocketAddress socket, T client)\n      throws Exception {\n    pool.returnObject(socket, client);\n  }\n\n  public int getNumActive(InetSocketAddress socket) {\n    return pool.getNumActive(socket);\n  }\n\n  public int getNumIdle(InetSocketAddress socket) {\n    return pool.getNumIdle(socket);\n  }\n}\n"
  },
  {
    "path": "src/main/java/edu/berkeley/sparrow/examples/BackendBenchmarkProfiler.java",
    "content": "/*\n * Copyright 2013 The Regents of The University California\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *   http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage edu.berkeley.sparrow.examples;\n\nimport java.util.ArrayList;\nimport java.util.Collections;\nimport java.util.LinkedList;\nimport java.util.Random;\nimport java.util.concurrent.BlockingQueue;\nimport java.util.HashMap;\nimport java.util.List;\nimport java.util.concurrent.ExecutionException;\nimport java.util.concurrent.ExecutorService;\nimport java.util.concurrent.Executors;\nimport java.util.concurrent.LinkedBlockingQueue;\nimport java.util.concurrent.ThreadPoolExecutor;\nimport java.util.concurrent.TimeUnit;\n\nimport joptsimple.OptionParser;\nimport joptsimple.OptionSet;\n\nimport org.apache.commons.math.stat.descriptive.DescriptiveStatistics;\n\n\n/**\n * A standalone script for profiling benchmark capacity on a given machine.\n * \n * This is useful for determining how much capacity a machine has for our benchmark. i.e.\n * what is the maximum rate of tasks-per-second the machine can sustain. We determine\n * this experimentally since it depends on several factors - in particular the speed of \n * the CPU and the OS scheduling policy. See {@code main()} and {code runExperiment()} \n * for more information on what is actually run here.\n * \n * See {@link runExperiment()} for details.\n */\npublic class BackendBenchmarkProfiler {\n  public static final int DEFAULT_BENCHMARK_ITERATIONS = 4;\n  public static final int DEFAULT_BENCHMARK_ID = 1;\n  public static final int DEFAULT_BUCKET_SIZE_S = 2;\n  public static final int DEFAULT_TRAIL_LENGTH_S = 60;\n  public static final double DEFAULT_START_RATE = 10;\n  public static final double DEFAULT_END_RATE = 30;\n  public static final double DEFAULT_RATE_STEP = 2;\n  \n  public static int benchmarkIterations = DEFAULT_BENCHMARK_ITERATIONS;\n  public static int benchmarkId = DEFAULT_BENCHMARK_ID;\n  public static int bucketSizeS = DEFAULT_BUCKET_SIZE_S;\n  public static int trialLengthS = DEFAULT_TRAIL_LENGTH_S;\n  public static double startRate = DEFAULT_START_RATE;\n  public static double endRate = DEFAULT_END_RATE;\n  public static double rateStep = DEFAULT_RATE_STEP;\n  \n  private static class BenchmarkRunnable implements Runnable {\n    private HashMap<Long, List<Long>> runTimes;\n    private HashMap<Long, List<Long>> waitTimes;\n    private long timeCreated;\n    private long bucketGranularity;\n\n    /**\n     * A runnable which runs a floating point benchmark and updates the global list\n     * of runtimes with information about how long it took. Run time is assessed\n     * as the difference between when the runnable is instantiated and when it finishes\n     * the benchmark loop and exists. This might include queueing in the executor.  \n     */\n    private BenchmarkRunnable(HashMap<Long, List<Long>> runTimes, \n        HashMap<Long, List<Long>> waitTimes, long granularity) {\n      this.runTimes = runTimes;\n      this.waitTimes = waitTimes;\n      timeCreated = System.currentTimeMillis();\n      bucketGranularity = granularity;\n    }\n    \n    @Override\n    public void run() {\n      long start = System.currentTimeMillis();\n      Random r = new Random();\n      ProtoBackend.runBenchmark(benchmarkId, benchmarkIterations, r);\n      long end = System.currentTimeMillis();\n      long timeIndex = timeCreated - (timeCreated % bucketGranularity);\n      synchronized(runTimes) {\n        if (!runTimes.containsKey((timeIndex))) {\n          runTimes.put(timeIndex, new LinkedList<Long>());\n        }\n        runTimes.get(timeIndex).add(end - timeCreated);\n      }      \n      synchronized(waitTimes) {\n        if (!waitTimes.containsKey((timeIndex))) {\n          waitTimes.put(timeIndex, new LinkedList<Long>());\n        }\n        waitTimes.get(timeIndex).add(start - timeCreated);\n      }      \n    }\n  }\n  \n  /**\n   * This generates an arrival delay according to an exponential distribution with\n   * average 1\\{@code lambda}. Generating arrival delays from such a distribution creates\n   * a Poission process with an average arrival rate of {@code lambda} events per second. \n   */\n  public static double generateInterarrivalDelay(Random r, double lambda) {\n    double u = r.nextDouble();\n    return -Math.log(u)/lambda;\n  }\n  \n  /**\n   * Run an experiment which launches tasks at {@code arrivalRate} for {@code durationMs}\n   * seconds and waits for all tasks to finish. Return a {@link DescriptiveStatistics}\n   * object which contains stats about the distribution of task finish times. Tasks\n   * are executed in a thread pool which contains at least {@code corePoolSize} threads\n   * and grows up to {@code maxPoolSize} threads (growing whenever a new task arrives\n   * and all existing threads are used). \n   * \n   * Setting {@code maxPoolSize} to a very large number enacts time sharing, while\n   * setting it equal to {@code corePoolSize} creates a fixed size task pool.\n   * \n   * The derivative of task finishes is tracked by bucketing tasks at the granularity\n   * {@code bucketSize}. If it is detected that task finishes are increasing in an \n   * unbounded fashion (i.e. infinite queuing is occuring) a {@link RuntimeException} \n   * is thrown.\n   */\n  public static void runExperiment(double arrivalRate, int corePoolSize,\n      int maxPoolSize, long bucketSize, long durationMs, DescriptiveStatistics runTimes,\n      DescriptiveStatistics waitTimes) {\n    long startTime = System.currentTimeMillis();\n    long keepAliveTime = 10;\n    Random r = new Random();\n    BlockingQueue<Runnable> runQueue = new LinkedBlockingQueue<Runnable>();\n    ExecutorService threadPool = new ThreadPoolExecutor(\n        corePoolSize, maxPoolSize, keepAliveTime, TimeUnit.MILLISECONDS, runQueue);\n    if (maxPoolSize == Integer.MAX_VALUE) {\n      threadPool = Executors.newCachedThreadPool();\n    }\n    \n    // run times indexed by bucketing interval\n    HashMap<Long, List<Long>> bucketedRunTimes = \n        new HashMap<Long, List<Long>>();\n    // wait times indexed by bucketing interval\n    HashMap<Long, List<Long>> bucketedWaitTimes = \n        new HashMap<Long, List<Long>>();\n    \n    /*\n     * This is a little tricky. \n     * \n     * We want to generate inter-arrival delays according to the arrival rate specified.\n     * The simplest option would be to generate an arrival delay and then sleep() for it\n     * before launching each task. This has in issue, however: sleep() might wait \n     * several ms longer than we ask it to. When task arrival rates get really fast, \n     * i.e. one task every 10 ms, sleeping an additional few ms will mean we launch \n     * tasks at a much lower rate than requested.\n     * \n     * Instead, we keep track of task launches in a way that does not depend on how long\n     * sleep() actually takes. We still might have tasks launch slightly after their\n     * scheduled launch time, but we will not systematically \"fall behind\" due to\n     * compounding time lost during sleep()'s;\n     */\n    long currTime = startTime;\n    while (true) {\n      long delay = (long) (generateInterarrivalDelay(r, arrivalRate) * 1000);\n      \n      // When should the next task launch, based on when the last task was scheduled\n      // to launch.\n      long nextTime = currTime + delay;\n      \n      // Diff gives how long we should wait for the next scheduled task. The difference \n      // may be negative if our last sleep() lasted too long relative to the inter-arrival\n      // delay based on the last scheduled launch, so we round up to 0 in that case. \n      long diff = Math.max(0, nextTime - System.currentTimeMillis());\n      currTime = nextTime;\n      if (diff > 0) {\n        try {\n          Thread.sleep(diff);\n        } catch (InterruptedException e) {\n          System.err.println(\"Unexpected interruption!\");\n          System.exit(1);\n        }\n      }\n      threadPool.submit((new BenchmarkRunnable(bucketedRunTimes, bucketedWaitTimes, bucketSize)));\n      if (System.currentTimeMillis() > startTime + durationMs) {\n        break;\n      }\n    }\n    threadPool.shutdown();\n    try {\n      threadPool.awaitTermination(Long.MAX_VALUE, TimeUnit.MILLISECONDS);\n    } catch (InterruptedException e1) {\n      System.err.println(\"Unexpected interruption!\");\n      System.exit(1);\n    }\n    List<Long> times = new ArrayList<Long>(bucketedRunTimes.keySet());\n    Collections.sort(times);\n    HashMap<Long, DescriptiveStatistics> bucketStats = new HashMap<Long, \n        DescriptiveStatistics>();\n    \n    // Remove first and last buckets since they will not be completely full to do\n    // discretization. \n    times.remove(0);\n    times.remove(times.size() - 1);\n    \n    for(Long time : times) {\n      DescriptiveStatistics stats = new DescriptiveStatistics();\n      List<Long> list = bucketedRunTimes.get(time);\n      for (Long l : list) {\n        stats.addValue(l);\n        runTimes.addValue(l);\n      }\n      bucketStats.put(time, stats);\n      \n      List<Long> waitList = bucketedWaitTimes.get(time);\n      for (Long l : waitList) {\n        waitTimes.addValue(l);\n      }\n    }\n    int size = bucketStats.size();\n    if (size >= 2) {\n      DescriptiveStatistics first = bucketStats.get(times.get(0));\n      DescriptiveStatistics last = bucketStats.get(times.get(times.size() - 1));\n      double increase = last.getPercentile(50) / first.getPercentile(50);\n      // A simple heuristic, if the median runtime went up by five from the first to \n      // last complete bucket, we assume we are seeing unbounded growth\n      if (increase > 5.0) {\n        throw new RuntimeException(\"Queue not in steady state: \" + last.getMean() \n            + \" vs \" + first.getMean());\n      }\n    }\n  }\n  \n  /**\n   * Run the benchmark at increasingly high arrival rates until infinite queuing is\n   * detected. This performs two trials, one where tasks are launched in a fixed-sized\n   * pool and the other where tasks are not queued and always launched in parallel.\n   * The statistics for runtime vs. arrival rate are printed out for each of the two\n   * trials. \n   */\n  public static void main(String[] args) throws InterruptedException, ExecutionException {\n    OptionParser parser = new OptionParser();\n    parser.accepts(\"t\", \"size of core thread pool\").\n      withRequiredArg().ofType(Integer.class);\n    parser.accepts(\"b\", \"benchmark ID\").\n    withRequiredArg().ofType(Integer.class);\n    parser.accepts(\"i\", \"number of benchmark iterations to run\").\n      withRequiredArg().ofType(Integer.class);\n    parser.accepts(\"s\", \"bucket size in seconds\").\n      withRequiredArg().ofType(Integer.class);\n    parser.accepts(\"d\", \" experiment duration in seconds\").\n      withRequiredArg().ofType(Integer.class);\n    parser.accepts(\"r\", \"initial rate of task launches\").\n      withRequiredArg().ofType(Double.class);\n    parser.accepts(\"f\", \"final rate of task launches\").\n      withRequiredArg().ofType(Double.class);\n    parser.accepts(\"k\", \"step size of increased rates\").\n      withRequiredArg().ofType(Double.class);\n    \n    OptionSet options = parser.parse(args);\n    \n    int coreThreadPoolSize = 4;\n    if (options.has(\"t\")) {\n      coreThreadPoolSize = (Integer) options.valueOf(\"t\");\n    }\n    if (options.has(\"b\")) {\n      benchmarkId = (Integer) options.valueOf(\"b\");\n    }\n    if (options.has(\"i\")) {\n      benchmarkIterations = (Integer) options.valueOf(\"i\");\n    }\n    if (options.has(\"s\")) {\n      bucketSizeS = (Integer) options.valueOf(\"s\");\n    }\n    if (options.has(\"d\")) {\n      trialLengthS = (Integer) options.valueOf(\"d\");\n    }\n    if (options.has(\"r\")) {\n      startRate = (Double) options.valueOf(\"r\");\n    }\n    if (options.has(\"f\")) {\n      endRate = (Double) options.valueOf(\"f\");\n    }\n    if (options.has(\"k\")) {\n      rateStep = (Double) options.valueOf(\"k\");\n    }\n    \n    // Run the benchmark a few times to let JIT kick in\n    int bucketSizeMs = bucketSizeS * 1000;\n    int trialLengthMs = trialLengthS * 1000;\n    runExperiment(15.0, coreThreadPoolSize, coreThreadPoolSize, bucketSizeMs, \n       trialLengthMs, new DescriptiveStatistics(), new DescriptiveStatistics());\n    runExperiment(15.0, coreThreadPoolSize, coreThreadPoolSize, bucketSizeMs, \n        trialLengthMs, new DescriptiveStatistics(), new DescriptiveStatistics());\n\n    for (double i = startRate; i <= endRate; i = i + rateStep) {\n      try {\n        DescriptiveStatistics runTimes = new DescriptiveStatistics();\n        DescriptiveStatistics waitTimes = new DescriptiveStatistics();\n        runExperiment(i, coreThreadPoolSize, coreThreadPoolSize, bucketSizeMs, \n            trialLengthMs, runTimes, waitTimes);\n        System.out.println(i + \" run \" + runTimes.getPercentile(50.0) + \" \" +\n            runTimes.getPercentile(95) + \" \" + runTimes.getPercentile(99));\n        System.out.println(i + \" wait \" + waitTimes.getPercentile(50.0) + \" \" +\n            waitTimes.getPercentile(95) + \" \" + waitTimes.getPercentile(99));\n      }\n      catch (RuntimeException e) {\n        System.out.println(e);\n        break;\n      }\n    }\n\n    for (double i = startRate; i <= endRate; i = i + rateStep) {\n      try {\n        DescriptiveStatistics runTimes = new DescriptiveStatistics();\n        DescriptiveStatistics waitTimes = new DescriptiveStatistics();\n        runExperiment(i, coreThreadPoolSize, Integer.MAX_VALUE, bucketSizeMs, \n            trialLengthMs, runTimes, waitTimes);\n        System.out.println(i + \" run \" + runTimes.getPercentile(50.0) + \" \" +\n            runTimes.getPercentile(95) + \" \" + runTimes.getPercentile(99));\n        System.out.println(i + \" wait \" + waitTimes.getPercentile(50.0) + \" \" +\n            waitTimes.getPercentile(95) + \" \" + waitTimes.getPercentile(99));\n      }\n      catch (RuntimeException e) {\n        System.out.println(e);\n        break;\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "src/main/java/edu/berkeley/sparrow/examples/FairnessTestingFrontend.java",
    "content": "/*\n * Copyright 2013 The Regents of The University California\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *   http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage edu.berkeley.sparrow.examples;\n\nimport java.net.InetSocketAddress;\nimport java.nio.ByteBuffer;\nimport java.util.ArrayList;\nimport java.util.Collections;\nimport java.util.List;\nimport java.util.Random;\nimport java.util.concurrent.atomic.AtomicInteger;\n\nimport joptsimple.OptionParser;\nimport joptsimple.OptionSet;\n\nimport org.apache.commons.configuration.Configuration;\nimport org.apache.commons.configuration.PropertiesConfiguration;\nimport org.apache.log4j.BasicConfigurator;\nimport org.apache.log4j.Level;\nimport org.apache.log4j.Logger;\nimport org.apache.thrift.TException;\n\nimport edu.berkeley.sparrow.api.SparrowFrontendClient;\nimport edu.berkeley.sparrow.daemon.scheduler.SchedulerThrift;\nimport edu.berkeley.sparrow.daemon.util.Serialization;\nimport edu.berkeley.sparrow.thrift.FrontendService;\nimport edu.berkeley.sparrow.thrift.TFullTaskId;\nimport edu.berkeley.sparrow.thrift.TPlacementPreference;\nimport edu.berkeley.sparrow.thrift.TTaskSpec;\nimport edu.berkeley.sparrow.thrift.TUserGroupInfo;\n\n/**\n * Frontend for the prototype implementation.\n */\npublic class FairnessTestingFrontend implements FrontendService.Iface {\n  /** Jobs/second during warmup period. */\n  public static final double DEFAULT_WARMUP_JOB_ARRIVAL_RATE_S = 10;\n\n  /** Duration of warmup period. */\n  public static final int DEFAULT_WARMUP_S = 10;\n\n  /** Amount of time to wait for queues to drain once warmup period is over. */\n  public static final int DEFAULT_POST_WARMUP_S = 60;\n\n  /** Amount of time to launch tasks for (not including the warmup period). */\n  public static final int DEFAULT_EXPERIMENT_S = 300;\n\n  public static final double DEFAULT_JOB_ARRIVAL_RATE_S = 10; // Jobs/second\n  public static final int DEFAULT_TASKS_PER_JOB = 1;          // Tasks/job\n\n  // Type of benchmark to run, see ProtoBackend static constant for benchmark types\n  public static final int DEFAULT_TASK_BENCHMARK = ProtoBackend.BENCHMARK_TYPE_FP_CPU;\n  public static final int DEFAULT_BENCHMARK_ITERATIONS = 1000;  // # of benchmark iterations\n\n  /**\n   * The default number of preferred nodes for each task. 0 signals that tasks are\n   * unconstrained.\n   */\n  public static final int DEFAULT_NUM_PREFERRED_NODES = 0;\n\n  /**\n   * Configuration parameter name for the set of backends (used to set preferred nodes for\n   * tasks).\n   */\n  public static final String BACKENDS = \"backends\";\n\n  /**\n   * Configuration parameter name for the set of users. Users should be specified by three\n   * values: a user id, an integral priority, and an integral demand, where the demand of each user\n   * is specified relative to the demands of other users. These three values should be semi-colon\n   * separated.\n   */\n  public static final String USERS = \"users\";\n\n  /**\n   * Default application name.\n   */\n  public static final String APPLICATION_ID = \"testApp\";\n\n  private static final Logger LOG = Logger.getLogger(FairnessTestingFrontend.class);\n  public final static long startTime = System.currentTimeMillis();\n  public static AtomicInteger tasksLaunched = new AtomicInteger(0);\n\n  /** A runnable that launches a scheduling request. */\n  private class JobLaunchRunnable implements Runnable {\n    private List<TTaskSpec> request;\n    private SparrowFrontendClient client;\n    UserInfo user;\n\n    public JobLaunchRunnable(List<TTaskSpec> request, UserInfo user, SparrowFrontendClient client) {\n      this.request = request;\n      this.client = client;\n      this.user = user;\n    }\n\n    @Override\n    public void run() {\n      long start = System.currentTimeMillis();\n      TUserGroupInfo userInfo = new TUserGroupInfo(user.user, \"*\", user.priority);\n      try {\n        client.submitJob(APPLICATION_ID, request, userInfo);\n        LOG.debug(\"Submitted job: \" + request + \" for user \" + userInfo);\n      } catch (TException e) {\n        LOG.error(\"Scheduling request failed!\", e);\n      }\n      long end = System.currentTimeMillis();\n      LOG.debug(\"Scheduling request duration \" + (end - start));\n    }\n  }\n\n\n  public static class UserInfo {\n    public String user;\n    public int cumulativeWeight;\n    public int priority;\n    /** Used for debugging purposes, to ensure user weights are being used correctly. */\n    public int totalJobsLaunched;\n\n    public UserInfo(String user, int cumulativeWeight, int priority) {\n      this.user = user;\n      this.cumulativeWeight = cumulativeWeight;\n      this.priority = priority;\n      this.totalJobsLaunched = 0;\n    }\n  }\n\n  public static class SubExperiment {\n    public List<UserInfo> users;\n    public int durationSeconds;\n    /**\n     * Rate at which jobs are arriving across all users. At each job launch, a random\n     * user is selected based on the user's weight.\n     */\n    double arrivalRate;\n    /** Total weight across all users. Used to randomly select a user for each job. */\n    int totalWeight;\n\n    public SubExperiment(List<UserInfo> users, int durationMilliseconds, double arrivalRate) {\n      this.users = new ArrayList<UserInfo>(users);\n      this.durationSeconds = durationMilliseconds;\n      this.arrivalRate = arrivalRate;\n      totalWeight = 0;\n      for (UserInfo user : users) {\n        if (user.cumulativeWeight > totalWeight) {\n          totalWeight = user.cumulativeWeight;\n        }\n      }\n    }\n  }\n\n  public List<TTaskSpec> generateJob(int numTasks, int numPreferredNodes, List<String> backends,\n                                     int benchmarkId, int benchmarkIterations) {\n    // Pack task parameters\n    ByteBuffer message = ByteBuffer.allocate(8);\n    message.putInt(benchmarkId);\n    message.putInt(benchmarkIterations);\n\n    List<TTaskSpec> out = new ArrayList<TTaskSpec>();\n    for (int taskId = 0; taskId < numTasks; taskId++) {\n      TTaskSpec spec = new TTaskSpec();\n      spec.setTaskId(Integer.toString((new Random().nextInt())));\n      spec.setMessage(message.array());\n      if (numPreferredNodes > 0) {\n        Collections.shuffle(backends);\n        TPlacementPreference preference = new TPlacementPreference();\n        for (int i = 0; i < numPreferredNodes; i++) {\n          preference.addToNodes(backends.get(i));\n        }\n        spec.setPreference(preference);\n      }\n      out.add(spec);\n    }\n    return out;\n  }\n\n  public void run(String[] args) {\n    try {\n      OptionParser parser = new OptionParser();\n      parser.accepts(\"c\", \"configuration file\").withRequiredArg().ofType(String.class);\n      parser.accepts(\"help\", \"print help statement\");\n      OptionSet options = parser.parse(args);\n\n      if (options.has(\"help\")) {\n        parser.printHelpOn(System.out);\n        System.exit(-1);\n      }\n\n      // Logger configuration: log to the console\n      BasicConfigurator.configure();\n      LOG.setLevel(Level.DEBUG);\n\n      Configuration conf = new PropertiesConfiguration();\n\n      if (options.has(\"c\")) {\n        String configFile = (String) options.valueOf(\"c\");\n        conf = new PropertiesConfiguration(configFile);\n      }\n\n      double warmup_lambda = conf.getDouble(\"warmup_job_arrival_rate_s\",\n                                            DEFAULT_WARMUP_JOB_ARRIVAL_RATE_S);\n      int warmup_duration_s = conf.getInt(\"warmup_s\", DEFAULT_WARMUP_S);\n      int post_warmup_s = conf.getInt(\"post_warmup_s\", DEFAULT_POST_WARMUP_S);\n\n      // We use this to represent the the rate to fully load the cluster. This is a hack.\n      double lambda = conf.getDouble(\"job_arrival_rate_s\", DEFAULT_JOB_ARRIVAL_RATE_S);\n      int experiment_duration_s = conf.getInt(\"experiment_s\", DEFAULT_EXPERIMENT_S);\n      LOG.debug(\"Using arrival rate of  \" + lambda +\n          \" tasks per second and running experiment for \" + experiment_duration_s + \" seconds.\");\n      int tasksPerJob = conf.getInt(\"tasks_per_job\", DEFAULT_TASKS_PER_JOB);\n      int numPreferredNodes = conf.getInt(\"num_preferred_nodes\", DEFAULT_NUM_PREFERRED_NODES);\n      LOG.debug(\"Using \" + numPreferredNodes + \" preferred nodes for each task.\");\n      int benchmarkIterations = conf.getInt(\"benchmark.iterations\",\n          DEFAULT_BENCHMARK_ITERATIONS);\n      int benchmarkId = conf.getInt(\"benchmark.id\", DEFAULT_TASK_BENCHMARK);\n\n      List<String> backends = new ArrayList<String>();\n      if (numPreferredNodes > 0) {\n        /* Attempt to parse the list of slaves, which we'll need to (randomly) select preferred\n         * nodes. */\n        if (!conf.containsKey(BACKENDS)) {\n          LOG.fatal(\"Missing configuration backend list, which is needed to randomly select \" +\n                    \"preferred nodes (num_preferred_nodes set to \" + numPreferredNodes + \")\");\n        }\n        for (String node : conf.getStringArray(BACKENDS)) {\n          backends.add(node);\n        }\n        if (backends.size() < numPreferredNodes) {\n          LOG.fatal(\"Number of backends smaller than number of preferred nodes!\");\n        }\n      }\n\n      List<SubExperiment> experiments = new ArrayList<SubExperiment>();\n      double fullyUtilizedArrivalRate = lambda;\n\n      // For the first twenty seconds, the first user submits at a rate to fully utilize the cluster.\n      List<UserInfo> onlyUser0 = new ArrayList<UserInfo>();\n      onlyUser0.add(new UserInfo(\"user0\", 1, 0));\n      experiments.add(new SubExperiment(onlyUser0, 20, fullyUtilizedArrivalRate));\n\n      // For the next 10 seconds, user1 increases her rate to 25% of the cluster.\n      List<UserInfo> user1QuarterDemand = new ArrayList<UserInfo>();\n      user1QuarterDemand.add(new UserInfo(\"user0\", 4, 0));\n      user1QuarterDemand.add(new UserInfo(\"user1\", 5, 0));\n      experiments.add(new SubExperiment(user1QuarterDemand, 10, 1.25 * fullyUtilizedArrivalRate));\n\n      // For the next 10 seconds, user 1 increases her rate to 50% of the cluster (using exactly\n      // her share, but no more).\n      List<UserInfo> user1HalfDemand = new ArrayList<UserInfo>();\n      user1HalfDemand.add(new UserInfo(\"user0\", 2, 0));\n      user1HalfDemand.add(new UserInfo(\"user1\", 3, 0));\n      experiments.add(new SubExperiment(user1HalfDemand, 10, 1.5 * fullyUtilizedArrivalRate));\n\n      // Next user 1 goes back down to 25%.\n      experiments.add(new SubExperiment(user1QuarterDemand, 10, 1.25 * fullyUtilizedArrivalRate));\n\n      // Finally user 1 goes back to 0.\n      experiments.add(new SubExperiment(onlyUser0, 20, fullyUtilizedArrivalRate));\n\n      SparrowFrontendClient client = new SparrowFrontendClient();\n      int schedulerPort = conf.getInt(\"scheduler_port\",\n          SchedulerThrift.DEFAULT_SCHEDULER_THRIFT_PORT);\n      client.initialize(new InetSocketAddress(\"localhost\", schedulerPort), APPLICATION_ID, this);\n\n      if (warmup_duration_s > 0) {\n        List<SubExperiment> warmupExperiment = new ArrayList<SubExperiment>();\n        List<UserInfo> warmupUsers = new ArrayList<UserInfo>();\n        warmupUsers.add(new UserInfo(\"warmupUser\", 1, 0));\n        warmupExperiment.add(new SubExperiment(warmupUsers, warmup_duration_s, warmup_lambda));\n        LOG.debug(\"Warming up for \" + warmup_duration_s + \" seconds at arrival rate of \" +\n                  warmup_lambda + \" jobs per second\");\n        launchTasks(warmupExperiment, tasksPerJob, numPreferredNodes, benchmarkIterations,\n            benchmarkId, backends, client);\n        LOG.debug(\"Waiting for queues to drain after warmup (waiting \" + post_warmup_s +\n                 \" seconds)\");\n        Thread.sleep(post_warmup_s * 1000);\n      }\n      LOG.debug(\"Launching experiment for \" + experiment_duration_s + \" seconds\");\n      launchTasks(experiments, tasksPerJob, numPreferredNodes, benchmarkIterations, benchmarkId,\n          backends, client);\n    }\n    catch (Exception e) {\n      LOG.error(\"Fatal exception\", e);\n    }\n  }\n\n  private void launchTasks(List<SubExperiment> experiments, int tasksPerJob, int numPreferredNodes,\n      int benchmarkIterations, int benchmarkId, List<String> backends,\n      SparrowFrontendClient client)\n      throws InterruptedException {\n    /* This is a little tricky.\n     *\n     * We want to generate inter-arrival delays according to the arrival rate specified.\n     * The simplest option would be to generate an arrival delay and then sleep() for it\n     * before launching each task. However, this is problematic because sleep() might wait\n     * several ms longer than we ask it to. When task arrival rates get really fast,\n     * i.e. one task every 10 ms, sleeping an additional few ms will mean we launch\n     * tasks at a much lower rate than requested.\n     *\n     * Instead, we keep track of task launches in a way that does not depend on how long\n     * sleep() actually takes. We still might have tasks launch slightly after their\n     * scheduled launch time, but we will not systematically \"fall behind\" due to\n     * compounding time lost during sleep()'s;\n     */\n    // Used to determine which user to launch tasks for. The frontend rotates through users\n    // in a deterministic order.\n    int userIndex = 0;\n    for (SubExperiment experiment : experiments) {\n      // Store this as a double so we don't end up perpetually behind if the launch rate\n      // includes some fractional number of milliseconds.\n      double mostRecentLaunch = System.currentTimeMillis();\n      long end = System.currentTimeMillis() + experiment.durationSeconds * 1000;\n      LOG.debug(\"Launching subexperiment with \" + experiment.users.size() + \" users for \" +\n          experiment.durationSeconds + \" seconds\");\n      while (System.currentTimeMillis() < end) {\n        // Lambda is the arrival rate in S, so we need to multiply the result here by\n        // 1000 to convert to ms.\n        double delay = 1000 / experiment.arrivalRate;\n        double curLaunch = mostRecentLaunch + delay;\n        long toWait = Math.max(0,  (long) curLaunch - System.currentTimeMillis());\n        mostRecentLaunch = curLaunch;\n        if (toWait == 0) {\n          LOG.warn(\"Lanching job after start time in generated workload.\");\n        }\n        Thread.sleep(toWait);\n\n        UserInfo user = null;\n        for (UserInfo potentialUser : experiment.users) {\n          if ((userIndex % experiment.totalWeight) < potentialUser.cumulativeWeight) {\n            user = potentialUser;\n            break;\n          }\n        }\n        userIndex++;\n        ++user.totalJobsLaunched;\n        LOG.debug(\"Launching \" + tasksPerJob + \" task job for user \" + user.user + \" (\" +\n            user.totalJobsLaunched + \" total jobs launched for this user)\");\n\n        Runnable runnable =  new JobLaunchRunnable(\n            generateJob(tasksPerJob, numPreferredNodes, backends, benchmarkId,\n                        benchmarkIterations),\n            user, client);\n        new Thread(runnable).start();\n        int launched = tasksLaunched.addAndGet(1);\n        double launchRate = (double) launched * 1000.0 /\n            (System.currentTimeMillis() - startTime);\n        LOG.debug(\"Aggregate launch rate: \" + launchRate);\n      }\n    }\n  }\n\n  @Override\n  public void frontendMessage(TFullTaskId taskId, int status, ByteBuffer message)\n      throws TException {\n    // We don't use messages here, so just log it.\n    LOG.debug(\"Got unexpected message: \" + Serialization.getByteBufferContents(message));\n  }\n\n  public static void main(String[] args) {\n    new FairnessTestingFrontend().run(args);\n  }\n}\n"
  },
  {
    "path": "src/main/java/edu/berkeley/sparrow/examples/HeterogeneousFrontend.java",
    "content": "/*\n * Copyright 2013 The Regents of The University California\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *   http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage edu.berkeley.sparrow.examples;\n\nimport java.net.InetSocketAddress;\nimport java.nio.ByteBuffer;\nimport java.util.ArrayList;\nimport java.util.Collections;\nimport java.util.List;\nimport java.util.Random;\nimport java.util.concurrent.atomic.AtomicInteger;\n\nimport joptsimple.OptionParser;\nimport joptsimple.OptionSet;\n\nimport org.apache.commons.configuration.Configuration;\nimport org.apache.commons.configuration.PropertiesConfiguration;\nimport org.apache.log4j.BasicConfigurator;\nimport org.apache.log4j.Level;\nimport org.apache.log4j.Logger;\nimport org.apache.thrift.TException;\n\nimport edu.berkeley.sparrow.api.SparrowFrontendClient;\nimport edu.berkeley.sparrow.daemon.scheduler.SchedulerThrift;\nimport edu.berkeley.sparrow.daemon.util.Serialization;\nimport edu.berkeley.sparrow.thrift.FrontendService;\nimport edu.berkeley.sparrow.thrift.TFullTaskId;\nimport edu.berkeley.sparrow.thrift.TPlacementPreference;\nimport edu.berkeley.sparrow.thrift.TTaskSpec;\nimport edu.berkeley.sparrow.thrift.TUserGroupInfo;\n\n/**\n * Frontend for the prototype implementation.\n */\npublic class HeterogeneousFrontend implements FrontendService.Iface {\n  /** Jobs/second during warmup period. */\n  public static final double DEFAULT_WARMUP_JOB_ARRIVAL_RATE_S = 10;\n\n  /** Duration of warmup period. */\n  public static final int DEFAULT_WARMUP_S = 10;\n\n  /** Amount of time to wait for queues to drain once warmup period is over. */\n  public static final int DEFAULT_POST_WARMUP_S = 60;\n\n  /** Amount of time to launch tasks for (not including the warmup period). */\n  public static final int DEFAULT_EXPERIMENT_S = 300;\n\n  public static final double DEFAULT_JOB_ARRIVAL_RATE_S = 10; // Jobs/second\n  public static final int DEFAULT_TASKS_PER_JOB = 1;          // Tasks/job\n\n  // Type of benchmark to run, see ProtoBackend static constant for benchmark types\n  public static final int DEFAULT_TASK_BENCHMARK = ProtoBackend.BENCHMARK_TYPE_FP_CPU;\n  public static final int DEFAULT_BENCHMARK_ITERATIONS = 1000;  // # of benchmark iterations\n\n  /**\n   * The default number of preferred nodes for each task. 0 signals that tasks are\n   * unconstrained.\n   */\n  public static final int DEFAULT_NUM_PREFERRED_NODES = 0;\n\n  /**\n   * Configuration parameter name for the set of backends (used to set preferred nodes for\n   * tasks).\n   */\n  public static final String BACKENDS = \"backends\";\n\n  /**\n   * Configuration parameter name for the set of users. Users should be specified by three\n   * values: a user id, an integral priority, and an integral demand, where the demand of each user\n   * is specified relative to the demands of other users. These three values should be semi-colon\n   * separated.\n   */\n  public static final String USERS = \"users\";\n\n  /**\n   * Default application name.\n   */\n  public static final String APPLICATION_ID = \"testApp\";\n\n  private static final Logger LOG = Logger.getLogger(HeterogeneousFrontend.class);\n  public final static long startTime = System.currentTimeMillis();\n  public static AtomicInteger tasksLaunched = new AtomicInteger(0);\n\n  /** A runnable which Spawns a new thread to launch a scheduling request. */\n  private class JobLaunchRunnable implements Runnable {\n    private List<TTaskSpec> request;\n    private SparrowFrontendClient client;\n    UserInfo user;\n\n    public JobLaunchRunnable(List<TTaskSpec> request, UserInfo user, SparrowFrontendClient client) {\n      this.request = request;\n      this.client = client;\n      this.user = user;\n    }\n\n    @Override\n    public void run() {\n      long start = System.currentTimeMillis();\n      TUserGroupInfo userInfo = new TUserGroupInfo(user.user, \"*\", 0);\n      try {\n        client.submitJob(APPLICATION_ID, request, userInfo);\n        LOG.debug(\"Submitted job: \" + request + \" for user \" + userInfo);\n      } catch (TException e) {\n        LOG.error(\"Scheduling request failed!\", e);\n      }\n      long end = System.currentTimeMillis();\n      LOG.debug(\"Scheduling request duration \" + (end - start));\n    }\n  }\n\n  public static class UserInfo {\n    public String user;\n    public int cumulativeWeight;\n    public int taskDuration;\n    /** Used for debugging purposes, to ensure user weights are being used correctly. */\n    public int totalTasksLaunched;\n\n    /** Total weight assigned across all users. */\n    public static int totalWeight = 0;\n\n    public UserInfo(String user, int weight, int taskDuration) {\n      this.user = user;\n      this.cumulativeWeight = totalWeight + weight;\n      totalWeight = this.cumulativeWeight;\n      this.taskDuration = taskDuration;\n      this.totalTasksLaunched = 0;\n    }\n  }\n\n  public List<TTaskSpec> generateJob(int numTasks, int numPreferredNodes, List<String> backends,\n                                     int benchmarkId, int benchmarkIterations) {\n    // Pack task parameters\n    ByteBuffer message = ByteBuffer.allocate(8);\n    message.putInt(benchmarkId);\n    message.putInt(benchmarkIterations);\n\n    List<TTaskSpec> out = new ArrayList<TTaskSpec>();\n    for (int taskId = 0; taskId < numTasks; taskId++) {\n      TTaskSpec spec = new TTaskSpec();\n      spec.setTaskId(Integer.toString((new Random().nextInt())));\n      spec.setMessage(message.array());\n      if (numPreferredNodes > 0) {\n        Collections.shuffle(backends);\n        TPlacementPreference preference = new TPlacementPreference();\n        for (int i = 0; i < numPreferredNodes; i++) {\n          preference.addToNodes(backends.get(i));\n        }\n        spec.setPreference(preference);\n      }\n      out.add(spec);\n    }\n    return out;\n  }\n\n  /**\n   * Generates exponentially distributed interarrival delays.\n   */\n  public double generateInterarrivalDelay(Random r, double lambda) {\n    double u = r.nextDouble();\n    return -Math.log(u)/lambda;\n  }\n\n  public void run(String[] args) {\n    try {\n      OptionParser parser = new OptionParser();\n      parser.accepts(\"c\", \"configuration file\").withRequiredArg().ofType(String.class);\n      parser.accepts(\"help\", \"print help statement\");\n      OptionSet options = parser.parse(args);\n\n      if (options.has(\"help\")) {\n        parser.printHelpOn(System.out);\n        System.exit(-1);\n      }\n\n      // Logger configuration: log to the console\n      BasicConfigurator.configure();\n      LOG.setLevel(Level.DEBUG);\n\n      Configuration conf = new PropertiesConfiguration();\n\n      if (options.has(\"c\")) {\n        String configFile = (String) options.valueOf(\"c\");\n        conf = new PropertiesConfiguration(configFile);\n      }\n\n      double warmupLambda = conf.getDouble(\"warmup_job_arrival_rate_s\",\n                                            DEFAULT_WARMUP_JOB_ARRIVAL_RATE_S);\n      int warmupDurationS = conf.getInt(\"warmup_s\", DEFAULT_WARMUP_S);\n      int postWarmupS = conf.getInt(\"post_warmup_s\", DEFAULT_POST_WARMUP_S);\n\n      double lambda = conf.getDouble(\"job_arrival_rate_s\", DEFAULT_JOB_ARRIVAL_RATE_S);\n      int experimentDurationS = conf.getInt(\"experiment_s\", DEFAULT_EXPERIMENT_S);\n      LOG.debug(\"Using arrival rate of  \" + lambda +\n          \" tasks per second and running experiment for \" + experimentDurationS + \" seconds.\");\n      int tasksPerJob = conf.getInt(\"tasks_per_job\", DEFAULT_TASKS_PER_JOB);\n      int numPreferredNodes = conf.getInt(\"num_preferred_nodes\", DEFAULT_NUM_PREFERRED_NODES);\n      LOG.debug(\"Using \" + numPreferredNodes + \" preferred nodes for each task.\");\n      int benchmarkIterations = conf.getInt(\"benchmark.iterations\",\n          DEFAULT_BENCHMARK_ITERATIONS);\n      int benchmarkId = conf.getInt(\"benchmark.id\", DEFAULT_TASK_BENCHMARK);\n\n      List<String> backends = new ArrayList<String>();\n      if (numPreferredNodes > 0) {\n        /* Attempt to parse the list of slaves, which we'll need to (randomly) select preferred\n         * nodes. */\n        if (!conf.containsKey(BACKENDS)) {\n          LOG.fatal(\"Missing configuration backend list, which is needed to randomly select \" +\n                    \"preferred nodes (num_preferred_nodes set to \" + numPreferredNodes + \")\");\n        }\n        for (String node : conf.getStringArray(BACKENDS)) {\n          backends.add(node);\n        }\n        if (backends.size() < numPreferredNodes) {\n          LOG.fatal(\"Number of backends smaller than number of preferred nodes!\");\n        }\n      }\n\n      List<UserInfo> users = new ArrayList<UserInfo>();\n      if (conf.containsKey(USERS)) {\n        for (String userSpecification : conf.getStringArray(USERS)) {\n          LOG.debug(\"Reading user specification: \" + userSpecification);\n          String[] parts = userSpecification.split(\":\");\n          if (parts.length != 3) {\n            LOG.error(\"Unexpected user specification string: \" + userSpecification +\n                \"; ignoring user\");\n            continue;\n          }\n          users.add(new UserInfo(parts[0], Integer.parseInt(parts[1]), Integer.parseInt(parts[2])));\n        }\n      }\n      if (users.size() == 0) {\n        // Add a dummy user.\n        users.add(new UserInfo(\"defaultUser\", 1, 0));\n      }\n\n      SparrowFrontendClient client = new SparrowFrontendClient();\n      int schedulerPort = conf.getInt(\"scheduler_port\",\n          SchedulerThrift.DEFAULT_SCHEDULER_THRIFT_PORT);\n      client.initialize(new InetSocketAddress(\"localhost\", schedulerPort), APPLICATION_ID, this);\n\n      if (warmupDurationS > 0) {\n        LOG.debug(\"Warming up for \" + warmupDurationS + \" seconds at arrival rate of \" +\n                  warmupLambda + \" jobs per second\");\n        launchTasks(users, warmupLambda, warmupDurationS, tasksPerJob, numPreferredNodes,\n            benchmarkIterations, benchmarkId, backends, client);\n        LOG.debug(\"Waiting for queues to drain after warmup (waiting \" + postWarmupS +\n                 \" seconds)\");\n        Thread.sleep(postWarmupS * 1000);\n      }\n      LOG.debug(\"Launching experiment for \" + experimentDurationS + \" seconds\");\n      launchTasks(users, lambda, experimentDurationS, tasksPerJob, numPreferredNodes,\n          benchmarkIterations, benchmarkId, backends, client);\n    }\n    catch (Exception e) {\n      LOG.error(\"Fatal exception\", e);\n    }\n  }\n\n  private void launchTasks(List<UserInfo> users, double lambda, int launch_duration_s,\n      int tasksPerJob, int numPreferredNodes, int benchmarkIterations, int benchmarkId,\n      List<String> backends, SparrowFrontendClient client)\n      throws InterruptedException {\n    /* This is a little tricky.\n     *\n     * We want to generate inter-arrival delays according to the arrival rate specified.\n     * The simplest option would be to generate an arrival delay and then sleep() for it\n     * before launching each task. However, this is problematic because sleep() might wait\n     * several ms longer than we ask it to. When task arrival rates get really fast,\n     * i.e. one task every 10 ms, sleeping an additional few ms will mean we launch\n     * tasks at a much lower rate than requested.\n     *\n     * Instead, we keep track of task launches in a way that does not depend on how long\n     * sleep() actually takes. We still might have tasks launch slightly after their\n     * scheduled launch time, but we will not systematically \"fall behind\" due to\n     * compounding time lost during sleep()'s;\n     */\n    //Random r = new Random();\n    double mostRecentLaunch = System.currentTimeMillis();\n    long end = System.currentTimeMillis() + launch_duration_s * 1000;\n    Random r = new Random();\n    // Used to determine which user's task to run next. Start from a random place so\n    // all of the frontends don't end up synchronized.\n    int userIndex = r.nextInt(UserInfo.totalWeight);\n    LOG.debug(\"Starting with user index \" + userIndex);\n    while (System.currentTimeMillis() < end) {\n      // Lambda is the arrival rate in S, so we need to multiply the result here by\n      // 1000 to convert to ms.\n      double delay = 1000 / lambda;\n      double curLaunch = mostRecentLaunch + delay;\n      long toWait = Math.max(0,  (long) curLaunch - System.currentTimeMillis());\n      mostRecentLaunch = curLaunch;\n      if (toWait == 0) {\n        LOG.warn(\"Lanching task after start time in generated workload.\");\n      }\n      Thread.sleep(toWait);\n\n      // Deterministically select which user's task to run, according to weight.\n      UserInfo user = null;\n      for (UserInfo potentialUser : users) {\n        if ((userIndex % UserInfo.totalWeight) < potentialUser.cumulativeWeight) {\n          user = potentialUser;\n          break;\n        }\n      }\n      assert(user != null);\n      ++userIndex;\n      ++user.totalTasksLaunched;\n      LOG.debug(\"Launching task for user \" + user.user + \" with duration \" + user.taskDuration +\n          \" (\" + user.totalTasksLaunched + \" total tasks launched for this user)\");\n\n      Runnable runnable =  new JobLaunchRunnable(\n          generateJob(tasksPerJob, numPreferredNodes, backends, benchmarkId,\n                      user.taskDuration),\n          user, client);\n      new Thread(runnable).start();\n      int launched = tasksLaunched.addAndGet(1);\n      double launchRate = (double) launched * 1000.0 /\n          (System.currentTimeMillis() - startTime);\n      LOG.debug(\"Aggregate launch rate: \" + launchRate);\n    }\n  }\n\n  @Override\n  public void frontendMessage(TFullTaskId taskId, int status, ByteBuffer message)\n      throws TException {\n    // We don't use messages here, so just log it.\n    LOG.debug(\"Got unexpected message: \" + Serialization.getByteBufferContents(message));\n  }\n\n  public static void main(String[] args) {\n    new HeterogeneousFrontend().run(args);\n  }\n}\n"
  },
  {
    "path": "src/main/java/edu/berkeley/sparrow/examples/PingClient.java",
    "content": "/*\n * Copyright 2013 The Regents of The University California\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *   http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage edu.berkeley.sparrow.examples;\n\nimport java.io.IOException;\nimport java.net.InetSocketAddress;\nimport java.net.Socket;\nimport java.net.UnknownHostException;\n\npublic class PingClient {\n  public static void main(String[] args) throws UnknownHostException, IOException {\n    String server = args[0];\n    Socket socket = new Socket();\n    socket.setTcpNoDelay(true);\n    socket.connect(new InetSocketAddress(server, 12345));\n    byte[] buff = new byte[1000];\n    while (true) {\n      long t0 = System.nanoTime();\n      socket.getOutputStream().write(\"PING\".getBytes());\n      socket.getInputStream().read(buff);\n      double diffMs = (System.nanoTime() - t0) / (1000.0 * 1000.0);\n      System.out.println(\"GOT: \" + new String(buff));\n      System.out.println(diffMs + \" milliseconds\");\n    }\n  }\n}\n"
  },
  {
    "path": "src/main/java/edu/berkeley/sparrow/examples/PongServer.java",
    "content": "/*\n * Copyright 2013 The Regents of The University California\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *   http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage edu.berkeley.sparrow.examples;\n\nimport java.io.IOException;\nimport java.net.ServerSocket;\nimport java.net.Socket;\n\npublic class PongServer {\n  public static void main(String[] args) throws IOException {\n    ServerSocket serverSocket = new ServerSocket(12345);\n    while (true) {\n      Socket sock = serverSocket.accept();\n      sock.setTcpNoDelay(true);\n      new Thread(new PongServerRunnable(sock)).start();\n    }\n  }\n\n  private static class PongServerRunnable implements Runnable {\n    private Socket sock;\n\n    PongServerRunnable(Socket sock) { this.sock = sock; }\n\n    @Override\n    public void run() {\n      byte[] buff = new byte[1000];\n      while(true) {\n        try {\n          sock.getInputStream().read(buff);\n        } catch (IOException e) {\n          e.printStackTrace();\n        }\n        System.out.println(\"GOT: \" + new String(buff));\n        try {\n          sock.getOutputStream().write(\"PONG\".getBytes());\n        } catch (IOException e) {\n          // TODO Auto-generated catch block\n          e.printStackTrace();\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "src/main/java/edu/berkeley/sparrow/examples/ProtoBackend.java",
    "content": "/*\n * Copyright 2013 The Regents of The University California\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage edu.berkeley.sparrow.examples;\n\nimport java.io.IOException;\nimport java.nio.ByteBuffer;\nimport java.util.Random;\nimport java.util.concurrent.BlockingQueue;\nimport java.util.concurrent.ExecutorService;\nimport java.util.concurrent.Executors;\nimport java.util.concurrent.LinkedBlockingQueue;\nimport java.util.concurrent.atomic.AtomicInteger;\n\nimport joptsimple.OptionParser;\nimport joptsimple.OptionSet;\n\nimport org.apache.commons.configuration.Configuration;\nimport org.apache.commons.configuration.ConfigurationException;\nimport org.apache.commons.configuration.PropertiesConfiguration;\nimport org.apache.log4j.BasicConfigurator;\nimport org.apache.log4j.Level;\nimport org.apache.log4j.Logger;\nimport org.apache.thrift.TException;\n\nimport com.google.common.collect.Lists;\n\nimport edu.berkeley.sparrow.daemon.nodemonitor.NodeMonitorThrift;\nimport edu.berkeley.sparrow.daemon.util.TClients;\nimport edu.berkeley.sparrow.daemon.util.TServers;\nimport edu.berkeley.sparrow.thrift.BackendService;\nimport edu.berkeley.sparrow.thrift.NodeMonitorService.Client;\nimport edu.berkeley.sparrow.thrift.TFullTaskId;\nimport edu.berkeley.sparrow.thrift.TUserGroupInfo;\n\n/**\n * A prototype Sparrow backend.\n *\n * This backend is capable of performing a number of benchmark tasks, each representing\n * distinct resource consumption profiles. It initiates a thrift server with a bounded\n * size thread pool (of at most {@code WORKER_THREADS} threads). To makes sure that\n * we never queue tasks, we additionally spawn a new thread each time a task is launched.\n * In the future, we will have launchTask() directly execute the task and rely on queuing\n * in the underlying thread pool to queue if task launches exceed capacity.\n */\npublic class ProtoBackend implements BackendService.Iface {\n  /** Benchmark which, on each iteration, runs 1 million random floating point\n   *  multiplications.*/\n  public static int BENCHMARK_TYPE_FP_CPU = 1;\n  /** Benchmark which allocates a heap buffer of 200 million bytes, then on each iteration\n   *  accesses 1 million contiguous bytes of the buffer, starting at a random offset.*/\n  public static int BENCHMARK_TYPE_RANDOM_MEMACCESS = 2;\n  // NOTE: we do not use an enum for the above because it is not possible to serialize\n  // an enum with our current simple serialization technique.\n\n  /** Tracks the total number of tasks launched since execution began. Updated on\n   * each task launch. This is helpful for diagnosing unwanted queuing in various parts\n   * of the system (i.e. if we notice the backend is launching fewer tasks than we expect\n   * based on the frontend task launch rate). */\n  public static AtomicInteger numTasks = new AtomicInteger(0);\n  public static long startTime = -1;\n\n  private static final int DEFAULT_LISTEN_PORT = 20101;\n\n  /**\n   * This indicates how many threads can concurrently be answering function calls\n   * from the NM. Each task is launched in a new thread from one of these threads. If tasks\n   * launches arrive fast enough that all worker threads are concurrently executing\n   * a task, this will queue. We currently launch new threads for each task to prevent\n   * this from happening.\n   */\n  private static final int THRIFT_WORKER_THREADS = 16;\n  private static final int TASK_WORKER_THREADS = 16;\n  private static final String APP_ID = \"testApp\";\n\n  /** We assume we are speaking to local Node Manager. */\n  private static final String NM_HOST = \"localhost\";\n  private static int NM_PORT;\n\n  private static Client client;\n\n  private static final Logger LOG = Logger.getLogger(ProtoBackend.class);\n  private static final ExecutorService executor =\n      Executors.newFixedThreadPool(TASK_WORKER_THREADS);\n\n  /**\n   * Keeps track of finished tasks.\n   *\n   *  A single thread pulls items off of this queue and uses\n   * the client to notify the node monitor that tasks have finished.\n   */\n  private final BlockingQueue<TFullTaskId> finishedTasks = new LinkedBlockingQueue<TFullTaskId>();\n\n  /**\n   * Thread that sends taskFinished() RPCs to the node monitor.\n   *\n   * We do this in a single thread so that we just need a single client to the node monitor\n   * and don't need to create a new client for each task.\n   */\n  private class TasksFinishedRpcRunnable implements Runnable {\n\t  @Override\n\t  public void run() {\n\t\t  while (true) {\n\t\t  \ttry {\n\t\t  \t\tTFullTaskId task = finishedTasks.take();\n\t\t\t\t\tclient.tasksFinished(Lists.newArrayList(task));\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\tLOG.error(\"Error taking a task from the queue: \" + e.getMessage());\n\t\t\t\t} catch (TException e) {\n\t\t\t\t\tLOG.error(\"Error with tasksFinished() RPC:\" + e.getMessage());\n\t\t\t\t}\n\t\t  }\n\t  }\n  }\n\n  /**\n   * Thread spawned for each task. It runs for a given amount of time (and adds\n   * its resources to the total resources for that time) then stops. It updates\n   * the NodeMonitor when it launches and again when it finishes.\n   */\n  private class TaskRunnable implements Runnable {\n    private int benchmarkId;\n    private int benchmarkIterations;\n    private TFullTaskId taskId;\n\n    public TaskRunnable(String requestId, TFullTaskId taskId, ByteBuffer message) {\n      this.benchmarkId = message.getInt();\n      this.benchmarkIterations = message.getInt();\n      this.taskId = taskId;\n    }\n\n    @Override\n    public void run() {\n      if (startTime == -1) {\n        startTime = System.currentTimeMillis();\n      }\n\n      long taskStart = System.currentTimeMillis();\n\n      int tasks = numTasks.addAndGet(1);\n      double taskRate = ((double) tasks) * 1000 /\n          (System.currentTimeMillis() - startTime);\n      LOG.debug(\"Aggregate task rate: \" + taskRate + \" (\" + tasks + \" launched)\");\n\n      Random r = new Random();\n\n      long benchmarkStart = System.currentTimeMillis();\n      runBenchmark(benchmarkId, benchmarkIterations, r);\n      LOG.debug(\"Benchmark runtime: \" + (System.currentTimeMillis() - benchmarkStart));\n\n      finishedTasks.add(taskId);\n      LOG.debug(\"Task running for \" + (System.currentTimeMillis() - taskStart) + \" ms\");\n    }\n  }\n\n  /**\n   * Run the benchmark identified by {@code benchmarkId} for {@code iterations}\n   * iterations using random generator {@code r}. Return true if benchmark is recognized\n   * and false otherwise.\n   */\n  public static boolean runBenchmark(int benchmarkId, int iterations, Random r) {\n    if (benchmarkId == BENCHMARK_TYPE_RANDOM_MEMACCESS) {\n      LOG.debug(\"Running random access benchmark for \" + iterations + \" iterations.\");\n      runRandomMemAcessBenchmark(iterations, r);\n    } else if (benchmarkId == BENCHMARK_TYPE_FP_CPU) {\n      LOG.debug(\"Running CPU benchmark for \" + iterations + \" iterations.\");\n     runFloatingPointBenchmark(iterations, r);\n    } else {\n      LOG.error(\"Received unrecognized benchmark type\");\n      return false;\n    }\n    return true;\n  }\n\n  /**\n   * Benchmark that runs random floating point multiplications for the specified amount of\n   * \"iterations\", where each iteration is one millisecond.\n   */\n  public static void runFloatingPointBenchmark(int iterations, Random r) {\n    int runtimeMillis = iterations;\n    long startTime = System.nanoTime();\n    int opsPerIteration = 1000;\n    /* We keep a running result here and print it out so that the JVM doesn't\n     * optimize all this computation away. */\n    float result = r.nextFloat();\n    while ((System.nanoTime() - startTime) / (1000.0 * 1000.0) < runtimeMillis) {\n      for (int j = 0; j < opsPerIteration; j++) {\n        // On each iteration, perform a floating point multiplication\n        float x = r.nextFloat();\n        float y = r.nextFloat();\n        result += (x * y);\n      }\n    }\n    LOG.debug(\"Benchmark result \" + result);\n  }\n\n  /** Benchmark which allocates a heap buffer of 200 million bytes, then on each iteration\n   *  accesses 1 million contiguous bytes of the buffer, starting at a random offset.*/\n  public static void runRandomMemAcessBenchmark(int iterations, Random r) {\n    // 2 hundred million byte buffer\n    int buffSize = 1000 * 1000 * 200;\n    byte[] buff = new byte[buffSize];\n    // scan 1 million bytes at a time\n    int runLength = 1000 * 1000;\n    // We keep a running result here and print it out so that the JVM doesn't\n    // optimize all this computation away.\n    byte result = 1;\n    for (int i = 0; i < iterations; i++) {\n      // On each iteration, start at a random index, and scan runLength contiguous\n      // bytes, potentially wrapping if we hit the end of the buffer.\n      int start = r.nextInt(buff.length);\n      for (int j = 0; j < runLength; j++) {\n        result = (byte) (result ^ buff[(start + j) % (buff.length - 1)]);\n      }\n    }\n    LOG.debug(\"Benchmark result \" + result);\n  }\n\n  /**\n   * Initializes the backend by registering with the node monitor.\n   *\n   * Also starts a thread that handles finished tasks (by sending an RPC to the node monitor).\n   */\n  public void initialize(int listenPort) {\n    // Register server.\n    try {\n\t\t\tclient = TClients.createBlockingNmClient(NM_HOST, NM_PORT);\n\t\t} catch (IOException e) {\n\t\t\tLOG.debug(\"Error creating Thrift client: \" + e.getMessage());\n\t\t}\n\n    try {\n      client.registerBackend(APP_ID, \"localhost:\" + listenPort);\n      LOG.debug(\"Client successfully registered\");\n    } catch (TException e) {\n      LOG.debug(\"Error while registering backend: \" + e.getMessage());\n    }\n\n    new Thread(new TasksFinishedRpcRunnable()).start();\n  }\n\n  @Override\n  public void launchTask(ByteBuffer message, TFullTaskId taskId,\n      TUserGroupInfo user) throws TException {\n    LOG.info(\"Submitting task \" + taskId.getTaskId() + \" at \" + System.currentTimeMillis());\n\n    // Note we ignore user here\n    executor.submit(new TaskRunnable(\n        taskId.requestId, taskId, message));\n  }\n\n  public static void main(String[] args) throws IOException, TException {\n    OptionParser parser = new OptionParser();\n    parser.accepts(\"c\", \"configuration file\").\n      withRequiredArg().ofType(String.class);\n    parser.accepts(\"help\", \"print help statement\");\n    OptionSet options = parser.parse(args);\n\n    if (options.has(\"help\")) {\n      parser.printHelpOn(System.out);\n      System.exit(-1);\n    }\n\n    // Logger configuration: log to the console\n    BasicConfigurator.configure();\n    LOG.setLevel(Level.DEBUG);\n    LOG.debug(\"debug logging on\");\n\n    Configuration conf = new PropertiesConfiguration();\n\n    if (options.has(\"c\")) {\n      String configFile = (String) options.valueOf(\"c\");\n      try {\n        conf = new PropertiesConfiguration(configFile);\n      } catch (ConfigurationException e) {}\n    }\n    // Start backend server\n    ProtoBackend protoBackend = new ProtoBackend();\n    BackendService.Processor<BackendService.Iface> processor =\n        new BackendService.Processor<BackendService.Iface>(protoBackend);\n\n    int listenPort = conf.getInt(\"listen_port\", DEFAULT_LISTEN_PORT);\n    NM_PORT = conf.getInt(\"node_monitor_port\", NodeMonitorThrift.DEFAULT_NM_THRIFT_PORT);\n    TServers.launchThreadedThriftServer(listenPort, THRIFT_WORKER_THREADS, processor);\n    protoBackend.initialize(listenPort);\n  }\n}\n"
  },
  {
    "path": "src/main/java/edu/berkeley/sparrow/examples/ProtoFrontend.java",
    "content": "/*\n * Copyright 2013 The Regents of The University California\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *   http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage edu.berkeley.sparrow.examples;\n\nimport java.net.InetSocketAddress;\nimport java.nio.ByteBuffer;\nimport java.util.ArrayList;\nimport java.util.Collections;\nimport java.util.List;\nimport java.util.Random;\nimport java.util.concurrent.atomic.AtomicInteger;\n\nimport joptsimple.OptionParser;\nimport joptsimple.OptionSet;\n\nimport org.apache.commons.configuration.Configuration;\nimport org.apache.commons.configuration.PropertiesConfiguration;\nimport org.apache.log4j.BasicConfigurator;\nimport org.apache.log4j.Level;\nimport org.apache.log4j.Logger;\nimport org.apache.thrift.TException;\n\nimport edu.berkeley.sparrow.api.SparrowFrontendClient;\nimport edu.berkeley.sparrow.daemon.scheduler.SchedulerThrift;\nimport edu.berkeley.sparrow.daemon.util.Serialization;\nimport edu.berkeley.sparrow.thrift.FrontendService;\nimport edu.berkeley.sparrow.thrift.TFullTaskId;\nimport edu.berkeley.sparrow.thrift.TPlacementPreference;\nimport edu.berkeley.sparrow.thrift.TTaskSpec;\nimport edu.berkeley.sparrow.thrift.TUserGroupInfo;\n\n/**\n * Frontend for the prototype implementation.\n */\npublic class ProtoFrontend implements FrontendService.Iface {\n  /** Jobs/second during warmup period. */\n  public static final double DEFAULT_WARMUP_JOB_ARRIVAL_RATE_S = 10;\n\n  /** Duration of warmup period. */\n  public static final int DEFAULT_WARMUP_S = 10;\n\n  /** Amount of time to wait for queues to drain once warmup period is over. */\n  public static final int DEFAULT_POST_WARMUP_S = 60;\n\n  /** Amount of time to launch tasks for (not including the warmup period). */\n  public static final int DEFAULT_EXPERIMENT_S = 300;\n\n  public static final double DEFAULT_JOB_ARRIVAL_RATE_S = 10; // Jobs/second\n  public static final int DEFAULT_TASKS_PER_JOB = 1;          // Tasks/job\n\n  // Type of benchmark to run, see ProtoBackend static constant for benchmark types\n  public static final int DEFAULT_TASK_BENCHMARK = ProtoBackend.BENCHMARK_TYPE_FP_CPU;\n  public static final int DEFAULT_BENCHMARK_ITERATIONS = 1000;  // # of benchmark iterations\n\n  /**\n   * The default number of preferred nodes for each task (this configuration simulates jobs\n   * that have placement constraints). 0 signals that tasks are unconstrained.\n   */\n  public static final int DEFAULT_NUM_PREFERRED_NODES = 0;\n\n  /**\n   * Configuration parameter name for the set of backends (used to set preferred nodes for\n   * tasks).\n   */\n  public static final String BACKENDS = \"backends\";\n\n  /**\n   * Configuration parameter name for the set of users. Users should be specified by three\n   * values: a user id, an integral priority, and an integral demand, where the demand of each user\n   * is specified relative to the demands of other users. These three values should be semi-colon\n   * separated.\n   */\n  public static final String USERS = \"users\";\n\n  /**\n   * Default application name.\n   */\n  public static final String APPLICATION_ID = \"testApp\";\n\n  private static final Logger LOG = Logger.getLogger(ProtoFrontend.class);\n  public final static long startTime = System.currentTimeMillis();\n  public static AtomicInteger tasksLaunched = new AtomicInteger(0);\n\n  /** A runnable which Spawns a new thread to launch a scheduling request. */\n  private class JobLaunchRunnable implements Runnable {\n    private List<TTaskSpec> request;\n    private SparrowFrontendClient client;\n    UserInfo user;\n\n    public JobLaunchRunnable(List<TTaskSpec> request, UserInfo user, SparrowFrontendClient client) {\n      this.request = request;\n      this.client = client;\n      this.user = user;\n    }\n\n    @Override\n    public void run() {\n      long start = System.currentTimeMillis();\n      TUserGroupInfo userInfo = new TUserGroupInfo(user.user, \"*\", user.priority);\n      try {\n        client.submitJob(APPLICATION_ID, request, userInfo);\n        LOG.debug(\"Submitted job: \" + request + \" for user \" + userInfo);\n      } catch (TException e) {\n        LOG.error(\"Scheduling request failed!\", e);\n      }\n      long end = System.currentTimeMillis();\n      LOG.debug(\"Scheduling request duration \" + (end - start));\n    }\n  }\n\n  public static class UserInfo {\n    public String user;\n    public int cumulativeWeight;\n    public int priority;\n    /** Used for debugging purposes, to ensure user weights are being used correctly. */\n    public int totalTasksLaunched;\n\n    /** Total weight assigned across all users. */\n    public static int totalWeight = 0;\n\n    public UserInfo(String user, int weight, int priority) {\n      this.user = user;\n      this.cumulativeWeight = totalWeight + weight;\n      totalWeight = this.cumulativeWeight;\n      this.priority = priority;\n      this.totalTasksLaunched = 0;\n    }\n  }\n\n  public List<TTaskSpec> generateJob(int numTasks, int numPreferredNodes, List<String> backends,\n                                     int benchmarkId, int benchmarkIterations) {\n    // Pack task parameters\n    ByteBuffer message = ByteBuffer.allocate(8);\n    message.putInt(benchmarkId);\n    message.putInt(benchmarkIterations);\n\n    List<TTaskSpec> out = new ArrayList<TTaskSpec>();\n    for (int taskId = 0; taskId < numTasks; taskId++) {\n      TTaskSpec spec = new TTaskSpec();\n      spec.setTaskId(Integer.toString((new Random().nextInt())));\n      spec.setMessage(message.array());\n      if (numPreferredNodes > 0) {\n        Collections.shuffle(backends);\n        TPlacementPreference preference = new TPlacementPreference();\n        for (int i = 0; i < numPreferredNodes; i++) {\n          preference.addToNodes(backends.get(i));\n        }\n        spec.setPreference(preference);\n      }\n      out.add(spec);\n    }\n    return out;\n  }\n\n  /**\n   * Generates exponentially distributed interarrival delays.\n   */\n  public double generateInterarrivalDelay(Random r, double lambda) {\n    double u = r.nextDouble();\n    return -Math.log(u)/lambda;\n  }\n\n  public void run(String[] args) {\n    try {\n      OptionParser parser = new OptionParser();\n      parser.accepts(\"c\", \"configuration file\").withRequiredArg().ofType(String.class);\n      parser.accepts(\"help\", \"print help statement\");\n      OptionSet options = parser.parse(args);\n\n      if (options.has(\"help\")) {\n        parser.printHelpOn(System.out);\n        System.exit(-1);\n      }\n\n      // Logger configuration: log to the console\n      BasicConfigurator.configure();\n      LOG.setLevel(Level.DEBUG);\n\n      Configuration conf = new PropertiesConfiguration();\n\n      if (options.has(\"c\")) {\n        String configFile = (String) options.valueOf(\"c\");\n        conf = new PropertiesConfiguration(configFile);\n      }\n\n      double warmupLambda = conf.getDouble(\"warmup_job_arrival_rate_s\",\n                                            DEFAULT_WARMUP_JOB_ARRIVAL_RATE_S);\n      int warmupDurationS = conf.getInt(\"warmup_s\", DEFAULT_WARMUP_S);\n      int postWarmupS = conf.getInt(\"post_warmup_s\", DEFAULT_POST_WARMUP_S);\n\n      double lambda = conf.getDouble(\"job_arrival_rate_s\", DEFAULT_JOB_ARRIVAL_RATE_S);\n      int experimentDurationS = conf.getInt(\"experiment_s\", DEFAULT_EXPERIMENT_S);\n      LOG.debug(\"Using arrival rate of  \" + lambda +\n          \" tasks per second and running experiment for \" + experimentDurationS + \" seconds.\");\n      int tasksPerJob = conf.getInt(\"tasks_per_job\", DEFAULT_TASKS_PER_JOB);\n      int numPreferredNodes = conf.getInt(\"num_preferred_nodes\", DEFAULT_NUM_PREFERRED_NODES);\n      LOG.debug(\"Using \" + numPreferredNodes + \" preferred nodes for each task.\");\n      int benchmarkIterations = conf.getInt(\"benchmark.iterations\",\n          DEFAULT_BENCHMARK_ITERATIONS);\n      int benchmarkId = conf.getInt(\"benchmark.id\", DEFAULT_TASK_BENCHMARK);\n\n      List<String> backends = new ArrayList<String>();\n      if (numPreferredNodes > 0) {\n        /* Attempt to parse the list of slaves, which we'll need to (randomly) select preferred\n         * nodes. */\n        if (!conf.containsKey(BACKENDS)) {\n          LOG.fatal(\"Missing configuration backend list, which is needed to randomly select \" +\n                    \"preferred nodes (num_preferred_nodes set to \" + numPreferredNodes + \")\");\n        }\n        for (String node : conf.getStringArray(BACKENDS)) {\n          backends.add(node);\n        }\n        if (backends.size() < numPreferredNodes) {\n          LOG.fatal(\"Number of backends smaller than number of preferred nodes!\");\n        }\n      }\n\n      List<UserInfo> users = new ArrayList<UserInfo>();\n      if (conf.containsKey(USERS)) {\n        for (String userSpecification : conf.getStringArray(USERS)) {\n          LOG.debug(\"Reading user specification: \" + userSpecification);\n          String[] parts = userSpecification.split(\":\");\n          if (parts.length != 3) {\n            LOG.error(\"Unexpected user specification string: \" + userSpecification +\n                \"; ignoring user\");\n            continue;\n          }\n          users.add(new UserInfo(parts[0], Integer.parseInt(parts[1]), Integer.parseInt(parts[2])));\n        }\n      }\n      if (users.size() == 0) {\n        // Add a dummy user.\n        users.add(new UserInfo(\"defaultUser\", 1, 0));\n      }\n\n      SparrowFrontendClient client = new SparrowFrontendClient();\n      int schedulerPort = conf.getInt(\"scheduler_port\",\n          SchedulerThrift.DEFAULT_SCHEDULER_THRIFT_PORT);\n      client.initialize(new InetSocketAddress(\"localhost\", schedulerPort), APPLICATION_ID, this);\n\n      if (warmupDurationS > 0) {\n        LOG.debug(\"Warming up for \" + warmupDurationS + \" seconds at arrival rate of \" +\n                  warmupLambda + \" jobs per second\");\n        launchTasks(users, warmupLambda, warmupDurationS, tasksPerJob, numPreferredNodes,\n            benchmarkIterations, benchmarkId, backends, client);\n        LOG.debug(\"Waiting for queues to drain after warmup (waiting \" + postWarmupS +\n                 \" seconds)\");\n        Thread.sleep(postWarmupS * 1000);\n      }\n      LOG.debug(\"Launching experiment for \" + experimentDurationS + \" seconds\");\n      launchTasks(users, lambda, experimentDurationS, tasksPerJob, numPreferredNodes,\n          benchmarkIterations, benchmarkId, backends, client);\n    }\n    catch (Exception e) {\n      LOG.error(\"Fatal exception\", e);\n    }\n  }\n\n  private void launchTasks(List<UserInfo> users, double lambda, int launch_duration_s,\n      int tasksPerJob, int numPreferredNodes, int benchmarkIterations, int benchmarkId,\n      List<String> backends, SparrowFrontendClient client)\n      throws InterruptedException {\n    /* This is a little tricky.\n     *\n     * We want to generate inter-arrival delays according to the arrival rate specified.\n     * The simplest option would be to generate an arrival delay and then sleep() for it\n     * before launching each task. However, this is problematic because sleep() might wait\n     * several ms longer than we ask it to. When task arrival rates get really fast,\n     * i.e. one task every 10 ms, sleeping an additional few ms will mean we launch\n     * tasks at a much lower rate than requested.\n     *\n     * Instead, we keep track of task launches in a way that does not depend on how long\n     * sleep() actually takes. We still might have tasks launch slightly after their\n     * scheduled launch time, but we will not systematically \"fall behind\" due to\n     * compounding time lost during sleep()'s;\n     */\n    //Random r = new Random();\n    double mostRecentLaunch = System.currentTimeMillis();\n    long end = System.currentTimeMillis() + launch_duration_s * 1000;\n    int userIndex = 0; // Used to determine which user's task to run next.\n    while (System.currentTimeMillis() < end) {\n      // Lambda is the arrival rate in S, so we need to multiply the result here by\n      // 1000 to convert to ms.\n      double delay = 1000 / lambda;\n      double curLaunch = mostRecentLaunch + delay;\n      long toWait = Math.max(0,  (long) curLaunch - System.currentTimeMillis());\n      mostRecentLaunch = curLaunch;\n      if (toWait == 0) {\n        LOG.warn(\"Lanching task after start time in generated workload.\");\n      }\n      Thread.sleep(toWait);\n\n      // Deterministically select which user's task to run, according to weight.\n      UserInfo user = null;\n      for (UserInfo potentialUser : users) {\n        if ((userIndex % UserInfo.totalWeight) < potentialUser.cumulativeWeight) {\n          user = potentialUser;\n          break;\n        }\n      }\n      assert(user != null);\n      ++userIndex;\n      ++user.totalTasksLaunched;\n      LOG.debug(\"Launching task for user \" + user.user + \" (\" + user.totalTasksLaunched +\n          \" total tasks launched for this user)\");\n\n      Runnable runnable =  new JobLaunchRunnable(\n          generateJob(tasksPerJob, numPreferredNodes, backends, benchmarkId,\n                      benchmarkIterations),\n          user, client);\n      new Thread(runnable).start();\n      int launched = tasksLaunched.addAndGet(1);\n      double launchRate = (double) launched * 1000.0 /\n          (System.currentTimeMillis() - startTime);\n      LOG.debug(\"Aggregate launch rate: \" + launchRate);\n    }\n  }\n\n  @Override\n  public void frontendMessage(TFullTaskId taskId, int status, ByteBuffer message)\n      throws TException {\n    // We don't use messages here, so just log it.\n    LOG.debug(\"Got unexpected message: \" + Serialization.getByteBufferContents(message));\n  }\n\n  public static void main(String[] args) {\n    new ProtoFrontend().run(args);\n  }\n}\n"
  },
  {
    "path": "src/main/java/edu/berkeley/sparrow/examples/ProtoFrontendAsync.java",
    "content": "/*\n * Copyright 2013 The Regents of The University California\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *   http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage edu.berkeley.sparrow.examples;\n\nimport java.nio.ByteBuffer;\nimport java.util.ArrayList;\nimport java.util.List;\nimport java.util.Random;\n\nimport joptsimple.OptionParser;\nimport joptsimple.OptionSet;\n\nimport org.apache.commons.configuration.Configuration;\nimport org.apache.commons.configuration.PropertiesConfiguration;\nimport org.apache.log4j.BasicConfigurator;\nimport org.apache.log4j.Level;\nimport org.apache.log4j.Logger;\nimport org.apache.thrift.async.AsyncMethodCallback;\nimport org.apache.thrift.async.TAsyncClientManager;\nimport org.apache.thrift.protocol.TBinaryProtocol;\nimport org.apache.thrift.protocol.TProtocolFactory;\nimport org.apache.thrift.transport.TNonblockingSocket;\nimport org.apache.thrift.transport.TNonblockingTransport;\n\nimport edu.berkeley.sparrow.daemon.scheduler.SchedulerThrift;\nimport edu.berkeley.sparrow.thrift.SchedulerService;\nimport edu.berkeley.sparrow.thrift.SchedulerService.AsyncClient.submitJob_call;\nimport edu.berkeley.sparrow.thrift.TSchedulingRequest;\nimport edu.berkeley.sparrow.thrift.TTaskSpec;\nimport edu.berkeley.sparrow.thrift.TUserGroupInfo;\n\n/**\n * Frontend for the prototype implementation.\n */\npublic class ProtoFrontendAsync {\n  public static final double DEFAULT_JOB_ARRIVAL_RATE_S = 10; // Jobs/second\n  public static final int DEFAULT_TASKS_PER_JOB = 1;          // Tasks/job\n\n  // Type of benchmark to run, see ProtoBackend static constant for benchmark types\n  public static final int DEFAULT_TASK_BENCHMARK = ProtoBackend.BENCHMARK_TYPE_FP_CPU;\n  public static final int DEFAULT_BENCHMARK_ITERATIONS = 10;  // # of benchmark iterations\n\n  private static final Logger LOG = Logger.getLogger(ProtoFrontendAsync.class);\n\n  private static class SubmitCallback implements  AsyncMethodCallback<submitJob_call> {\n    TSchedulingRequest req;\n    TNonblockingTransport tr;\n\n    public SubmitCallback(TSchedulingRequest req, TNonblockingTransport tr) {\n      this.req = req;\n      this.tr = tr;\n    }\n\n    @Override\n    public void onComplete(submitJob_call response) {\n      LOG.debug(\"Submitted job: \" + req);\n      tr.close();\n    }\n\n    @Override\n    public void onError(Exception exception) {\n      LOG.error(\"Error submitting job\");\n      tr.close();\n    }\n\n  }\n\n  public static List<TTaskSpec> generateJob(int numTasks, int benchmarkId,\n      int benchmarkIterations) {\n    // Pack task parameters\n    ByteBuffer message = ByteBuffer.allocate(8);\n    message.putInt(benchmarkId);\n    message.putInt(benchmarkIterations);\n\n    List<TTaskSpec> out = new ArrayList<TTaskSpec>();\n    for (int taskId = 0; taskId < numTasks; taskId++) {\n      TTaskSpec spec = new TTaskSpec();\n      spec.setTaskId(Integer.toString(taskId));\n      spec.setMessage(message.array());\n      out.add(spec);\n    }\n    return out;\n  }\n\n  public static double generateInterarrivalDelay(Random r, double lambda) {\n    double u = r.nextDouble();\n    return -Math.log(u)/lambda;\n  }\n\n  public static void main(String[] args) {\n    try {\n      OptionParser parser = new OptionParser();\n      parser.accepts(\"c\", \"configuration file\").\n        withRequiredArg().ofType(String.class);\n      parser.accepts(\"help\", \"print help statement\");\n      OptionSet options = parser.parse(args);\n\n      if (options.has(\"help\")) {\n        parser.printHelpOn(System.out);\n        System.exit(-1);\n      }\n\n      // Logger configuration: log to the console\n      BasicConfigurator.configure();\n      LOG.setLevel(Level.DEBUG);\n\n      Configuration conf = new PropertiesConfiguration();\n\n      if (options.has(\"c\")) {\n        String configFile = (String) options.valueOf(\"c\");\n        conf = new PropertiesConfiguration(configFile);\n      }\n\n      Random r = new Random();\n      double lambda = conf.getDouble(\"job_arrival_rate_s\", DEFAULT_JOB_ARRIVAL_RATE_S);\n      int tasksPerJob = conf.getInt(\"tasks_per_job\", DEFAULT_TASKS_PER_JOB);\n      int benchmarkIterations = conf.getInt(\"benchmark.iterations\",\n          DEFAULT_BENCHMARK_ITERATIONS);\n      int benchmarkId = conf.getInt(\"benchmark.id\", DEFAULT_TASK_BENCHMARK);\n\n      int schedulerPort = conf.getInt(\"scheduler_port\",\n          SchedulerThrift.DEFAULT_SCHEDULER_THRIFT_PORT);\n\n      TProtocolFactory factory = new TBinaryProtocol.Factory();\n      TAsyncClientManager manager =  new TAsyncClientManager();\n\n      long lastLaunch = System.currentTimeMillis();\n      // Loop and generate tasks launches\n      while (true) {\n        // Lambda is the arrival rate in S, so we need to multiply the result here by\n        // 1000 to convert to ms.\n        long delay = (long) (generateInterarrivalDelay(r, lambda) * 1000);\n        long curLaunch = lastLaunch + delay;\n        long toWait = Math.max(0,  curLaunch - System.currentTimeMillis());\n        lastLaunch = curLaunch;\n        if (toWait == 0) {\n          LOG.warn(\"Generated workload not keeping up with real time.\");\n        }\n        List<TTaskSpec> tasks = generateJob(tasksPerJob, benchmarkId, benchmarkIterations);\n        TUserGroupInfo user = new TUserGroupInfo();\n        user.setUser(\"*\");\n        user.setGroup(\"*\");\n        TSchedulingRequest req = new TSchedulingRequest();\n        req.setApp(\"testApp\");\n        req.setTasks(tasks);\n        req.setUser(user);\n\n        TNonblockingTransport tr = new TNonblockingSocket(\n            \"localhost\", schedulerPort);\n        SchedulerService.AsyncClient client = new SchedulerService.AsyncClient(\n            factory, manager, tr);\n        //client.registerFrontend(\"testApp\", new RegisterCallback());\n        client.submitJob(req, new SubmitCallback(req, tr));\n      }\n    }\n    catch (Exception e) {\n      LOG.error(\"Fatal exception\", e);\n    }\n  }\n}\n"
  },
  {
    "path": "src/main/java/edu/berkeley/sparrow/examples/SimpleBackend.java",
    "content": "/*\n * Copyright 2013 The Regents of The University California\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage edu.berkeley.sparrow.examples;\n\nimport java.io.IOException;\nimport java.nio.ByteBuffer;\nimport java.util.concurrent.BlockingQueue;\nimport java.util.concurrent.ExecutorService;\nimport java.util.concurrent.Executors;\nimport java.util.concurrent.LinkedBlockingQueue;\n\nimport joptsimple.OptionParser;\nimport joptsimple.OptionSet;\n\nimport org.apache.commons.configuration.Configuration;\nimport org.apache.commons.configuration.ConfigurationException;\nimport org.apache.commons.configuration.PropertiesConfiguration;\nimport org.apache.log4j.BasicConfigurator;\nimport org.apache.log4j.Level;\nimport org.apache.log4j.Logger;\nimport org.apache.thrift.TException;\n\nimport com.google.common.collect.Lists;\n\nimport edu.berkeley.sparrow.daemon.nodemonitor.NodeMonitorThrift;\nimport edu.berkeley.sparrow.daemon.util.TClients;\nimport edu.berkeley.sparrow.daemon.util.TServers;\nimport edu.berkeley.sparrow.thrift.BackendService;\nimport edu.berkeley.sparrow.thrift.NodeMonitorService.Client;\nimport edu.berkeley.sparrow.thrift.TFullTaskId;\nimport edu.berkeley.sparrow.thrift.TUserGroupInfo;\n\n/**\n * A prototype Sparrow backend that runs sleep tasks.\n */\npublic class SimpleBackend implements BackendService.Iface {\n\n  private static final String LISTEN_PORT = \"listen_port\";\n  private static final int DEFAULT_LISTEN_PORT = 20101;\n\n  /**\n   * Each task is launched in its own thread from a thread pool with WORKER_THREADS threads,\n   * so this should be set equal to the maximum number of tasks that can be running on a worker.\n   */\n  private static final int WORKER_THREADS = 16;\n  private static final String APP_ID = \"sleepApp\";\n\n  /** Configuration parameters to specify where the node monitor is running. */\n  private static final String NODE_MONITOR_HOST = \"node_monitor_host\";\n  private static final String DEFAULT_NODE_MONITOR_HOST = \"localhost\";\n  private static String NODE_MONITOR_PORT = \"node_monitor_port\";\n\n  private static Client client;\n\n  private static final Logger LOG = Logger.getLogger(SimpleBackend.class);\n  private static final ExecutorService executor =\n      Executors.newFixedThreadPool(WORKER_THREADS);\n\n  /**\n   * Keeps track of finished tasks.\n   *\n   * A single thread pulls items off of this queue and uses\n   * the client to notify the node monitor that tasks have finished.\n   */\n  private final BlockingQueue<TFullTaskId> finishedTasks = new LinkedBlockingQueue<TFullTaskId>();\n\n  /**\n   * Thread that sends taskFinished() RPCs to the node monitor.\n   *\n   * We do this in a single thread so that we just need a single client to the node monitor\n   * and don't need to create a new client for each task.\n   */\n  private class TasksFinishedRpcRunnable implements Runnable {\n\t  @Override\n\t  public void run() {\n\t\t  while (true) {\n\t\t  \ttry {\n\t\t  \t\tTFullTaskId task = finishedTasks.take();\n\t\t\t\t\tclient.tasksFinished(Lists.newArrayList(task));\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\tLOG.error(\"Error taking a task from the queue: \" + e.getMessage());\n\t\t\t\t} catch (TException e) {\n\t\t\t\t\tLOG.error(\"Error with tasksFinished() RPC:\" + e.getMessage());\n\t\t\t\t}\n\t\t  }\n\t  }\n  }\n\n  /**\n   * Thread spawned for each task. It runs for a given amount of time (and adds\n   * its resources to the total resources for that time) then stops. It updates\n   * the NodeMonitor when it launches and again when it finishes.\n   */\n  private class TaskRunnable implements Runnable {\n    private int taskDurationMillis;\n    private TFullTaskId taskId;\n\n    public TaskRunnable(String requestId, TFullTaskId taskId, ByteBuffer message) {\n      this.taskDurationMillis = message.getInt();\n      this.taskId = taskId;\n    }\n\n    @Override\n    public void run() {\n      long startTime = System.currentTimeMillis();\n      try {\n        Thread.sleep(taskDurationMillis);\n      } catch (InterruptedException e) {\n        LOG.error(\"Interrupted while sleeping: \" + e.getMessage());\n      }\n      LOG.debug(\"Task completed in \" + (System.currentTimeMillis() - startTime) + \"ms\");\n      finishedTasks.add(taskId);\n    }\n  }\n\n  /**\n   * Initializes the backend by registering with the node monitor.\n   *\n   * Also starts a thread that handles finished tasks (by sending an RPC to the node monitor).\n   */\n  public void initialize(int listenPort, String nodeMonitorHost, int nodeMonitorPort) {\n    // Register server.\n    try {\n\t\t\tclient = TClients.createBlockingNmClient(nodeMonitorHost, nodeMonitorPort);\n\t\t} catch (IOException e) {\n\t\t\tLOG.debug(\"Error creating Thrift client: \" + e.getMessage());\n\t\t}\n\n    try {\n      client.registerBackend(APP_ID, \"localhost:\" + listenPort);\n      LOG.debug(\"Client successfully registered\");\n    } catch (TException e) {\n      LOG.debug(\"Error while registering backend: \" + e.getMessage());\n    }\n\n    new Thread(new TasksFinishedRpcRunnable()).start();\n  }\n\n  @Override\n  public void launchTask(ByteBuffer message, TFullTaskId taskId,\n      TUserGroupInfo user) throws TException {\n    LOG.info(\"Submitting task \" + taskId.getTaskId() + \" at \" + System.currentTimeMillis());\n\n    executor.submit(new TaskRunnable(\n        taskId.requestId, taskId, message));\n  }\n\n  public static void main(String[] args) throws IOException, TException {\n    OptionParser parser = new OptionParser();\n    parser.accepts(\"c\", \"configuration file\").\n      withRequiredArg().ofType(String.class);\n    parser.accepts(\"help\", \"print help statement\");\n    OptionSet options = parser.parse(args);\n\n    if (options.has(\"help\")) {\n      parser.printHelpOn(System.out);\n      System.exit(-1);\n    }\n\n    // Logger configuration: log to the console\n    BasicConfigurator.configure();\n    LOG.setLevel(Level.DEBUG);\n    LOG.debug(\"debug logging on\");\n\n    Configuration conf = new PropertiesConfiguration();\n\n    if (options.has(\"c\")) {\n      String configFile = (String) options.valueOf(\"c\");\n      try {\n        conf = new PropertiesConfiguration(configFile);\n      } catch (ConfigurationException e) {}\n    }\n    // Start backend server\n    SimpleBackend protoBackend = new SimpleBackend();\n    BackendService.Processor<BackendService.Iface> processor =\n        new BackendService.Processor<BackendService.Iface>(protoBackend);\n\n    int listenPort = conf.getInt(LISTEN_PORT, DEFAULT_LISTEN_PORT);\n    int nodeMonitorPort = conf.getInt(NODE_MONITOR_PORT, NodeMonitorThrift.DEFAULT_NM_THRIFT_PORT);\n    String nodeMonitorHost = conf.getString(NODE_MONITOR_HOST, DEFAULT_NODE_MONITOR_HOST);\n    TServers.launchSingleThreadThriftServer(listenPort, processor);\n    protoBackend.initialize(listenPort, nodeMonitorHost, nodeMonitorPort);\n  }\n}\n"
  },
  {
    "path": "src/main/java/edu/berkeley/sparrow/examples/SimpleFrontend.java",
    "content": "/*\n * Copyright 2013 The Regents of The University California\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage edu.berkeley.sparrow.examples;\n\nimport java.net.InetSocketAddress;\nimport java.nio.ByteBuffer;\nimport java.util.ArrayList;\nimport java.util.List;\nimport java.util.concurrent.ScheduledThreadPoolExecutor;\nimport java.util.concurrent.TimeUnit;\n\nimport joptsimple.OptionParser;\nimport joptsimple.OptionSet;\n\nimport org.apache.commons.configuration.Configuration;\nimport org.apache.commons.configuration.PropertiesConfiguration;\nimport org.apache.log4j.BasicConfigurator;\nimport org.apache.log4j.Level;\nimport org.apache.log4j.Logger;\nimport org.apache.thrift.TException;\n\nimport edu.berkeley.sparrow.api.SparrowFrontendClient;\nimport edu.berkeley.sparrow.daemon.scheduler.SchedulerThrift;\nimport edu.berkeley.sparrow.daemon.util.Serialization;\nimport edu.berkeley.sparrow.thrift.FrontendService;\nimport edu.berkeley.sparrow.thrift.TFullTaskId;\nimport edu.berkeley.sparrow.thrift.TTaskSpec;\nimport edu.berkeley.sparrow.thrift.TUserGroupInfo;\n\n/**\n * Simple frontend that runs jobs composed of sleep tasks.\n */\npublic class SimpleFrontend implements FrontendService.Iface {\n  /** Amount of time to launch tasks for. */\n  public static final String EXPERIMENT_S = \"experiment_s\";\n  public static final int DEFAULT_EXPERIMENT_S = 300;\n\n  public static final String JOB_ARRIVAL_PERIOD_MILLIS = \"job_arrival_period_millis\";\n  public static final int DEFAULT_JOB_ARRIVAL_PERIOD_MILLIS = 100;\n\n  /** Number of tasks per job. */\n  public static final String TASKS_PER_JOB = \"tasks_per_job\";\n  public static final int DEFAULT_TASKS_PER_JOB = 1;\n\n  /** Duration of one task, in milliseconds */\n  public static final String TASK_DURATION_MILLIS = \"task_duration_millis\";\n  public static final int DEFAULT_TASK_DURATION_MILLIS = 100;\n\n  /** Host and port where scheduler is running. */\n  public static final String SCHEDULER_HOST = \"scheduler_host\";\n  public static final String DEFAULT_SCHEDULER_HOST = \"localhost\";\n  public static final String SCHEDULER_PORT = \"scheduler_port\";\n\n  /**\n   * Default application name.\n   */\n  public static final String APPLICATION_ID = \"sleepApp\";\n\n  private static final Logger LOG = Logger.getLogger(SimpleFrontend.class);\n\n  private static final TUserGroupInfo USER = new TUserGroupInfo();\n\n  private SparrowFrontendClient client;\n\n  /** A runnable which Spawns a new thread to launch a scheduling request. */\n  private class JobLaunchRunnable implements Runnable {\n    private int tasksPerJob;\n    private int taskDurationMillis;\n\n    public JobLaunchRunnable(int tasksPerJob, int taskDurationMillis) {\n      this.tasksPerJob = tasksPerJob;\n      this.taskDurationMillis = taskDurationMillis;\n    }\n\n    @Override\n    public void run() {\n      // Generate tasks in the format expected by Sparrow. First, pack task parameters.\n      ByteBuffer message = ByteBuffer.allocate(4);\n      message.putInt(taskDurationMillis);\n\n      List<TTaskSpec> tasks = new ArrayList<TTaskSpec>();\n      for (int taskId = 0; taskId < tasksPerJob; taskId++) {\n        TTaskSpec spec = new TTaskSpec();\n        spec.setTaskId(Integer.toString(taskId));\n        spec.setMessage(message.array());\n        tasks.add(spec);\n      }\n      long start = System.currentTimeMillis();\n      try {\n        client.submitJob(APPLICATION_ID, tasks, USER);\n      } catch (TException e) {\n        LOG.error(\"Scheduling request failed!\", e);\n      }\n      long end = System.currentTimeMillis();\n      LOG.debug(\"Scheduling request duration \" + (end - start));\n    }\n  }\n\n  public void run(String[] args) {\n    try {\n      OptionParser parser = new OptionParser();\n      parser.accepts(\"c\", \"configuration file\").withRequiredArg().ofType(String.class);\n      parser.accepts(\"help\", \"print help statement\");\n      OptionSet options = parser.parse(args);\n\n      if (options.has(\"help\")) {\n        parser.printHelpOn(System.out);\n        System.exit(-1);\n      }\n\n      // Logger configuration: log to the console\n      BasicConfigurator.configure();\n      LOG.setLevel(Level.DEBUG);\n\n      Configuration conf = new PropertiesConfiguration();\n\n      if (options.has(\"c\")) {\n        String configFile = (String) options.valueOf(\"c\");\n        conf = new PropertiesConfiguration(configFile);\n      }\n\n      int arrivalPeriodMillis = conf.getInt(JOB_ARRIVAL_PERIOD_MILLIS,\n          DEFAULT_JOB_ARRIVAL_PERIOD_MILLIS);\n      int experimentDurationS = conf.getInt(EXPERIMENT_S, DEFAULT_EXPERIMENT_S);\n      LOG.debug(\"Using arrival period of \" + arrivalPeriodMillis +\n          \" milliseconds and running experiment for \" + experimentDurationS + \" seconds.\");\n      int tasksPerJob = conf.getInt(TASKS_PER_JOB, DEFAULT_TASKS_PER_JOB);\n      int taskDurationMillis = conf.getInt(TASK_DURATION_MILLIS, DEFAULT_TASK_DURATION_MILLIS);\n\n      int schedulerPort = conf.getInt(SCHEDULER_PORT,\n          SchedulerThrift.DEFAULT_SCHEDULER_THRIFT_PORT);\n      String schedulerHost = conf.getString(SCHEDULER_HOST, DEFAULT_SCHEDULER_HOST);\n      client = new SparrowFrontendClient();\n      client.initialize(new InetSocketAddress(schedulerHost, schedulerPort), APPLICATION_ID, this);\n\n      JobLaunchRunnable runnable = new JobLaunchRunnable(tasksPerJob, taskDurationMillis);\n      ScheduledThreadPoolExecutor taskLauncher = new ScheduledThreadPoolExecutor(1);\n      taskLauncher.scheduleAtFixedRate(runnable, 0, arrivalPeriodMillis, TimeUnit.MILLISECONDS);\n\n      long startTime = System.currentTimeMillis();\n      LOG.debug(\"sleeping\");\n      while (System.currentTimeMillis() < startTime + experimentDurationS * 1000) {\n        Thread.sleep(100);\n      }\n      taskLauncher.shutdown();\n    }\n    catch (Exception e) {\n      LOG.error(\"Fatal exception\", e);\n    }\n  }\n\n  @Override\n  public void frontendMessage(TFullTaskId taskId, int status, ByteBuffer message)\n      throws TException {\n    // We don't use messages here, so just log it.\n    LOG.debug(\"Got unexpected message: \" + Serialization.getByteBufferContents(message));\n  }\n\n  public static void main(String[] args) {\n    new SimpleFrontend().run(args);\n  }\n}\n"
  },
  {
    "path": "src/main/java/edu/berkeley/sparrow/examples/ThriftPongClient.java",
    "content": "/*\n * Copyright 2013 The Regents of The University California\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *   http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage edu.berkeley.sparrow.examples;\n\nimport java.net.InetSocketAddress;\n\nimport org.apache.thrift.TException;\nimport org.apache.thrift.async.AsyncMethodCallback;\nimport org.apache.thrift.protocol.TBinaryProtocol;\nimport org.apache.thrift.protocol.TProtocol;\nimport org.apache.thrift.transport.TFramedTransport;\nimport org.apache.thrift.transport.TSocket;\nimport org.apache.thrift.transport.TTransport;\n\nimport edu.berkeley.sparrow.daemon.util.ThriftClientPool;\nimport edu.berkeley.sparrow.thrift.PongService;\nimport edu.berkeley.sparrow.thrift.PongService.AsyncClient;\nimport edu.berkeley.sparrow.thrift.PongService.AsyncClient.ping_call;\n\npublic class ThriftPongClient {\n  private static ThriftClientPool<PongService.AsyncClient> pongClientPool =\n      new ThriftClientPool<PongService.AsyncClient>(\n          new ThriftClientPool.PongServiceMakerFactory());\n  private static boolean USE_SYNCHRONOUS_CLIENT = true;\n\n  private static class Callback implements AsyncMethodCallback<ping_call> {\n    private InetSocketAddress address;\n    private Long t0;\n\n    Callback(InetSocketAddress address, Long t0) { this.address = address; this.t0 = t0; }\n\n    @Override\n    public void onComplete(ping_call response) {\n      try {\n        pongClientPool.returnClient(address, (AsyncClient) response.getClient());\n        System.out.println(\"Took: \" + (System.nanoTime() - t0) / (1000.0 * 1000.0) + \"ms\");\n      } catch (Exception e) {\n        e.printStackTrace();\n      }\n    }\n\n    @Override\n    public void onError(Exception exception) {\n      exception.printStackTrace();\n    }\n\n  }\n\n  private static void pongUsingSynchronousClient(String hostname)\n      throws TException, InterruptedException {\n    TTransport tr = new TFramedTransport(new TSocket(hostname, 12345));\n    tr.open();\n    TProtocol proto = new TBinaryProtocol(tr);\n    PongService.Client client = new PongService.Client(proto);\n    while (true) {\n      Long t = System.nanoTime();\n      client.ping(\"PING\");\n      System.out.println(\"Took: \" + (System.nanoTime() - t) / (1000.0 * 1000.0) + \"ms\");\n      Thread.sleep(500);\n    }\n  }\n\n  private static void pongUsingAsynchronousClient(String hostname) throws Exception {\n    InetSocketAddress address = new InetSocketAddress(hostname, 12345);\n    while (true) {\n      Long t = System.nanoTime();\n      AsyncClient client = pongClientPool.borrowClient(address);\n      System.out.println(\"Getting client took \" + ((System.nanoTime() - t) / (1000 * 1000)) +\n                         \"ms\");\n      client.ping(\"PING\", new Callback(address, System.nanoTime()));\n      Thread.sleep(30);\n    }\n  }\n\n  public static void main(String[] args) throws Exception {\n    String hostname = args[0];\n\n    if (USE_SYNCHRONOUS_CLIENT) {\n      pongUsingSynchronousClient(hostname);\n    } else {\n      pongUsingAsynchronousClient(hostname);\n    }\n  }\n}\n"
  },
  {
    "path": "src/main/java/edu/berkeley/sparrow/examples/ThriftPongServer.java",
    "content": "/*\n * Copyright 2013 The Regents of The University California\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *   http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage edu.berkeley.sparrow.examples;\nimport java.io.IOException;\n\nimport org.apache.thrift.TException;\n\nimport edu.berkeley.sparrow.daemon.util.TServers;\nimport edu.berkeley.sparrow.thrift.PongService;\n\npublic class ThriftPongServer implements PongService.Iface {\n\n  @Override\n  public String ping(String data) throws TException {\n    System.out.println(\"Got ping: \" + data);\n    return \"PONG\";\n  }\n\n  public static void main(String[] args) throws IOException {\n    PongService.Processor<PongService.Iface> pongProcessor =\n        new PongService.Processor<PongService.Iface>(new ThriftPongServer());\n    TServers.launchSingleThreadThriftServer(12345, pongProcessor);\n  }\n}\n"
  },
  {
    "path": "src/main/java/edu/berkeley/sparrow/examples/ThroughputTestingFrontend.java",
    "content": "/*\n * Copyright 2013 The Regents of The University California\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *   http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage edu.berkeley.sparrow.examples;\n\nimport java.net.InetSocketAddress;\nimport java.nio.ByteBuffer;\nimport java.util.ArrayList;\nimport java.util.List;\nimport java.util.concurrent.atomic.AtomicInteger;\n\nimport joptsimple.OptionParser;\nimport joptsimple.OptionSet;\n\nimport org.apache.log4j.BasicConfigurator;\nimport org.apache.log4j.Level;\nimport org.apache.log4j.Logger;\nimport org.apache.thrift.TException;\n\nimport edu.berkeley.sparrow.api.SparrowFrontendClient;\nimport edu.berkeley.sparrow.daemon.scheduler.SchedulerThrift;\nimport edu.berkeley.sparrow.daemon.util.Serialization;\nimport edu.berkeley.sparrow.thrift.FrontendService;\nimport edu.berkeley.sparrow.thrift.TFullTaskId;\nimport edu.berkeley.sparrow.thrift.TTaskSpec;\nimport edu.berkeley.sparrow.thrift.TUserGroupInfo;\n\n/**\n * Frontend that submits large jobs, for the purpose of testing throughput.\n */\npublic class ThroughputTestingFrontend implements FrontendService.Iface {\n\n  // Type of benchmark to run, see ProtoBackend static constant for benchmark types\n  public static final int DEFAULT_TASK_BENCHMARK = ProtoBackend.BENCHMARK_TYPE_FP_CPU;\n\n  /**\n   * Default application name.\n   */\n  public static final String APPLICATION_ID = \"testApp\";\n\n  private static final Logger LOG = Logger.getLogger(ThroughputTestingFrontend.class);\n  public final static long startTime = System.currentTimeMillis();\n  public static AtomicInteger tasksLaunched = new AtomicInteger(0);\n\n  public void run(String[] args) {\n    try {\n      OptionParser parser = new OptionParser();\n      parser.accepts(\"c\", \"configuration file\").withRequiredArg().ofType(String.class);\n      parser.accepts(\"help\", \"print help statement\");\n      OptionSet options = parser.parse(args);\n\n      if (options.has(\"help\")) {\n        parser.printHelpOn(System.out);\n        System.exit(-1);\n      }\n\n      // Logger configuration: log to the console\n      BasicConfigurator.configure();\n      LOG.setLevel(Level.DEBUG);\n\n      SparrowFrontendClient client = new SparrowFrontendClient();\n      int schedulerPort = SchedulerThrift.DEFAULT_SCHEDULER_THRIFT_PORT;\n      client.initialize(new InetSocketAddress(\"localhost\", schedulerPort), APPLICATION_ID, this);\n\n      // Generate list of tasks.\n      ByteBuffer message = ByteBuffer.allocate(8);\n      message.putInt(DEFAULT_TASK_BENCHMARK);\n      // Just one iteration!\n      message.putInt(1);\n      \n      List<TTaskSpec> tasks = new ArrayList<TTaskSpec>();\n      int numTasks = Integer.parseInt(args[0]);\n      LOG.info(\"Launching \" + numTasks + \" tasks\");\n      for (int taskId = 0; taskId < numTasks; taskId++) {\n        TTaskSpec spec = new TTaskSpec();\n        spec.setTaskId(Integer.toString(taskId));\n        spec.setMessage(message.array());\n        tasks.add(spec);\n      }\n      TUserGroupInfo userInfo = new TUserGroupInfo(\"User\", \"*\", 0);\n      \n      while(true) {\n    \t  client.submitJob(APPLICATION_ID, tasks, userInfo);\n    \t  tasksLaunched.addAndGet(tasks.size());\n        LOG.info(tasksLaunched.get() + \" tasks launched\");\n      \n        Thread.sleep(1000);\n      }\n    }\n    catch (Exception e) {\n      LOG.error(\"Fatal exception\", e);\n    }\n  }\n\n  @Override\n  public void frontendMessage(TFullTaskId taskId, int status, ByteBuffer message)\n      throws TException {\n    // We don't use messages here, so just log it.\n    LOG.debug(\"Got unexpected message: \" + Serialization.getByteBufferContents(message));\n  }\n\n  public static void main(String[] args) {\n    new ThroughputTestingFrontend().run(args);\n  }\n}\n"
  },
  {
    "path": "src/main/java/edu/berkeley/sparrow/examples/readme.markdown",
    "content": "This folder contains simple frontends and backends to use in testing Sparrow's performance.\n\nFor users new to Sparrow, the SimpleFrontend and SimpleBackend classes provide a good minimal example of what a Sparrow application looks like. The SimpleFrontend launches jobs with a fixed number of tasks at a fixed period; the SimpleBackend runs the tasks, which simply sleep for a specified period of time.\n"
  },
  {
    "path": "src/main/python/README",
    "content": "Shell scripts in this file aid with setting up the correct path to run\nPython programs.  To run X.py, run ./X.sh.\n"
  },
  {
    "path": "src/main/python/get_response_time.py",
    "content": "#\n# Copyright 2013 The Regents of The University California\n# \n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n# \n#   http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n\n# Quick-and-dirty script to get the response time distribution and plot it\nimport sys\nimport os\nimport subprocess\n\ndef main(argv):\n  log_dir = argv[1]\n  min_n = argv[2]\n  max_n = argv[3]\n\n  unqualified_log_files = os.listdir(log_dir)\n  log_files = [os.path.join(log_dir, filename) for \\\n               filename in unqualified_log_files]\n  log_files = filter(lambda x: \"tpch\" in x, log_files)\n\n  out_files = []\n  for fname in log_files:\n    f = open(fname)\n    ip = fname.split(\"/\")[-1:][0].split(\"_\")[2].replace(\".log\", \"\")\n    lines = filter(lambda k: \"trial\" in k, f.readlines())\n    lines = lines[int(min_n):int(max_n)]\n    \n    times = map(lambda x: int(x.strip().split(\"\\t\")[1]), lines)\n\n    out_file = ip + \".plot_input\"\n    out = open(out_file, 'w')\n    for (i, time) in enumerate(sorted(times)):\n      out.write(\"%s\\t%s\\n\" % (float(i)/len(times), time))\n    out.close()\n    out_files.append((out_file, ip))\n\n  plot_fname = \"tpc_resp_cdf.plt\"\n  f = open(plot_fname, 'w')\n  plot_file = open(plot_fname, 'w')\n  plot_file.write(\"set terminal postscript color\\n\")\n  plot_file.write(\"set output 'tpc_resp_cdf.ps'\\n\")\n  parts = map(lambda x: \"'%s' using 2:1 with lines lw 3 title '%s'\"\n    % (x[0], x[1]), out_files)\n  plot = \"plot \" + \",\\\\\\n\".join(parts)\n  plot_file.write(plot + \"\\n\")\n  plot_file.close()\n  subprocess.check_call(\"gnuplot %s\" % plot_fname, shell=True)\n#  subprocess.check_call(\"rm *.plot_input\", shell=True)\n\n    \n\nif __name__ == \"__main__\":\n  main(sys.argv)\n"
  },
  {
    "path": "src/main/python/get_utilization.py",
    "content": "#\n# Copyright 2013 The Regents of The University California\n# \n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n# \n#   http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n\n# Quick-and-dirty script to get the cluster utilization over time\nimport sys\nimport os\nimport subprocess\n\ndef main(argv):\n  log_dir = argv[1]\n  util_min_s = float(argv[2])\n  util_max_s = float(argv[3])\n\n  unqualified_log_files = filter(lambda x: \"sparrow_audit\" in x,\n                                 os.listdir(log_dir))\n  log_files = [os.path.join(log_dir, filename) for \\\n               filename in unqualified_log_files]\n\n  events = []\n  events_per_node = {}\n  RUNNING = \"nodemonitor_task_runnable\"\n  #RUNNING=\"node_monitor_task_launch\"\n  START_INT = 1\n  COMPLETED = \"nodemonitor_task_completed\"\n  #COMPLETED = \"task_completed\"\n  END_INT = -1\n\n  task_to_node = {}\n\n  for filename in log_files:\n    print filename\n    for line in open(filename):\n      items = line.strip().split(\"\\t\")\n      if len(items) < 2:\n        continue\n      time = int(items[1]) \n      \n      if RUNNING in items[2]:\n        events.append((time, START_INT))\n        \n      if COMPLETED in items[2]:\n        events.append((time, END_INT))\n         \n  events = sorted(events, key = lambda x: x[0])\n  \n  out_file = open(\"utilization_vs_time.txt\", 'w')\n  count = 0\n  init_time = events[0][0]\n\n  total_utilization = 0.0\n  total_time = (util_max_s - util_min_s) * 1000\n  last_time = -1\n  total_starts = 0  \n\n  for event in events:\n    time_s = (float(event[0]) - init_time) / 1000\n    if time_s >= util_min_s and time_s <= util_max_s:\n      if event[1] == 1:\n        total_starts = total_starts + 1\n\n      if last_time is -1:\n        last_time = event[0]\n      time_diff = event[0] - last_time\n      last_time = event[0]\n      total_utilization = total_utilization + (time_diff * count)\n    count = count + event[1]\n    out_file.write(\"%s\\t%s\\n\" % (time_s, count))\n  out_file.close()\n\n  graph_file = open(\"utilization_vs_time.gp\", 'w')\n  graph_file.write(\"set terminal postscript\\n\")\n  graph_file.write(\"set output 'utilization_vs_time.ps'\\n\")\n  graph_file.write(\"set ylabel 'Utilization'\\n\")\n  graph_file.write(\"set xlabel 'Time (s)'\\n\")\n  graph_file.write(\"plot 'utilization_vs_time.txt' using 1:2 with lines lw 3 lc 1 notitle\")\n\n  print \"Average utilization: %s\" % (total_utilization / total_time)\n  print \"Tasks per second: %s\" % (total_starts / (total_time / 1000))\n  print \"Init time: %s\" % init_time\n  #subprocess.check_call(\"rm utilization_vs*.txt\", shell=True)\n\nif __name__ == \"__main__\":\n  main(sys.argv)\n"
  },
  {
    "path": "src/main/python/parse_logs.py",
    "content": "#\n# Copyright 2013 The Regents of The University California\n# \n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n# \n#   http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n\n\"\"\" Parses a log file and outputs aggregated information about the experiment.\n\nAll times are in milliseconds unless otherwise indicated.\n\"\"\"\nimport functools\nimport logging\nimport math\nimport os\nimport re\nimport subprocess\nimport stats\nimport sys\nimport time\n\nINVALID_TIME = 0\nINVALID_TIME_DELTA = -sys.maxint - 1\nINVALID_QUEUE_LENGTH = -1\nINVALID_ID = -1\n\nSTART_SEC = 30\nEND_SEC = 300\n\nREQUEST_COUNT_GRANUL = 30\n\n\"\"\" from http://code.activestate.com/\n         recipes/511478-finding-the-percentile-of-the-values/ \"\"\"\ndef get_percentile(N, percent, key=lambda x:x):\n    \"\"\" Find the percentile of a list of values.\n\n    Args:\n      percent: a float value from 0.0 to 1.0.\n      key: optional key function to compute value from each element of N.\n\n    Returns:\n      The percentile of the values\n    \"\"\"\n    if not N:\n        return 0\n    k = (len(N)-1) * percent\n    f = math.floor(k)\n    c = math.ceil(k)\n    if f == c:\n        return key(N[int(k)])\n    d0 = key(N[int(f)]) * (c-k)\n    d1 = key(N[int(c)]) * (k-f)\n    return d0+d1\n\nclass Task:\n    \"\"\" Class to store information about a task.\n\n    We store a variety of events corresponding to each task launch,\n    as described in __init__\n    \"\"\"\n    def __init__(self, id):\n        self.__logger = logging.getLogger(\"Task\")\n\n        # The number of tasks that the node monitor attempted to launch right after this one.\n        self.subsequent_launches = 0\n\n        # Whether a task was launched from the queue right after this one completed.\n        self.subsequent_task_launched = False\n\n        # IP address of the node monitor where this task was launched.\n        self.node_monitor_address = \"\"\n\n        # When the node monitor asked for the task from the scheduler.\n        self.node_monitor_get_task_time = INVALID_TIME\n\n        # When the scheduler (resident with the frontend) assigned the task to the slave.\n        self.scheduler_launch_time = INVALID_TIME\n        # When the node monitor (resident with the backend) launched the task\n        self.node_monitor_launch_time = INVALID_TIME\n        # When the backend completed the task\n        self.completion_time = INVALID_TIME\n        # Address of the machine that the task ran on.\n        self.id = id\n\n        # The task (and associated request) that ran immediately before this task on the worker\n        # machine. May be null if this task was launched straight from the queue, and not because\n        # an existing task finished.\n        self.previous_request_id = \"\"\n        self.previous_task_id = \"\"\n\n    def __str__(self):\n        return (\"Task %s: Scheduler launch %s, NM launch %s, NM complete %s, predicted sched. complete: %f, service time: %s\" %\n                (self.id, self.scheduler_launch_time, self.node_monitor_launch_time, self.completion_time, self.adjusted_completion_time(), self.service_time()))\n\n    def set_scheduler_launch_time(self, time):\n        if self.scheduler_launch_time != INVALID_TIME:\n            self.__logger.warn((\"Task %s launched at scheduler twice; expect \"\n                                \"task to only launch once\") % self.id)\n        self.scheduler_launch_time = time\n\n    def set_node_monitor_launch_time(self, time):\n        if self.node_monitor_launch_time != INVALID_TIME:\n            self.__logger.warn((\"Task %s launched twice; expect task to \"\n                                \"only launch once\") % id)\n        self.node_monitor_launch_time = time\n\n    def set_completion_time(self, time):\n        if self.completion_time != INVALID_TIME:\n            self.__logger.warn((\"Task %s completed twice; \"\n                              \"expect task to only complete once\") % self.id)\n        self.completion_time = time\n\n    def set_previous_task(self, previous_request_id, previous_task_id):\n        if self.previous_request_id != \"\" or self.previous_task_id != \"\":\n            self.__logger.warn(\"Task %s had multiple previous tasks; expected just one\" % id)\n        self.previous_request_id = previous_request_id\n        self.previous_task_id = previous_task_id\n\n    def service_time(self):\n        \"\"\" Returns the service time (time executing on backend).\"\"\"\n        #print self.node_monitor_address, self.completion_time - self.node_monitor_launch_time\n        return (self.completion_time - self.node_monitor_launch_time)\n\n    def adjusted_completion_time(self):\n        \"\"\" Returns the adjusted completion time (adjusted to be consistent with the scheduler\n        clock). \"\"\"\n        expected_scheduler_get_task_time = (self.node_monitor_get_task_time +\n                                            self.node_monitor_launch_time) / 2.0\n        skew = self.scheduler_launch_time - expected_scheduler_get_task_time\n        return self.completion_time + skew\n\n    def complete(self, verbose=False):\n        \"\"\" Returns whether we have complete information on this task. \"\"\"\n        #if self.scheduler_launch_time == INVALID_TIME: print \"scheduler launch\"\n        #if self.node_monitor_launch_time == INVALID_TIME: print \"nm launch\"\n        #if self.completion_time == INVALID_TIME: print \"completion\"\n        if verbose:\n            if self.node_monitor_get_task_time == INVALID_TIME:\n                print \"Task %s incomplete: node monitor get_task time missing\" % self.id\n            elif self.scheduler_launch_time == INVALID_TIME:\n                print \"Task %s incomplete: Scheduler launch time missing\" % self.id\n            elif self.node_monitor_launch_time == INVALID_TIME:\n                print \"Task %s incomplete: Node monitor launch time missing\" % self.id\n            elif self.completion_time == INVALID_TIME:\n                print \"Task %s incomplete: Completion time missing\" % self.id\n        return (self.node_monitor_get_task_time != INVALID_TIME and\n                self.scheduler_launch_time != INVALID_TIME and\n                self.node_monitor_launch_time != INVALID_TIME and\n                self.completion_time != INVALID_TIME)\n\nTPCH_QUERY_ID_REGEX = re.compile('--(\\d+) (\\d+)--')\n\nclass Request:\n    def __init__(self, id):\n        self.__id = id\n        self.__num_tasks = 0\n        self.__arrival_time = INVALID_TIME\n        self.__tasks = {}\n        \n        self.constrained = False\n        # Address of the scheduler that received the request (and placed it).\n        self.__scheduler_address = \"\"\n        self.__logger = logging.getLogger(\"Request\")\n\n        # Mapping of node monitor addresses to when a getTask() was received at the scheduler from\n        # that node monitor (includes reservations that weren't responded to).\n        self.__scheduler_get_task_times = {}\n        # Mapping of node monitor address to a pair of times, the first of which is the time when\n        # the request to get a task was launched, and the second of which is the\n        # time when the request completed.\n        # This is not currently used (it includes times for failed getTask() RPCs, unlike the metric\n        # currently output; it's just here for future reference.\n        self.__get_task_times = {}\n        # Mapping of node monitor address to a pair of times, the first of which is the time when\n        # the request to enqueue a task reservation was launched, and the second of which is the\n        # time when the request completed.\n        self.__enqueue_reservation_rtts = {}\n\n        self.__user = \"\"\n\n        # TPCH query number.\n        self.tpch_id = INVALID_ID\n        # Unique query identifier assigned by shark (used to differentiate\n        # different executions of the same TPC-H query).\n        self.shark_id = INVALID_ID\n        # Spark stage ID\n        self.stage_id = INVALID_ID\n        self.constrained = False\n\n    def __str__(self):\n        ret = \"ID %s SHARK %s (stage %s), Constrained %s TPCH %s, %s tasks: \" % (self.__id, self.shark_id, self.stage_id, self.constrained, self.tpch_id, len(self.__tasks))\n        for task in self.__tasks.values():\n            ret += str(task)\n            ret += \" \"\n        return ret\n\n    def user(self):\n        return self.__user\n\n    def add_subsequent_task_launch_failure(self, task_id):\n        task = self.__get_task(task_id)\n        task.subsequent_launches += 1\n\n    def add_subsequent_task_launch(self, task_id):\n        task = self.__get_task(task_id)\n        task.subsequent_launches += 1\n        assert not task.subsequent_task_launched\n        task.subsequent_task_launched = True\n\n    def get_subsequent_task_launches(self):\n        subsequent_tasks_launched = []\n        for task in self.__tasks.values():\n            if task.subsequent_task_launched:\n                subsequent_tasks_launched.append(task.subsequent_launches)\n            # TODO: otherwise, add 0.\n        return subsequent_tasks_launched\n\n    def add_arrival(self, time, num_tasks, address, user, description, constrained):\n        self.__arrival_time = time\n        self.__num_tasks = int(num_tasks)\n        self.__scheduler_address = address\n        self.__user = user\n        if constrained == \"true\":\n          self.constrained = True\n        description_parts = description.split(\"-\")\n        if len(description_parts) < 2:\n            pass\n            #print \"Description not formatted as Spark/Shark description: \" + description\n        else:\n            self.stage_id = description_parts[-1]\n            match = TPCH_QUERY_ID_REGEX.search(description)\n            if match == None:\n                is_warmup_query = (description.find(\"SPREAD_EVENLY\") != -1)\n                is_create_table_query = (description.find(\"create table denorm\") != -1)\n                if not (is_warmup_query or is_create_table_query):\n                    self.__logger.warn(\"Couldn't find TPCH query id in description: %s\" % description)\n                return\n            # An identifier that's unique for the Shark driver, but not across all drivers.\n            self.shark_id = match.group(1)\n            self.tpch_id = match.group(2)\n            #print (\"Shark ID: %s, stage id: %s, TPCH id: %s for description %s\" %\n            #    (self.shark_id, self.stage_id, self.tpch_id, description))\n\n    def add_enqueue_reservation_launch(self, time, address):\n        if address not in self.__enqueue_reservation_rtts:\n            self.__enqueue_reservation_rtts[address] = [INVALID_TIME, INVALID_TIME]\n        self.__enqueue_reservation_rtts[address][0] = time\n\n    def add_enqueue_reservation_completion(self, time, address):\n        ip_only = address\n        if address.find(\"/\") != -1:\n            ip_only = address.split(\"/\")[1]\n        if ip_only not in self.__enqueue_reservation_rtts:\n            self.__enqueue_reservation_rtts[ip_only] = [INVALID_TIME, INVALID_TIME]\n        self.__enqueue_reservation_rtts[ip_only][1] = time\n\n    def add_node_monitor_get_task_launch(self, time, address):\n        if address not in self.__get_task_times:\n            self.__get_task_times[address] = [INVALID_TIME, INVALID_TIME]\n        self.__get_task_times[address][0] = time\n\n    def add_node_monitor_get_task_completion(self, time, address):\n        if address not in self.__get_task_times:\n            self.__get_task_times[address] = [INVALID_TIME, INVALID_TIME]\n        self.__get_task_times[address][1] = time\n\n    def set_node_monitor_get_task_times_for_tasks(self):\n        for task in self.__tasks.values():\n            if task.node_monitor_address != \"\":\n                task.node_monitor_get_task_time = self.__get_task_times[\n                    task.node_monitor_address][0]\n\n    def get_enqueue_reservation_rtts(self):\n        rtts = []\n        for rtt_info in self.__enqueue_reservation_rtts.values():\n            if rtt_info[0] != INVALID_TIME and rtt_info[1] != INVALID_TIME:\n                rtts.append(rtt_info[1] - rtt_info[0])\n        return rtts\n\n    def get_get_task_rtts(self):\n        \"\"\" This only includes the RTTS for tasks that were actually launched! \"\"\"\n        rtts = []\n        for task in self.__tasks.values():\n            if (task.node_monitor_get_task_time != INVALID_TIME and\n                task.node_monitor_launch_time != INVALID_TIME):\n                rtts.append(task.node_monitor_launch_time - task.node_monitor_get_task_time)\n        return rtts\n\n    def add_scheduler_get_task(self, time, node_monitor_address):\n        \"\"\" Adds the time when getTask() was called (as perceived by the scheduler). \"\"\"\n        self.__scheduler_get_task_times[node_monitor_address] = time\n\n    def get_scheduler_get_task_times(self):\n        return (self.__arrival_time, self.__scheduler_get_task_times.values())\n\n    def add_scheduler_task_launch(self, task_id, launch_time):\n        task = self.__get_task(task_id)\n        task.set_scheduler_launch_time(launch_time)\n\n    def add_node_monitor_task_launch(self, node_monitor_address, task_id, previous_request_id,\n                                     previous_task_id, launch_time):\n        task = self.__get_task(task_id)\n        task.node_monitor_address = node_monitor_address\n        task.set_node_monitor_launch_time(launch_time)\n        task.set_previous_task(previous_request_id, previous_task_id)\n\n    def add_task_completion(self, task_id, completion_time):\n        # We might see a task completion before a task launch, depending on the\n        # order that we read log files in.\n        task = self.__get_task(task_id)\n        task.set_completion_time(completion_time)\n\n    def get_task_completion(self, task_id):\n        if task_id in self.__tasks:\n            return self.__tasks[task_id].completion_time\n        else:\n            return INVALID_TIME\n\n    def arrival_time(self):\n        \"\"\" Returns the time at which the job arrived at the scheduler. \"\"\"\n        return self.__arrival_time\n\n    def scheduler_address(self):\n        return self.__scheduler_address\n\n    def network_delays(self):\n        \"\"\" Returns a list of delays for all __tasks with delay information. \"\"\"\n        network_delays = []\n        for task in self.__tasks.values():\n            if task.complete():\n                network_delays.append(task.network_delay())\n                if task.network_delay() > 20:\n                  print \"Long launch %s\" % self.__id\n                  print task.node_monitor_submit_time\n                  print task.scheduler_launch_time\n                  print task.id\n                  print task.address\n                  print\n        return network_delays\n\n    def start_and_end_times(self):\n        \"\"\" Returns a list of (launch time, finish time) tupes for complete __tasks. Ignores\n            clock skew. \"\"\"\n        return [(x.node_monitor_launch_time, x.completion_time) for x in self.__tasks.values()\n                if x.complete()]\n\n    def start_and_service_times(self):\n        \"\"\" Returns a list of (start time, service time) tuples for complete __tasks. \"\"\"\n        return [(x.scheduler_launch_time, x.service_time()) for x in self.__tasks.values()\n                if x.complete()]\n\n    def service_times(self):\n        \"\"\" Returns a list of service times for complete __tasks. \"\"\"\n        service_times = [task.service_time() for task in self.__tasks.values() if task.complete(True)]\n        return service_times\n\n    def queue_times(self):\n        \"\"\" Returns a list of queue times for all complete __tasks. \"\"\"\n        return [task.scheduler_launch_time - self.__arrival_time\n                for task in self.__tasks.values() if task.complete()]\n\n    def get_previous_tasks(self):\n        \"\"\" Returns a list of tuples: (task_launch_time, previous_request_id, previous_task_id).\n        \"\"\"\n        previous_task_info = []\n        for task in self.__tasks.values():\n            if task.complete() and task.previous_request_id:\n                previous_task_info.append((task.node_monitor_launch_time, task.previous_request_id,\n                                           task.previous_task_id))\n        return previous_task_info\n\n    def get_service_times(self, per_node_service_times):\n        \"\"\" Adds the service time for each node to the mapping of service times. \"\"\"\n        for task in self.__tasks.values():\n            if task.node_monitor_address not in per_node_service_times:\n                per_node_service_times[task.node_monitor_address] = []\n            per_node_service_times[task.node_monitor_address].append(task.service_time())\n\n    def get_per_node_queued_times(self, per_node_queued_times):\n        \"\"\" Adds the queued time for each node to the mapping of service times. \"\"\"\n        for task in self.__tasks.values():\n            if task.node_monitor_address not in per_node_queued_times:\n                per_node_queued_times[task.node_monitor_address] = []\n            per_node_queued_times[task.node_monitor_address].append(task.adjusted_completion_time() - self.__arrival_time)\n\n\n    def optimal_response_time(self):\n        return max([t.service_time() for t in self.__tasks.values()])\n\n    def response_time(self):\n        \"\"\" Returns the time from when the job arrived to when it completed.\n\n        Returns INVALID_TIME_DELTA if we don't have completion information on the job.  Note\n        that we may have information about when the job completed, but not\n        complete information about the job (e.g. we don't know when one of the tasks\n        was launched).\n        \"\"\"\n        if self.__arrival_time == INVALID_TIME:\n            self.__logger.debug(\"Request %s missing arrival time\" % self.__id)\n            return INVALID_TIME_DELTA\n        completion_time = self.__arrival_time\n        for task_id, task in self.__tasks.items():\n            if task.completion_time == INVALID_TIME:\n                self.__logger.debug((\"Task %s in request %s missing completion \"\n                                   \"time\") % (task_id, self.__id))\n                return INVALID_TIME_DELTA\n            task_completion_time = task.adjusted_completion_time()\n            #if task.scheduler_launch_time > task.node_monitor_launch_time:\n                 #self.__logger.warn((\"Task %s suggests clock skew: scheduler launch time %d, node \"\n                 #                    \"monitor launch time %d\") %\n\n                                    #(task_id, task.scheduler_launch_time,\n                                    # task.node_monitor_launch_time))\n            completion_time = max(completion_time, task_completion_time)\n        return completion_time - self.__arrival_time\n\n    def complete_tasks(self):\n        complete_tasks = 0\n        for task in self.__tasks.values():\n            if task.complete():\n                complete_tasks += 1\n\n        return complete_tasks\n\n    def complete(self, verbose=False):\n        \"\"\" Returns whether we have complete info for the request.\n\n        Due to incomplete log files, it's possible that we'll have completion\n        information but not start information for a job. \"\"\"\n        if (self.__num_tasks == 0 or\n            self.__arrival_time == 0 or\n            self.__num_tasks != len(self.__tasks)):\n            #\n            if verbose:\n                print (\"Request %s incomplete. %d expected tasks, %d recorded tasks, \"\n                       \"arrival time %s\") % (self.__id, self.__num_tasks,\n                                             len(self.__tasks), self.__arrival_time)\n            return False\n        for task in self.__tasks.values():\n            if not task.complete(verbose):\n                return False\n        return True\n\n    def __get_task(self, task_id):\n        \"\"\" Gets the task from the map of __tasks.\n\n        Creates a new task if the task with the given ID doesn't already\n        exist.\n        \"\"\"\n        if task_id not in self.__tasks:\n            self.__tasks[task_id] = Task(task_id)\n        return self.__tasks[task_id]\n\n    def __get_probe(self, address):\n        \"\"\" Gets the probe from the map of __probes.\n\n        Creates a new probe if the probe with the given address doesn't already\n        exist.\n        \"\"\"\n        if address not in self.__probes:\n            self.__probes[address] = Probe(self.__id, address)\n        return self.__probes[address]\n\nclass LogParser:\n    \"\"\" Helps extract job information from log files.\n\n    Attributes:\n        requests: A map of strings specifying request IDs to jobs.\n    \"\"\"\n    CLASS_INDEX = 0\n    TIME_INDEX = 1\n    AUDIT_EVENT_INDEX = 2\n\n    def __init__(self):\n        self.__requests = {}\n        self.__logger = logging.getLogger(\"LogParser\")\n        self.__earliest_time = (time.time() * 1000)**2\n        # Mapping of node monitor IP addresses to a list of (queue length, time) pairs observed at\n        # that IP address.\n        self.__node_monitor_queue_lengths = {}\n        self.__users = set()\n\n    def earliest_time(self):\n        return self.__earliest_time\n\n    def get_requests(self):\n        return self.__requests\n\n    def parse_file(self, filename):\n        print \"parsing %s\" % filename\n        file = open(filename, \"r\")\n        for line in file:\n            # Strip off the newline at the end of the line.\n            items = line[:-1].split(\"\\t\")\n\n            # Time is expressed in epoch milliseconds.\n            time = int(items[self.TIME_INDEX])\n            self.__earliest_time = min(self.__earliest_time, time)\n\n            audit_event_params = \" \".join(items[self.AUDIT_EVENT_INDEX:]).split(\":\")\n            if audit_event_params[0] == \"arrived\":\n                request = self.__get_request(audit_event_params[1])\n                # TODO: replace last param with \"constrained\", once that's added\n                request.add_arrival(time, audit_event_params[2],\n                                    audit_event_params[3], audit_event_params[5],\n                                    audit_event_params[6], audit_event_params[7])\n                if audit_event_params[5]:\n                  self.__users.add(audit_event_params[5])\n            elif audit_event_params[0] == \"scheduler_launch_enqueue_task\":\n                request = self.__get_request(audit_event_params[1])\n                request.add_enqueue_reservation_launch(time, audit_event_params[2])\n            elif audit_event_params[0] == \"scheduler_complete_enqueue_task\":\n                request = self.__get_request(audit_event_params[1])\n                request.add_enqueue_reservation_completion(time, audit_event_params[2])\n            elif audit_event_params[0] == \"node_monitor_enqueue_task_reservation\":\n                # TODO: actually implement this! is this useful?\n                request = self.__get_request(audit_event_params[1])\n                #request.add_node_monitor_enqueue_reservation(time, audit_event_params[2])\n            elif audit_event_params[0] == \"reservation_enqueued\":\n                self.__reservation_enqueued(time, audit_event_params[1], audit_event_params[3])\n            elif audit_event_params[0] == \"scheduler_assigned_task\":\n                 request = self.__get_request(audit_event_params[1])\n                 request.add_scheduler_task_launch(audit_event_params[2], time)\n                 request.add_scheduler_get_task(time, audit_event_params[3])\n            elif audit_event_params[0] == \"scheduler_get_task_no_task\":\n                request = self.__get_request(audit_event_params[1])\n                request.add_scheduler_get_task(time, audit_event_params[2])\n            elif audit_event_params[0] == \"node_monitor_task_launch\":\n                request = self.__get_request(audit_event_params[1])\n                request.add_node_monitor_task_launch(audit_event_params[2], audit_event_params[3],\n                                                     audit_event_params[4], audit_event_params[5],\n                                                     time)\n                if audit_event_params[4]:\n                  previous_request = self.__get_request(audit_event_params[4])\n                  previous_request.add_subsequent_task_launch(audit_event_params[5])\n            elif audit_event_params[0] == \"task_completed\":\n                request = self.__get_request(audit_event_params[1])\n                request.add_task_completion(audit_event_params[2], time)\n            elif audit_event_params[0] == \"node_monitor_get_task_launch\":\n                request = self.__get_request(audit_event_params[1])\n                request.add_node_monitor_get_task_launch(time, audit_event_params[2])\n            elif audit_event_params[0] == \"node_monitor_get_task_complete\":\n                request = self.__get_request(audit_event_params[1])\n                request.add_node_monitor_get_task_completion(time, audit_event_params[2])\n            elif audit_event_params[0] == \"node_monitor_get_task_no_task\":\n                previous_request = self.__get_request(audit_event_params[2])\n                previous_request.add_subsequent_task_launch_failure(audit_event_params[3])\n            else:\n                if audit_event_params[0] != \"node_monitor_cancellation\":\n                    self.__logger.warn(\"Received unknown audit event: \" + audit_event_params[0])\n\n        for request in self.__requests.values():\n            request.set_node_monitor_get_task_times_for_tasks()\n\n    def output_reservation_queue_lengths(self, output_directory):\n        \"\"\" Outputs the reservation queue length as a function of time, at each node monitor. \"\"\"\n        gnuplot_file = open(\"%s/reservation_queue_lengths.gp\" % output_directory, \"w\")\n        gnuplot_file.write(\"set terminal postscript color 'Helvetica' 12\\n\")\n        gnuplot_file.write(\"set output 'reservation_queue_length.ps'\\n\")\n        gnuplot_file.write(\"set xlabel 'Time (ms)'\\n\")\n        gnuplot_file.write(\"set ylabel 'Queue Length'\\n\")\n        gnuplot_file.write(\"plot \")\n        is_first = True\n        for (node_monitor_address, queue_lengths) in self.__node_monitor_queue_lengths.items():\n            results_filename = \"%s/%s_queue_lengths\" % (output_directory, node_monitor_address)\n            file = open(results_filename, \"w\")\n            file.write(\"time\\tQueue Length\\n\")\n            for time, queue_length in queue_lengths:\n                file.write(\"%s\\t%s\\n\" % (time - self.__earliest_time, queue_length))\n            file.close()\n            if not is_first:\n                gnuplot_file.write(\",\\\\\\n\")\n            is_first = False\n            gnuplot_file.write(\"'%s_queue_lengths' using 1:2 lw 1 with lp\" % node_monitor_address)\n\n    def output_per_node_queued_time(self, output_directory):\n        per_node_queued_times = {}\n        for request in self.__requests.values():\n            request.get_per_node_queued_times(per_node_queued_times)\n\n        file = open(os.path.join(output_directory, \"per_node_queued_times\"), \"w\")\n        file.write(\"NMAddress\\tQueuedtime(50th/90th/99th)\\n\")\n        for (node_monitor_address, queued_times) in per_node_queued_times.items():\n            queued_times.sort()\n            file.write(\"%s\\t%s\\t%s\\t%s\\n\" %\n                       (node_monitor_address, get_percentile(queued_times, 0.5),\n                        get_percentile(queued_times, 0.9), get_percentile(queued_times, 0.99)))\n        file.close()\n\n\n    def output_per_node_service_time(self, output_directory):\n        per_node_service_times = {}\n        for request in self.__requests.values():\n            request.get_service_times(per_node_service_times)\n\n        file = open(os.path.join(output_directory, \"per_node_service_times\"), \"w\")\n        file.write(\"NMAddress\\tServicetime(50th/90th/99th)\\n\")\n        for (node_monitor_address, service_times) in per_node_service_times.items():\n            service_times.sort()\n            file.write(\"%s\\t%s\\t%s\\t%s\\n\" %\n                       (node_monitor_address, get_percentile(service_times, 0.5),\n                        get_percentile(service_times, 0.9), get_percentile(service_times, 0.99)))\n        file.close()\n\n    def output_tasks_launched_versus_time(self, output_directory):\n        \"\"\" Creates a gnuplot file to plot tasks launched versus time for 10 requests in the\n            middle of the experiment. \"\"\"\n        gnuplot_file = open(\"%s/task_launches_vs_time.gp\" % output_directory, \"w\")\n        gnuplot_file.write(\"set terminal postscript color 'Helvetica' 12\\n\")\n        gnuplot_file.write(\"set output '%s/task_launches_vs_time.ps'\\n\" % output_directory)\n        gnuplot_file.write(\"set xlabel 'Time (ms)'\\n\")\n        gnuplot_file.write(\"set ylabel 'Tasks Launched'\\n\")\n        gnuplot_file.write(\"plot \")\n\n        job_count = 0\n        for id, request in self.__requests.items():\n            results_filename = \"%s/%s_tasks_launched_vs_time\" % (output_directory, id)\n            file = open(results_filename, \"w\")\n            arrival_time, reservation_replies = request.get_scheduler_get_task_times()\n            reservation_count = 0\n            file.write(\"0\\t0\\n\")\n            for reservation in reservation_replies:\n                reservation_count += 1\n                # Write the elapsed time since the request arrived.\n                file.write(\"%s\\t%s\\n\" % (reservation - arrival_time, reservation_count))\n            file.close()\n\n            if job_count != 0:\n                gnuplot_file.write(\",\\\\\\n\")\n            gnuplot_file.write(\"'%s' using 1:2 lw 1 with lp\" % results_filename)\n            job_count += 1\n            if job_count >= 20:\n                break\n        gnuplot_file.close()\n\n    def output_complete_incomplete_requests_vs_time(self, output_directory):\n        complete_requests = filter(lambda request: request.complete(), self.__requests.values())\n        complete_requests.sort(key=lambda request: request.arrival_time())\n\n        complete_requests_filename = \"complete_requests.data\"\n        complete_file = open(os.path.join(output_directory, complete_requests_filename), \"w\")\n        complete_file.write(\"ArrivalTime\\tCount\\n\")\n        for count, request in enumerate(complete_requests):\n            complete_file.write(\"%s\\t%s\\n\" %\n                                (request.arrival_time() - self.__earliest_time, count))\n        complete_file.close()\n\n        incomplete_requests = filter(lambda request: not request.complete(), self.__requests.values())\n        incomplete_requests.sort(key=lambda request: request.arrival_time())\n\n        incomplete_requests_filename = \"incomplete_requests.data\"\n        incomplete_file = open(os.path.join(output_directory, incomplete_requests_filename), \"w\")\n        incomplete_file.write(\"ArrivalTime\\tCount\\n\")\n        for count, request in enumerate(incomplete_requests):\n            incomplete_file.write(\"%s\\t%s\\n\" %\n                                  (request.arrival_time() - self.__earliest_time, count))\n        incomplete_file.close()\n\n        gnuplot_file = open(os.path.join(output_directory, \"complete_incomplete.gp\"), \"w\")\n        gnuplot_file.write(\"set terminal postscript color 'Helvetica' 12\\n\")\n        gnuplot_file.write(\"set output 'complete_incomplete.ps'\\n\")\n        gnuplot_file.write(\"set xlabel 'Experiment time (ms)'\\n\")\n        gnuplot_file.write(\"set ylabel 'Request Count'\\n\")\n        gnuplot_file.write(\"set xrange [0:]\\n\")\n        gnuplot_file.write(\"set yrange [0:]\\n\")\n        gnuplot_file.write(\"plot '%s' using 1:2 lw 4 with l title 'Complete',\\\\\\n\" %\n                           complete_requests_filename)\n        gnuplot_file.write(\"'%s' using 1:2 lw 4 with l title 'Incomplete'\\n\" %\n                           incomplete_requests_filename)\n\n    def output_tasks_completed_vs_arrival(self, output_directory):\n        pairs = [(request.arrival_time() - self.__earliest_time, request.complete_tasks())\n                 for request in self.__requests.values()]\n        pairs.sort(key=lambda x: x[0])\n\n        data_filename = \"tasks_completed_vs_arrival_time.data\"\n        data_file = open(os.path.join(output_directory, data_filename), \"w\")\n        data_file.write(\"ArrivalTime\\tTasksCompleted\\n\")\n        for pair in pairs:\n            data_file.write(\"%s\\t%s\\n\" % (pair[0], pair[1]))\n        data_file.close()\n\n        gnuplot_file = open(os.path.join(output_directory, \"tasks_completed_vs_arrival_time.gp\"),\n                            \"w\")\n        gnuplot_file.write(\"set terminal postscript color 'Helvetica' 12\\n\")\n        gnuplot_file.write(\"set output 'tasks_completed_vs_arrival_time.ps'\\n\")\n        gnuplot_file.write(\"set xlabel 'Experiment time (ms)'\\n\")\n        gnuplot_file.write(\"set ylabel 'Completed Tasks'\\n\")\n        gnuplot_file.write(\"set xrange [0:]\\n\")\n        gnuplot_file.write(\"set yrange [0:]\\n\")\n        gnuplot_file.write(\"plot '%s' using 1:2 lw 4 with p notitle\\n\" %\n                           data_filename)\n\n    def output_results(self, output_directory):\n        self.output_aggregate_stats(self.__requests, output_directory)\n        constrained_requests = dict((k, v) for (k, v) in self.__requests.items() if v.constrained)\n        self.output_aggregate_stats(constrained_requests, output_directory, \"constrained\")\n        unconstrained_requests = dict((k, v) for (k, v) in self.__requests.items() if not v.constrained)\n        self.output_aggregate_stats(unconstrained_requests, output_directory, \"unconstrained\")\n        return\n\n        for user in self.__users:\n            if user == \"warmupUser\":\n                continue\n            print \"Outputting stats for user \" + user\n            user_output_directory = os.path.join(output_directory, user)\n            os.mkdir(user_output_directory)\n            user_requests = dict((request_id,request) for (request_id, request) in\n                                 self.__requests.items() if request.user() == user)\n            self.output_aggregate_stats(user_requests, user_output_directory)\n            self.output_running_tasks(user_requests, user_output_directory)\n\n    def output_running_tasks(self, requests, output_directory):\n        \"\"\" Outputs the number of running tasks as a function of time, for the given requests. \"\"\"\n        TASK_START = 1\n        TASK_END = -1\n        events = []\n        for request in requests.values():\n            for (start_time, end_time) in request.start_and_end_times():\n                events.append((start_time, TASK_START))\n                events.append((end_time, TASK_END))\n        events.sort(key = lambda x: x[0])\n\n        running_tasks_filename = \"running_tasks\"\n        running_tasks_file = open(os.path.join(output_directory, running_tasks_filename), \"w\")\n        running_tasks_file.write(\"Time\\tNumTasksRunning\\n\")\n        task_count = 0\n        for event in events:\n            running_tasks_file.write(\"%s\\t%s\\n\" % (event[0], task_count))\n            task_count += event[1]\n            running_tasks_file.write(\"%s\\t%s\\n\" % (event[0], task_count))\n        running_tasks_file.close()\n\n        gnuplot_file = open(os.path.join(output_directory, \"running_tasks.gp\"), \"w\")\n        gnuplot_file.write(\"set terminal postscript color 'Helvetica' 12\\n\")\n        gnuplot_file.write(\"set output 'running_tasks.ps'\\n\")\n        gnuplot_file.write(\"set xlabel 'Time (ms)'\\n\")\n        gnuplot_file.write(\"set ylabel 'Running Tasks'\\n\")\n        gnuplot_file.write(\"set yrange [0:]\\n\")\n        gnuplot_file.write(\"plot '%s' using 1:2 lw 4 with lp notitle\\n\" %\n                           running_tasks_filename)\n\n    def output_aggregate_stats(self, requests, output_directory, name_suffix=\"\"):\n        # Overhead versus best possible response time of a request, given its service times\n        overheads = []\n\n        # Response time is the time from when the job arrived at a scheduler\n        # to when it completed.\n        response_times = []\n        # Network RTT for the enqueue reservation call.\n        enqueue_reservation_rtts = []\n\n        # Network RTT for get task call\n        get_task_rtts = []\n        # Time from when a task completed to when a new task was launched.\n        # TODO: add zeros here for all of the tasks that completed immediately.\n        get_new_task_times = []\n        service_times = []\n        # Used to look at the effects of jitting.\n        start_and_service_times = []\n        # Used to look at how the response time varies over the course of the experiment\n        start_and_response_times = []\n        queue_times = []\n        probe_times = []\n\n        get_task_task_counts = []\n\n        start_time = self.__earliest_time + (START_SEC * 1000)\n        end_time = self.__earliest_time + (END_SEC * 1000)\n\n        complete_requests = filter(lambda k: k.complete(), requests.values())\n        print \"Complete requests: %d\" % len(complete_requests)\n        if len(complete_requests) == 0:\n            print \"Incomplete request info:\"\n            for request in requests.values():\n                request.complete(True)\n            return\n        considered_requests = filter(lambda k: k.arrival_time() >= start_time and\n                                     k.arrival_time() <= end_time and\n                                     k.complete(), requests.values())\n        print \"Included %s requests\" % len(considered_requests)\n        print \"Excluded %s requests\" % (len(requests.values()) - len(considered_requests))\n        print \"Requests per second:\"\n        per_sec_requests = {}\n        for r in requests.values():\n          seconds_since_start = (r._Request__arrival_time - self.__earliest_time) / 1000\n          group = seconds_since_start - (seconds_since_start % REQUEST_COUNT_GRANUL)\n          per_sec_requests[group] = per_sec_requests.get(group, 0) + 1\n        for (group, g_requests) in sorted(per_sec_requests.items()):\n          print \"%s\\t%s\" % (group, g_requests)\n\n        for request in considered_requests:\n            scheduler_address = request.scheduler_address()\n            enqueue_reservation_rtts.extend(request.get_enqueue_reservation_rtts())\n            get_task_rtts.extend(request.get_get_task_rtts())\n            service_times.extend(request.service_times())\n            start_and_service_times.extend(request.start_and_service_times())\n            start_and_response_times.append((request.arrival_time(), request.response_time()))\n            queue_times.extend(request.queue_times())\n            response_time = request.response_time()\n            overheads.append(response_time - request.optimal_response_time())\n            response_times.append(response_time)\n            get_task_task_counts.extend(request.get_subsequent_task_launches())\n\n            previous_task_info = request.get_previous_tasks()\n            for (task_launch_time, previous_request_id, previous_task_id) in previous_task_info:\n                if previous_request_id in requests:\n                    previous_task_completion_time = requests[\n                            previous_request_id].get_task_completion(previous_task_id)\n                    if previous_task_completion_time != INVALID_TIME:\n                        get_new_task_times.append(task_launch_time - previous_task_completion_time)\n                    else:\n                        # TODO: something smarter here.\n                        get_new_task_times.append(0)\n\n        # Output data for response time and network delay CDFs.\n        results_filename = \"results%s.data\" % name_suffix\n        file = open(os.path.join(output_directory, results_filename), \"w\")\n        file.write(\"%ile\\tResponseTime\\tNetworkRTT(EnqueueRes.)\\tNetworkRTT(getTask)\\t\"\n                   \"NetworkRTT(combined)\\tGetNewTask\\tServiceTime\\tQueuedTime\\t\"\n                   \"GetTaskTaskCount\\tOverhead\\n\")\n        network_rtts = []\n        network_rtts.extend(enqueue_reservation_rtts)\n        network_rtts.extend(get_task_rtts)\n        network_rtts.sort()\n        response_times.sort()\n        enqueue_reservation_rtts.sort()\n        get_task_rtts.sort()\n        get_new_task_times.sort()\n        service_times.sort()\n        queue_times.sort()\n        get_task_task_counts.sort()\n        overheads.sort()\n\n        NUM_DATA_POINTS = 100\n        for i in range(NUM_DATA_POINTS):\n            i = float(i) / NUM_DATA_POINTS\n            file.write(\"%f\\t%d\\t%d\\t%d\\t%d\\t%d\\t%d\\t%d\\t%d\\t%d\\n\" % (i,\n                get_percentile(response_times, i),\n                get_percentile(enqueue_reservation_rtts, i),\n                get_percentile(get_task_rtts, i),\n                get_percentile(network_rtts, i),\n                get_percentile(get_new_task_times, i),\n                get_percentile(service_times, i),\n                get_percentile(queue_times, i),\n                get_percentile(get_task_task_counts, i),\n                get_percentile(overheads, i)))\n        file.close()\n\n        # Output summary CDFs.\n        gnuplot_file = open(\"%s/results.gp\" % output_directory, \"w\")\n        gnuplot_file.write(\"set terminal postscript color 'Helvetica' 12\\n\")\n        gnuplot_file.write(\"set output 'results.ps'\\n\")\n        gnuplot_file.write(\"set xlabel 'Milliseconds'\\n\")\n        gnuplot_file.write(\"set ylabel 'Cumulative Probability'\\n\")\n        gnuplot_file.write(\"set xrange [0:]\\n\")\n        gnuplot_file.write(\"set yrange [0:1]\\n\")\n        gnuplot_file.write(\"plot '%s' using 2:1 lw 4 with l title 'ResponseTime',\\\\\\n\" %\n                           results_filename)\n        gnuplot_file.write(\"'%s' using 4:1 lw 4 with l title 'GetTask RTT',\\\\\\n\" %\n                           results_filename)\n        gnuplot_file.write(\"'%s' using 3:1 lw 4 with l title 'Enqueue Reservation RTT',\\\\\\n\" %\n                           results_filename)\n        gnuplot_file.write(\"'%s' using 5:1 lw 4 with l title 'Network RTT',\\\\\\n\" %\n                           results_filename)\n        gnuplot_file.write(\"'%s' using 6:1 lw 4 with l title 'Get New Task Time',\\\\\\n\" %\n                           results_filename)\n        gnuplot_file.write(\"'%s' using 7:1 lw 4 with l title 'Service Time',\\\\\\n\" %\n                           results_filename)\n        gnuplot_file.write(\"'%s' using 10:1 lw 4 with l title 'Overhead vs Optimal',\\\\\\n\" %\n                           results_filename)\n        gnuplot_file.write(\"'%s' using 8:1 lw 4 with l title 'Queue Time'\\n\" %\n                           results_filename)\n\n        # Output network RTTs.\n        rtt_gnuplot_file = open(\"%s/network_rtts.gp\" % output_directory, \"w\")\n        rtt_gnuplot_file.write(\"set terminal postscript color 'Helvetica' 12\\n\")\n        rtt_gnuplot_file.write(\"set output 'network_rtts.ps'\\n\")\n        rtt_gnuplot_file.write(\"set xlabel 'Milliseconds'\\n\")\n        rtt_gnuplot_file.write(\"set ylabel 'Cumulative Probability'\\n\")\n        rtt_gnuplot_file.write(\"set xrange [0:]\\n\")\n        rtt_gnuplot_file.write(\"set yrange [0:1]\\n\")\n        rtt_gnuplot_file.write(\"plot '%s' using 5:1 lw 4 with l title 'Network RTT (all)',\\\\\\n\" %\n                               results_filename)\n        rtt_gnuplot_file.write(\"'%s' using 3:1 lw 4 with l title 'EnqueueReservations() RTT',\\\\\\n\" %\n                               results_filename)\n        rtt_gnuplot_file.write(\"'%s' using 4:1 lw 4 with l title 'GetTask() RTT'\" %\n                               results_filename)\n        rtt_gnuplot_file.close()\n\n        # Output get task task counts.\n        get_task_gnuplot_file = open(\"%s/get_task_counts.gp\" % output_directory, \"w\")\n        get_task_gnuplot_file.write(\"set terminal postscript color 'Helvetica' 12\\n\")\n        get_task_gnuplot_file.write(\"set output 'get_task_counts.ps'\\n\")\n        get_task_gnuplot_file.write(\"set xlabel 'Task count'\\n\")\n        get_task_gnuplot_file.write(\"set ylabel 'Cumulative Probability'\\n\")\n        get_task_gnuplot_file.write(\"set xrange [0:]\\n\")\n        get_task_gnuplot_file.write(\"set yrange [0:1]\\n\")\n        get_task_gnuplot_file.write(\"plot '%s' using 9:1 lw 4 with l title 'Get task task count'\" %\n                                    results_filename)\n        get_task_gnuplot_file.close()\n\n        # Output task run time as a function of start time.\n        start_and_service_times.sort(key = lambda x: x[0])\n        start_and_response_times.sort(key = lambda x: x[0])\n        first_start_time = start_and_service_times[0][0]\n        stride = max(1, len(start_and_service_times) / 500)\n        start_and_service_filename = \"start_and_service_time.data\"\n        start_and_service_file = open(os.path.join(output_directory, start_and_service_filename),\n                                      \"w\")\n        for start_time, service_time in start_and_service_times[::stride]:\n            start_and_service_file.write(\"%s\\t%s\\n\" % (start_time - first_start_time,\n                                                       service_time))\n        start_and_service_file.close();\n\n        start_and_response_filename = \"start_and_response_time.data\"\n        start_and_response_file = open(os.path.join(output_directory, start_and_response_filename),\n                                       \"w\")\n        for arrival_time, response_time in start_and_response_times:\n            start_and_response_file.write(\"%s\\t%s\\n\" % (arrival_time - first_start_time,\n                                                        response_time))\n        start_and_response_file.close()\n\n        start_and_service_gnuplot_file = open(\"%s/response_and_service_vs_arrival.gp\" % output_directory,\n                                              \"w\")\n        start_and_service_gnuplot_file.write(\"set terminal postscript color\\n\")\n        start_and_service_gnuplot_file.write(\"set output 'response_and_service_vs_arrival.ps'\\n\")\n        start_and_service_gnuplot_file.write(\"set xlabel 'Time'\\n\")\n        start_and_service_gnuplot_file.write(\"set yrange [0:]\\n\")\n        start_and_service_gnuplot_file.write(\"set ylabel 'Milliseconds\\n\")\n        start_and_service_gnuplot_file.write((\"plot '%s' using 1:2 with lp lw 4 title 'Task \"\n                                              \"Service Time',\\\\\\n\") % start_and_service_filename)\n        start_and_service_gnuplot_file.write(\"'%s' using 1:2 with lp lw 4 title 'Response Time'\" %\n                                             start_and_response_filename)\n        start_and_service_gnuplot_file.close()\n\n        self.plot_response_time_cdf(results_filename, output_directory)\n\n        summary_file = open(os.path.join(output_directory, \"response_time_summary\"), \"w\")\n        summary_file.write(\"%s %s %s %s\\n\" % (get_percentile(response_times, .05),\n                                              get_percentile(response_times, 0.5),\n                                              get_percentile(response_times, .95),\n                                              get_percentile(response_times, .99)))\n        summary_file.close()\n\n    def plot_response_time_cdf(self, results_filename, output_directory):\n        gnuplot_file = open(\"%s/response_time_cdf.gp\" % output_directory, \"w\")\n        gnuplot_file.write(\"set terminal postscript color\\n\")\n        #gnuplot_file.write(\"set size 0.5,0.5\\n\")\n        gnuplot_file.write(\"set output '%s/response_time_cdf.ps'\\n\" %\n                           output_directory)\n        gnuplot_file.write(\"set xlabel 'Response Time (ms)'\\n\")\n        gnuplot_file.write(\"set ylabel 'Cumulative Probability'\\n\")\n        gnuplot_file.write(\"set yrange [0:1]\\n\")\n        gnuplot_file.write(\"plot '%s' using 2:1 lw 4 with lp\\\\\\n\" %\n                           results_filename)\n        gnuplot_file.close()\n\n    def __reservation_enqueued(self, time, ip_address, num_queued_reservations):\n        if ip_address not in self.__node_monitor_queue_lengths:\n            self.__node_monitor_queue_lengths[ip_address] = []\n        self.__node_monitor_queue_lengths[ip_address].append((time, num_queued_reservations))\n\n    def __get_request(self, request_id):\n        \"\"\" Gets the request from the map of requests.\n\n        Creates a new request if a request with the given ID doesn't already\n        exist.\n        \"\"\"\n        if request_id not in self.__requests:\n            self.__requests[request_id] = Request(request_id)\n        return self.__requests[request_id]\n\ndef main(argv):\n    PARAMS = [\"log_dir\", \"output_dir\", \"start_sec\", \"end_sec\"]\n    if \"help\" in argv[0]:\n        print (\"Usage: python parse_logs.py \" +\n               \" \".join([\"[%s=v]\" % k for k in PARAMS]))\n        return\n\n    log_parser = LogParser()\n\n    log_files = []\n    output_dir = \"experiment\"\n    for arg in argv:\n        kv = arg.split(\"=\")\n        if kv[0] == PARAMS[0]:\n            log_dir = kv[1]\n            unqualified_log_files = filter(lambda x: \"sparrow_audit\" in x,\n                                           os.listdir(log_dir))\n            log_files = [os.path.join(log_dir, filename) for \\\n                         filename in unqualified_log_files]\n        elif kv[0] == PARAMS[1]:\n            output_dir = kv[1]\n        elif kv[0] == PARAMS[2]:\n            global START_SEC\n            START_SEC = int(kv[1])\n        elif kv[0] == PARAMS[3]:\n            global END_SEC\n            END_SEC = int(kv[1])\n        else:\n            print \"Warning: ignoring parameter %s\" % kv[0]\n\n    if len(log_files) == 0:\n        print \"No valid log files found!\"\n        return\n\n    logging.basicConfig(level=logging.DEBUG)\n\n    for filename in log_files:\n        log_parser.parse_file(filename)\n\n    if not os.path.exists(output_dir):\n        os.mkdir(output_dir)\n\n    print \"Outputting reservation queue length versus time\"\n    log_parser.output_reservation_queue_lengths(output_dir)\n\n    print \"Outputting tasks launched versus time\"\n    log_parser.output_tasks_launched_versus_time(output_dir)\n\n    print \"Outputting general results\"\n    log_parser.output_results(output_dir)\n    log_parser.output_complete_incomplete_requests_vs_time(output_dir)\n    log_parser.output_tasks_completed_vs_arrival(output_dir)\n    log_parser.output_per_node_service_time(output_dir)\n    log_parser.output_per_node_queued_time(output_dir)\n\n    print \"Outputting constrained/unconstrained results\"\n    constrained_requests = dict((request_id,request) for (request_id, request) in\n                                 log_parser.get_requests().items() if request.constrained)\n    print \"%s constrained\" % len(constrained_requests)\n    log_parser.output_aggregate_stats(constrained_requests, output_dir, \"_constrained\")\n\n    unconstrained_requests = dict((request_id,request) for (request_id, request) in\n                                 log_parser.get_requests().items() if not request.constrained)\n    print \"%s unconstrained\" % len(unconstrained_requests)\n    log_parser.output_aggregate_stats(unconstrained_requests, output_dir, \"_unconstrained\")\n\nif __name__ == \"__main__\":\n    main(sys.argv[1:])\n"
  },
  {
    "path": "src/main/python/parse_logs.sh",
    "content": "#!/bin/sh\n\n#\n# Copyright 2013 The Regents of The University California\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#   http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n\ncd \"`dirname $0`\"\nPYTHONPATH=\"$PYTHONPATH:third_party\" python parse_logs.py $@\n\n"
  },
  {
    "path": "src/main/python/parse_per_task_logs.py",
    "content": "\"\"\" Parses a log file and outputs aggregated information about the experiment.\n\nAll times are in milliseconds unless otherwise indicated.\n\nTODO(kay): Generally, make things fail more gracefully, since it's possible\n(and likely) that we'll see anomalies in the log files, but we still want to\nget as much info as possible out of them.\n\"\"\"\nimport functools\nimport logging\nimport math\nimport os\nimport re\nimport sys\nimport stats\nimport time\n\nINVALID_TIME = 0\nINVALID_TIME_DELTA = -sys.maxint - 1\nINVALID_QUEUE_LENGTH = -1\nINVALID_ID = -1\nTPCH_QUERY_ID_REGEX = re.compile('--(\\d+) (\\d+)--')\n\nSTART_SEC = 200\nEND_SEC = 300\n\n\"\"\" from http://code.activestate.com/\n         recipes/511478-finding-the-percentile-of-the-values/ \"\"\"\ndef get_percentile(N, percent, key=lambda x:x):\n    \"\"\" Find the percentile of a list of values.\n\n    Args:\n      percent: a float value from 0.0 to 1.0.\n      key: optional key function to compute value from each element of N.\n\n    Returns:\n      The percentile of the values\n    \"\"\"\n    if not N:\n        return 0\n    k = (len(N)-1) * percent\n    f = math.floor(k)\n    c = math.ceil(k)\n    if f == c:\n        return key(N[int(k)])\n    d0 = key(N[int(f)]) * (c-k)\n    d1 = key(N[int(c)]) * (k-f)\n    return d0+d1\n\nclass Probe:\n    def __init__(self, request_id, address):\n        self.request_id = request_id\n        self.address = address\n        self.launch_time = INVALID_TIME\n        self.received_time = INVALID_TIME\n        self.completion_time = INVALID_TIME\n        self.queue_length = INVALID_QUEUE_LENGTH\n        self.__logger = logging.getLogger(\"Probe\")\n\n    def set_queue_length(self, queue_length):\n        if self.queue_length != INVALID_QUEUE_LENGTH:\n            self.__logger.warn((\"Two queue lengths for request %s on machine %s\"\n                                \"expected only launch one\") %\n                              (self.request_id, self.address))\n        self.queue_length = int(queue_length)\n\n    def set_launch_time(self, time):\n        if self.launch_time != INVALID_TIME:\n            self.__logger.warn((\"Probe for request %s on machine %s launched \"\n                              \"twice; expect it to only launch once\") %\n                              (self.request_id, self.address))\n        self.launch_time = time\n\n    def set_received_time(self, time):\n        if self.received_time != INVALID_TIME:\n            self.__logger.warn((\"Probe for request %s on machine %s received \"\n                              \"twice; expect it to only be received once\") %\n                             (self.request_id, self.address))\n        self.received_time = time\n\n    def set_completion_time(self, time):\n        if self.completion_time != INVALID_TIME:\n            self.__logger.warn((\"Probe for request %s on machine %s completed \"\n                              \"twice; expect it to only launch once\") %\n                             (self.request_id, self.address))\n        self.completion_time = time\n\n    def complete(self):\n        \"\"\" Returns whether there's complete log information for this probe.\"\"\"\n\tif self.launch_time == INVALID_TIME:\n\t  print \"Missing probe launch time\"\n          return False\n        if self.received_time == INVALID_TIME:\n          print \"Missing probe received time\"\n          return False\n        if self.completion_time == INVALID_TIME:\n          print \"Missing probe completion time\"\n          return False\n        return True\n\n    def round_trip_time(self):\n        \"\"\" Returns the delay experienced by the probing machine. \"\"\"\n        return self.completion_time - self.launch_time\n\n    def get_clock_skew(self):\n        \"\"\" Returns the clock skew of the probed machine.\n\n        Returns the number of milliseconds by which the probed machine is ahead\n        of the probing machine.  The caller should verify that complete\n        information is available for this probe before calling this function.\n\n        Ignores processing time at the node monitor, which we assume to be\n        small.\n        \"\"\"\n        expected_received_time = (self.launch_time + self.completion_time) / 2.\n        return self.received_time - expected_received_time\n\n\nclass Task:\n    \"\"\" Class to store information about a task.\n\n\t\t\t  We store a variety of events corresponding to each task launch,\n        as described in __init__\n    \"\"\"\n    def __init__(self, id):\n        self.__logger = logging.getLogger(\"Task\")\n\n        # When the scheduler (resident with the frontend) launched the task\n        self.scheduler_launch_time = INVALID_TIME\n        # When the node monitor queued the task for execution\n        self.node_monitor_submit_time = INVALID_TIME\n        # When the node monitor (resident with the backend) launched the task\n        self.node_monitor_launch_time = INVALID_TIME\n        # When the backend completed the task\n        self.completion_time = INVALID_TIME\n        # Estimate of the millis by which the machine this task ran on is\n        # ahead of the node the task was scheduled from.\n        self.clock_skew = INVALID_TIME_DELTA\n        # Address of the machine that the task ran on.\n        self.address = \"\"\n        self.id = id\n\n    def set_scheduler_launch_time(self, time):\n        if self.scheduler_launch_time != INVALID_TIME:\n            self.__logger.warn((\"Task %s launched at scheduler twice; expect \"\n                              \"task to only launch once\") % id)\n        self.scheduler_launch_time = time\n\n    def set_node_monitor_launch_time(self, address, time):\n        if self.node_monitor_launch_time != INVALID_TIME:\n            self.__logger.warn((\"Task %s launched at %s twice; expect task to \"\n                              \"only launch once\") % (id, address))\n        self.node_monitor_launch_time = time\n\n    def set_node_monitor_submit_time(self, address, time):\n        if self.node_monitor_submit_time != INVALID_TIME:\n            self.__logger.warn((\"Task %s submitted at %s twice; expect task to \"\n                                \"only submit once\") % (id, address))\n        self.node_monitor_submit_time = time\n        self.address = address\n\n    def set_completion_time(self, time):\n        if self.completion_time != INVALID_TIME:\n            self.__logger.warn((\"Task %s completed twice; \"\n                              \"expect task to only complete once\") % id)\n        self.completion_time = time\n\n    def network_delay(self):\n        \"\"\" Returns the network delay (as the difference between launch times).\n\n        In the presence of clock skew, this may be negative. The caller should\n        ensure that complete information is available for this task before\n        calling this function.\n        \"\"\"\n        return (self.node_monitor_submit_time - self.clock_skew -\n                self.scheduler_launch_time)\n\n    def queued_time(self):\n        \"\"\" Returns the time spent waiting to launch on the backend. \"\"\"\n        return (self.node_monitor_launch_time - self.node_monitor_submit_time)\n\n    def service_time(self):\n        \"\"\" Returns the service time (time executing on backend).\"\"\"\n        return (self.completion_time - self.node_monitor_launch_time)\n\n    def complete(self):\n        \"\"\" Returns whether we have complete information on this task. \"\"\"\n        if self.scheduler_launch_time == INVALID_TIME:\n          print \"Missing task scheduler launch time\"\n          return False\n        if self.node_monitor_launch_time == INVALID_TIME:\n\t  print \"Missing task node monitor launch time\"\n\t  return False\n\tif self.completion_time == INVALID_TIME:\n\t  print \"Missing task completion time\"\n\t  return False\n\tif self.clock_skew == INVALID_TIME_DELTA:\n          print \"Missing task clock skew\"\n\t  return False\n\treturn True\n\nclass Request:\n    def __init__(self, id):\n        self.__id = id\n        self.__num_tasks = 0\n        self.__arrival_time = INVALID_TIME\n        self.__tasks = {}\n        # Map of machine addresses to probes.\n        self.__probes = {}\n        # Address of the scheduler that received the request (and placed it).\n        self.__scheduler_address = \"\"\n        self.__logger = logging.getLogger(\"Request\")\n        \n        self.__user = \"\"\n\n        # TPCH query number.\n        self.tpch_id = INVALID_ID\n        # Unique query identifier assigned by shark (used to differentiate\n        # different executions of the same TPC-H query).\n        self.shark_id = INVALID_ID\n        # Spark stage ID\n        self.stage_id = INVALID_ID\n        self.constrained = False\n\n    def __str__(self):\n        ret = \"ID %s SHARK %s (stage %s), Constrained %s TPCH %s, %s tasks: \" % (self.__id, self.shark_id, self.stage_id, self.constrained, self.tpch_id, len(self.__tasks))\n        return ret\n\n    def probe_stats(self):\n        probe_items_sorted = \\\n          sorted(self.__probes.items(), key=lambda k:k[1].completion_time)\n        # print [\"%s \" % x[1].completion_time for x in probe_items_sorted]\n        machines_sorted = [k[0] for k in probe_items_sorted]\n\n        out = []\n        for (i, machine) in enumerate(machines_sorted):\n            for task in self.__tasks.values():\n                if task.address == machine:\n                    out.append(i)\n        return out\n\n\n    def add_arrival(self, time, num_tasks, address, user, description, constrained):\n        self.__arrival_time = time\n        self.__num_tasks = int(num_tasks)\n        self.__scheduler_address = address\n        self.constrained = False\n        if constrained == \"true\":\n          self.constrained = True\n        description_parts = description.split(\"-\")\n        if len(description_parts) < 2:\n            print \"Description not formatted as Spark/Shark description: \" + description\n        else:\n            self.stage_id = description_parts[-1]\n            match = TPCH_QUERY_ID_REGEX.search(description)\n            if match == None:\n                is_warmup_query = (description.find(\"SPREAD_EVENLY\") != -1)\n                is_create_table_query = (description.find(\"create table denorm\") != -1)\n                if not (is_warmup_query or is_create_table_query):\n                    self.__logger.warn(\"Couldn't find TPCH query id in description: %s\" % description)\n                return\n            # An identifier that's unique for the Shark driver, but not across all drivers.\n            self.shark_id = match.group(1)\n            self.tpch_id = match.group(2)\n            #print (\"Shark ID: %s, stage id: %s, TPCH id: %s for description %s\" %\n            #    (self.shark_id, self.stage_id, self.tpch_id, description))\n\n    def add_probe_launch(self, address, time):\n        probe = self.__get_probe(address)\n        probe.set_launch_time(time)\n\n    def add_probe_received(self, address, time):\n        probe = self.__get_probe(address)\n        probe.set_received_time(time)\n\n    def add_probe_completion(self, address, queue_length, time):\n        probe = self.__get_probe(address)\n        probe.set_completion_time(time)\n        probe.set_queue_length(queue_length)\n\n    def add_scheduler_task_launch(self, task_id, launch_time):\n        task = self.__get_task(task_id)\n        task.set_scheduler_launch_time(launch_time)\n\n    def add_node_monitor_task_launch(self, address, task_id, launch_time):\n        task = self.__get_task(task_id)\n        task.set_node_monitor_launch_time(address, launch_time)\n\n    def add_node_monitor_task_submit(self, address, task_id, submit_time):\n        task = self.__get_task(task_id)\n        task.set_node_monitor_submit_time(address, submit_time)\n\n    def add_task_completion(self, task_id, completion_time):\n        # We might see a task completion before a task launch, depending on the\n        # order that we read log files in.\n        task = self.__get_task(task_id)\n        task.set_completion_time(completion_time)\n\n    def set_clock_skews(self):\n        \"\"\" Sets the clock skews for all tasks. \"\"\"\n        for task in self.__tasks.values():\n            if task.address not in self.__probes:\n                #print self.__probes.keys()\n                #self.__logger.warn((\"No probe information for request %s, \"\n                #                  \"machine %s\") % (self.__id, task.address))\n                continue\n            probe = self.__probes[task.address]\n            if not probe.complete():\n                self.__logger.warn((\"Probe information for request %s, machine \"\n                                  \"%s incomplete\") % (self.__id, task.address))\n            else:\n                task.clock_skew = probe.get_clock_skew()\n\n    def arrival_time(self):\n        \"\"\" Returns the time at which the task arrived at the scheduler. \"\"\"\n        return self.__arrival_time\n\n    def scheduler_address(self):\n        return self.__scheduler_address\n\n    def clock_skews(self):\n        \"\"\" Returns a map of machines to clock skews.\n\n        Clock skews are given relative to the scheduler.\n        \"\"\"\n        clock_skews = {}\n        for address, probe in self.__probes.items():\n            clock_skews[address] = probe.get_clock_skew()\n        return clock_skews\n\n    def network_delays(self):\n        \"\"\" Returns a list of delays for all __tasks with delay information. \"\"\"\n        network_delays = []\n        for task in self.__tasks.values():\n            if task.complete():\n                network_delays.append(task.network_delay())\n                if task.network_delay() > 20:\n                  print \"Network delay over 20ms for %s\" % self.__id\n                  #print task.node_monitor_submit_time\n                  #print task.scheduler_launch_time\n                  #print task.clock_skew\n                  #print task.id\n                  #print task.address\n                  #print\n        return network_delays\n\n    def service_times(self):\n        \"\"\" Returns a list of service times for complete __tasks. \"\"\"\n        service_times = []\n        for task in self.__tasks.values():\n            if task.complete():\n                x = task.service_time()\n                service_times.append(task.service_time())\n        return service_times\n\n    def optimal_response_time(self):\n        return max([t.service_time() for t in self.__tasks.values()])\n\n    def queue_times(self):\n        \"\"\" Returns a list of queue times for all complete __tasks. \"\"\"\n        queue_times = []\n        for task in self.__tasks.values():\n            if task.complete():\n                queue_times.append(task.queued_time())\n        return queue_times\n\n    def probe_times(self):\n        \"\"\" Returns a list of probe delays for all complete __probes. \"\"\"\n        probe_times = []\n        for probe in self.__probes.values():\n            if probe.complete():\n                if probe.round_trip_time() > 20:\n                  \"Long probe: %s \" %self.__id\n                probe_times.append(probe.round_trip_time())\n        return probe_times\n\n    def receive_and_probing_time(self):\n        \"\"\" Returns the time from when the request arrived until the last probe completed. \"\"\"\n        latest_completion = 0\n        for probe in self.__probes.values():\n\t\t  \t    if probe.complete():\n\t\t\t  \t\t    latest_completion = max(latest_completion, probe.completion_time)\n        return latest_completion - self.__arrival_time\n\n    def queue_lengths(self):\n       \"\"\" Returns an array of queue lengths observed during all probes. \"\"\"\n       out = []\n       for probe in self.__probes.values():\n         if probe.complete():\n           out.append(probe.queue_length)\n       return out\n\n    def probing_time(self):\n       \"\"\" Returns the total time spent in probing for this request. \"\"\"\n       earliest_launch = (time.time() * 1000)**2\n       latest_completion = 0\n       for probe in self.__probes.values():\n           if probe.complete():\n               earliest_launch = min(earliest_launch, probe.launch_time)\n               latest_completion = max(latest_completion, probe.completion_time)\n       return latest_completion - earliest_launch\n\n    def worst_necessary_probe_time(self):\n      \"\"\" Returns the nth longest probe time, where n is the number of tasks.\n\n          This represents the thoeretical limit of the minimum time we could\n          have spent probing that actually gets a probe from as many machines\n          as we have tasks. Note that in practice, if we are only waiting\n          for ||tasks|| machines to respond we might as well just send the\n          tasks randomly. \"\"\"\n      probe_times = self.probe_times()\n      num_tasks = len(self.__tasks)\n      if len(probe_times) < num_tasks:\n        self.__logger.warn(\"Fewer probes send than tasks for task %s.\"\n                           % self.__id)\n\n      if len(probe_times) == 0:\n        return 0\n      return sorted(probe_times)[min(num_tasks - 1, len(probe_times) - 1)]\n\n    def response_time(self, incorporate_skew=True):\n        \"\"\" Returns the time from when the task arrived to when it completed.\n\n        Returns -1 if we don't have completion information on the task.  Note\n        that we may have information about when the task completed, but not\n        complete information about the task (e.g. we don't know when the task\n        was launched).\n\n        Arguments:\n            incorporate_skew: Boolean specifying whether to incorporate the\n                perceived skew in the response time.\n        \"\"\"\n        if self.__arrival_time == INVALID_TIME:\n            self.__logger.debug(\"Request %s missing arrival time\" % self.__id)\n            return -1\n        completion_time = self.__arrival_time\n        for task_id, task in self.__tasks.items():\n            if task.completion_time == INVALID_TIME:\n                self.__logger.debug((\"Task %s in request %s missing completion \"\n                                   \"time\") % (task_id, self.__id))\n                return INVALID_TIME_DELTA\n            task_completion_time = task.completion_time\n            if incorporate_skew:\n                task_completion_time -= task.clock_skew\n                # Here we compare two event times: the completion time, as\n                # observed the the node monitor, minus the clock skew; and the\n                # job arrival time, as observed by the scheduler.  If the\n                # adjusted completion time is before the arrival time, we know\n                # we've made an error in calculating the clock skew.clock_skew\n                if task_completion_time < self.__arrival_time:\n                    self.__logger.warn((\"Task %s in request %s has estimated \"\n                                        \"completion time before arrival time, \"\n                                        \"indicating inaccuracy in clock skew \"\n                                        \"computation.\") % (task_id, self.__id))\n            else:\n             \tif task.scheduler_launch_time > task.node_monitor_launch_time:\n\t\t\t\t\t\t\t\tself.__logger.warn(\"Task %s suggests clock skew: \" % task_id)\n            completion_time = max(completion_time, task_completion_time)\n\n        if (completion_time - self.__arrival_time) > 2000:\n          pass\n          \"\"\"\n          print \"TRUE: %s\" % (completion_time - self.__arrival_time)\n          print self.network_delays()\n          print self.service_times()\n          print self.probing_time()\n          print \"EST: %s\" % (max(self.service_times()) + max(self.network_delays()) + self.probing_time())\n          \"\"\"\n        return completion_time - self.__arrival_time\n\n    def complete(self):\n        \"\"\" Returns whether we have complete info for the request.\n\n        Due to incomplete log files, it's possible that we'll have completion\n        information but not start information for a job. \"\"\"\n        if (self.__num_tasks == 0 or\n            self.__arrival_time == 0 or\n            self.__num_tasks != len(self.__tasks)):\n            print (\"Expected to find %s tasks; found %s\" %\n                   (self.__num_tasks, len(self.__tasks)))\n            return False\n        for task in self.__tasks.values():\n            if not task.complete():\n                return False\n        if len(self.__probes) == 0:\n          return False # Don't consider non-probing requests\n        return True\n\n    def __get_task(self, task_id):\n        \"\"\" Gets the task from the map of __tasks.\n\n        Creates a new task if the task with the given ID doesn't already\n        exist.\n        \"\"\"\n        if task_id not in self.__tasks:\n            self.__tasks[task_id] = Task(task_id)\n        return self.__tasks[task_id]\n\n    def __get_probe(self, address):\n        \"\"\" Gets the probe from the map of __probes.\n\n        Creates a new probe if the probe with the given address doesn't already\n        exist.\n        \"\"\"\n        if address not in self.__probes:\n            self.__probes[address] = Probe(self.__id, address)\n        return self.__probes[address]\n\nclass LogParser:\n    \"\"\" Helps extract job information from log files.\n\n    Attributes:\n        requests: A map of strings specifying request IDs to jobs.\n    \"\"\"\n    CLASS_INDEX = 0\n    TIME_INDEX = 1\n    AUDIT_EVENT_INDEX = 2\n\n    def __init__(self):\n        self.__requests = {}\n        self.__logger = logging.getLogger(\"LogParser\")\n        self.__earliest_time = (time.time() * 1000)**2\n\n    def earliest_time(self):\n        return self.__earliest_time\n\n    def get_requests(self):\n        return self.__requests\n\n    def parse_file(self, filename):\n        file = open(filename, \"r\")\n        for line in file:\n            # Strip off the newline at the end of the line.\n            items = line[:-1].split(\"\\t\")\n\n            # Time is expressed in epoch milliseconds.\n            time = int(items[self.TIME_INDEX])\n            self.__earliest_time = min(self.__earliest_time, time)\n\n            audit_event_params = \" \".join(items[self.AUDIT_EVENT_INDEX:]).split(\":\")\n            if audit_event_params[0] == \"arrived\":\n                request = self.__get_request(audit_event_params[1])\n                request.add_arrival(time, audit_event_params[2],\n                                    audit_event_params[3], audit_event_params[5],\n                                    audit_event_params[6], audit_event_params[7])\n            elif audit_event_params[0] == \"probe_launch\":\n                request = self.__get_request(audit_event_params[1])\n                request.add_probe_launch(audit_event_params[2], time)\n            elif audit_event_params[0] == \"probe_received\":\n                request = self.__get_request(audit_event_params[1])\n                request.add_probe_received(audit_event_params[2], time)\n            elif audit_event_params[0] == \"probe_completion\":\n                request = self.__get_request(audit_event_params[1])\n                request.add_probe_completion(audit_event_params[2],\n                                             audit_event_params[3], time)\n            elif audit_event_params[0] == \"scheduler_launch\":\n                self.__add_scheduler_task_launch(audit_event_params[1],\n                                                 audit_event_params[2], time)\n            elif audit_event_params[0] == \"nodemonitor_task_runnable\":\n                self.__add_node_monitor_task_launch(audit_event_params[1],\n                                                    audit_event_params[2],\n                                                    audit_event_params[3],\n                                                    time)\n            elif audit_event_params[0] == \"nodemonitor_task_submitted\":\n                self.__add_node_monitor_task_submit(audit_event_params[1],\n                                                    audit_event_params[2],\n                                                    audit_event_params[3],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttime)\n            elif audit_event_params[0] == \"nodemonitor_task_completed\":\n                # First param = ip address is not used\n                self.__add_task_completion(audit_event_params[1],\n                                           audit_event_params[2], time)\n            else:\n              print \"Unexpected event: \" + audit_event_params[0]\n\n    def output_results(self, file_prefix, constrained=\"\"):\n        # Response time is the time from when the job arrived at a scheduler\n        # to when it completed.\n        response_times = []\n        # Network/processing delay for each task.\n        network_delays = []\n        service_times = []\n        queue_times = []\n        probe_times = []\n        probing_times = []\n        queue_lengths = []\n        rcv_probing_times = []\n        worst_probe_times = []\n        overheads = []\n        # Store clock skews as a map of pairs of addresses to a list of\n        # (clock skew, time) pairs. Store addresses in tuple in increasing\n        # order, so that we get the clock skew calculated in both directions.\n        clock_skews = {}\n        start_time = self.__earliest_time + (START_SEC * 1000)\n        end_time = self.__earliest_time + (END_SEC * 1000)\n        for request in self.__requests.values():\n          request.set_clock_skews()\n\n        complete_requests = filter(lambda k: k.complete(),\n                                   self.__requests.values())\n        print \"%s complete requests\" % len(complete_requests)\n        considered_requests = filter(lambda k: k.arrival_time() >= start_time and\n                                     k.arrival_time() <= end_time and\n                                     k.complete(),\n                                     self.__requests.values())\n        if constrained == \"constrained\":\n          considered_requests = filter(lambda x: x.constrained, self.__requests.values())\n        elif constrained == \"unconstrained\":\n          considered_requests = filter(lambda x: not x.constrained, self.__requests.values())\n        print \"Included %s requests\" % len(considered_requests)\n        print \"Excluded %s requests\" % (len(self.__requests.values()) - len(considered_requests))\n        for request in considered_requests:\n            scheduler_address = request.scheduler_address()\n            for address, probe_skew in request.clock_skews().items():\n                if address > scheduler_address:\n                    address_pair = (scheduler_address, address)\n                    skew = probe_skew\n                else:\n                    address_pair = (address, scheduler_address)\n                    skew = -probe_skew\n                if address_pair not in clock_skews:\n                    clock_skews[address_pair] = []\n                clock_skews[address_pair].append((skew,\n                                                  request.arrival_time()))\n\n            network_delays.extend(request.network_delays())\n            service_times.extend(request.service_times())\n            queue_times.extend(request.queue_times())\n            response_time = request.response_time()\n            probe_times.extend(request.probe_times())\n            probing_times.append(request.probing_time())\n            queue_lengths.extend(request.queue_lengths())\n            rcv_probing_times.append(request.receive_and_probing_time())\n            worst_probe_times.append(request.worst_necessary_probe_time())\n            response_times.append(response_time)\n            overheads.append(response_time - request.optimal_response_time())\n\n        # Output data for response time and network delay CDFs.\n        results_filename = \"%s_results%s.data\" % (file_prefix, constrained)\n        file = open(results_filename, \"w\")\n        file.write(\"%ile\\tResponseTime\\tNetworkDelay\\tServiceTime\\tQueuedTime\\tProbeTime\\tRcvProbingTime\\tProbingTime\\tWorstProbeTime\\tQueueLength\\tOverhead\\n\")\n        num_data_points = 100\n        response_times.sort()\n        network_delays.sort()\n        service_times.sort()\n        queue_times.sort()\n        queue_lengths.sort()\n        probe_times.sort()\n        probing_times.sort()\n        rcv_probing_times.sort()\n        worst_probe_times.sort()\n        overheads.sort()\n\n\n        for i in range(100):\n            i = float(i) / 100\n            file.write(\"%f\\t%d\\t%d\\t%d\\t%d\\t%d\\t%d\\t%d\\t%d\\t%d\\t%d\\n\" % (i,\n                get_percentile(response_times, i),\n                get_percentile(network_delays, i),\n                get_percentile(service_times, i),\n                get_percentile(queue_times, i),\n                get_percentile(probe_times, i),\n                get_percentile(rcv_probing_times, i),\n                get_percentile(probing_times, i),\n                get_percentile(worst_probe_times, i),\n                get_percentile(queue_lengths, i),\n                get_percentile(overheads, i)))\n\n        file.close()\n        return\n        self.plot_response_time_cdf(results_filename, file_prefix)\n        \"\"\"\n        # Output data about clock skews.  Currently this writes a different\n        # file for each pair of machines; we may want to change this when\n        # we do larger experiments.\n        skew_filenames = []\n        for address_pair, skews in clock_skews.items():\n            skews.sort(key=lambda x: x[0])\n            filename = \"%s_%s_%s_skew.data\" % (file_prefix, address_pair[0],\n                                               address_pair[1])\n            skew_filenames.append(filename)\n            file = open(filename, \"w\")\n            stride = max(1, len(skews) / num_data_points)\n            for i, (skew, time) in enumerate(skews[::stride]):\n                percentile = (i + 1) * stride * 1.0 / len(skews)\n                file.write(\"%f\\t%d\\t%d\\n\" % (percentile, skew, time))\n        self.plot_skew_cdf(skew_filenames, file_prefix)\n        \"\"\"\n        summary_file = open(\"%s_response_time_summary\" % file_prefix, 'w')\n        summary_file.write(\"%s %s %s\" % (get_percentile(response_times, .5),\n                                         get_percentile(response_times, .95),\n                                         get_percentile(response_times, .99)))\n        summary_file.close()\n\n\n        wait_times_per_queue_len = {}\n        for request in considered_requests:\n          for task in request._Request__tasks.values():\n            wait_time = task.queued_time()\n            if task.address not in request._Request__probes:\n              print \"Excluding\"\n              continue\n            queue_length = request._Request__probes[task.address].queue_length\n            arr = wait_times_per_queue_len.get(queue_length, [])\n            arr.append(wait_time)\n            wait_times_per_queue_len[queue_length] = arr\n\n        # Queue length vs response time\n        files = [] # (file name, queue length, # items)\n        for (queue_len, waits) in wait_times_per_queue_len.items():\n          fname = \"queue_waits_%s.txt\" % queue_len\n          files.append((fname, queue_len, len(waits)))\n          f = open(fname, 'w')\n          waits.sort()\n          for (i, wait) in enumerate(waits):\n            f.write(\"%s\\t%s\\n\" % (float(i)/len(waits), wait))\n          f.close()\n        plot_fname = \"wait_time.gp\"\n        plot_file = open(plot_fname, 'w')\n        plot_file.write(\"set terminal postscript color\\n\")\n        plot_file.write(\"set output 'wait_time.ps'\\n\")\n        plot_file.write(\"set xrange [0:500]\\n\")\n        parts = map(lambda x: \"'%s' using 2:1 with lines lw 3 title '%s (n=%s)'\"\n          % (x[0], x[1], x[2]), files)\n        plot = \"plot \" + \",\\\\\\n\".join(parts)\n        plot_file.write(plot + \"\\n\")\n        plot_file.close()\n\n    def plot_skew_cdf(self, skew_filenames, file_prefix):\n        gnuplot_file = open(\"%s_skew_cdf.gp\" % file_prefix, \"w\")\n        gnuplot_file.write(\"set terminal postscript color\\n\")\n        gnuplot_file.write(\"set output '%s_skew_cdf.ps'\\n\" %\n                           file_prefix)\n        gnuplot_file.write(\"set xlabel 'Clock Skew (ms)'\\n\")\n        gnuplot_file.write(\"set ylabel 'Cumulative Probability'\\n\")\n        gnuplot_file.write(\"set y2label 'Arrival Time (ms)'\\n\")\n        gnuplot_file.write(\"set yrange [0:1]\\n\")\n        gnuplot_file.write(\"set ytics nomirror\\n\")\n        gnuplot_file.write(\"set y2tics\\n\")\n        gnuplot_file.write(\"plot \")\n        for i, results_filename in enumerate(skew_filenames):\n            if i > 0:\n                gnuplot_file.write(\",\\\\\\n\")\n            gnuplot_file.write((\"'%s' using 2:1 lw 4 with lp axis \"\n                                \"x1y1,\\\\\\n\") % results_filename)\n            gnuplot_file.write(\"'%s' using 2:3 with p axis x1y2\" %\n                               results_filename)\n        gnuplot_file.close()\n\n\n    def plot_response_time_cdf(self, results_filename, file_prefix):\n        gnuplot_file = open(\"%s_response_time_cdf.gp\" % file_prefix, \"w\")\n        gnuplot_file.write(\"set terminal postscript color\\n\")\n        gnuplot_file.write(\"set size 0.5,0.5\\n\")\n        gnuplot_file.write(\"set output '%s_response_time_cdf.ps'\\n\" %\n                           file_prefix)\n        gnuplot_file.write(\"set xlabel 'Response Time'\\n\")\n        gnuplot_file.write(\"set ylabel 'Cumulative Probability'\\n\")\n        gnuplot_file.write(\"set yrange [0:1]\\n\")\n        gnuplot_file.write(\"plot '%s' using 2:1 lw 4 with lp\\\\\\n\" %\n                           results_filename)\n        gnuplot_file.close()\n\n    def __get_request(self, request_id):\n        \"\"\" Gets the request from the map of requests.\n\n        Creates a new request if a request with the given ID doesn't already\n        exist.\n        \"\"\"\n        if request_id not in self.__requests:\n            self.__requests[request_id] = Request(request_id)\n        return self.__requests[request_id]\n\n    def __add_scheduler_task_launch(self, request_id, task_id, time):\n        request = self.__get_request(request_id)\n        request.add_scheduler_task_launch(task_id, time)\n\n    def __add_node_monitor_task_submit(self, address, request_id, task_id, time):\n        request = self.__get_request(request_id)\n        request.add_node_monitor_task_submit(address, task_id, time)\n\n    def __add_node_monitor_task_launch(self, address, request_id, task_id,\n                                       time):\n        request = self.__get_request(request_id)\n        request.add_node_monitor_task_launch(address, task_id, time)\n\n    def __add_task_completion(self, request_id, task_id, time):\n        request = self.__get_request(request_id)\n        request.add_task_completion(task_id, time)\n\ndef main(argv):\n    PARAMS = [\"log_dir\", \"output_file\", \"start_sec\", \"end_sec\"]\n    if \"help\" in argv[0]:\n        print (\"Usage: python parse_logs.py \" +\n               \" \".join([\"[%s=v]\" % k for k in PARAMS]))\n        return\n\n    log_parser = LogParser()\n\n    log_files = []\n    output_filename = \"experiment\"\n    for arg in argv:\n        kv = arg.split(\"=\")\n        if kv[0] == PARAMS[0]:\n            log_dir = kv[1]\n            unqualified_log_files = filter(lambda x: \"sparrow_audit\" in x,\n                                           os.listdir(log_dir))\n            log_files = [os.path.join(log_dir, filename) for \\\n                         filename in unqualified_log_files]\n        elif kv[0] == PARAMS[1]:\n            output_filename = kv[1]\n        elif kv[0] == PARAMS[2]:\n            global START_SEC\n            START_SEC = int(kv[1])\n        elif kv[0] == PARAMS[3]:\n            global END_SEC\n            END_SEC = int(kv[1])\n        else:\n            print \"Warning: ignoring parameter %s\" % kv[0]\n\n    if len(log_files) == 0:\n        print \"No valid log files found!\"\n        return\n\n    logging.basicConfig(level=logging.DEBUG)\n\n    for filename in log_files:\n        log_parser.parse_file(filename)\n\n    log_parser.output_results(output_filename)\n    log_parser.output_results(output_filename, \"constrained\")\n    log_parser.output_results(output_filename, \"unconstrained\")\n\n\nif __name__ == \"__main__\":\n    main(sys.argv[1:])\n"
  },
  {
    "path": "src/main/python/parse_per_task_logs.sh",
    "content": "#!/bin/sh\n\n#\n# Copyright 2013 The Regents of The University California\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#   http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n\ncd \"`dirname $0`\"\nPYTHONPATH=\"$PYTHONPATH:third_party\" python parse_per_task_logs.py $@\n\n"
  },
  {
    "path": "src/main/python/parse_tpch_logs.py",
    "content": "import logging\nimport os\nimport sys\n\nimport parse_logs\nimport parse_per_task_logs\n\ndef main(argv):\n    PARAMS = [\"log_dir\", \"output_dir\", \"start_sec\", \"end_sec\"]\n    if \"help\" in argv[0]:\n        print (\"Usage: python parse_logs.py \" +\n               \" \".join([\"[%s=v]\" % k for k in PARAMS]))\n        return\n\n    #log_parser = parse_per_task_logs.LogParser()\n    log_parser = parse_logs.LogParser()\n    \n    # Use 5 minutes in the middle of the experiment, by default.\n    start_sec = 400\n    end_sec = 500\n\n    log_files = []\n    output_dir = \"experiment\"\n    for arg in argv:\n        kv = arg.split(\"=\")\n        if kv[0] == PARAMS[0]:\n            log_dir = kv[1]\n            unqualified_log_files = filter(lambda x: \"sparrow_audit\" in x,\n                                           os.listdir(log_dir))\n            log_files = [os.path.join(log_dir, filename) for \\\n                         filename in unqualified_log_files]\n        elif kv[0] == PARAMS[1]:\n            output_dir = kv[1]\n        elif kv[0] == PARAMS[2]:\n            start_sec = int(kv[1])\n        elif kv[0] == PARAMS[3]:\n            end_sec = int(kv[1])\n        else:\n            print \"Warning: ignoring parameter %s\" % kv[0]\n\n    if len(log_files) == 0:\n        print \"No valid log files found!\"\n        return\n\n    if not os.path.exists(output_dir):\n      os.mkdir(output_dir)\n\n    logging.basicConfig(level=logging.DEBUG)\n\n    for filename in log_files:\n        print \"Parsing log %s\" % filename\n        log_parser.parse_file(filename)\n\n    requests = log_parser.get_requests()\n\n    # Separate out results for each query and each type of query, and use only\n    # the results between START_TIME and END_TIME (relative to the beginning of the experiment).\n    # TPCH query ID : particular query : requests map!\\\n    earliest_time = log_parser.earliest_time()\n    last_time = max([x.arrival_time() for x in requests.values()])\n    print last_time\n    print earliest_time\n    print \"Last was %s after earliest\" % (last_time - earliest_time)\n    time_min = earliest_time + start_sec * 1000\n    time_max = earliest_time + end_sec * 1000\n    print \"Min time: %s, max time: %s\" % (time_min, time_max)\n    query_type_to_queries = {}\n    incomplete = 0\n    for r in requests.values():\n        #r.set_clock_skews()\n        if not r.complete():\n          incomplete += 1\n          continue\n        if r.tpch_id not in query_type_to_queries:\n          query_type_to_queries[r.tpch_id] = {}\n        queries = query_type_to_queries[r.tpch_id]\n\n        # This assumes that only one shark frontend is submitting queries to\n        # each scheduler.\n        query_id = (r.shark_id, r.scheduler_address())\n        if query_id not in queries:\n          queries[query_id] = []\n        queries[query_id].append(r)\n\n    print \"%s incomplete requests\" % incomplete\n\n    too_early = 0\n    too_late = 0\n    used_requests = 0\n    total_time = 0\n    total_tasks = 0\n    total_jobs = 0\n    constrained_jobs = 0\n    for tpch_id, queries in query_type_to_queries.iteritems():\n        print \"Parsing queries for %s\" % tpch_id\n        optimals = []\n        actuals = []\n        fulls = []\n        for id_tuple, requests in queries.iteritems():\n            requests.sort(key = lambda x: x.arrival_time())\n            # Check whether the query started within the right interval.\n            query_arrival = requests[0].arrival_time()\n            if query_arrival < time_min:\n              too_early += 1\n              continue\n            elif query_arrival > time_max:\n              too_late += 1\n              continue\n            used_requests += 1\n            optimal = 0\n            actual = 0\n            start = -1\n            end = 0\n            total_jobs += len(requests)\n            for request in requests:\n                if request.constrained:\n                   constrained_jobs += 1\n                #print request\n                service_times = request.service_times()\n                total_time += sum(service_times)\n                total_tasks += len(service_times)\n                opt = request.optimal_response_time()\n                optimal += opt\n                act = request.response_time()\n                actual += act\n                #print (\"Request from %s (Shark %s, stage %s, arrival %s, constrained: %s): optimal %s, actual %s\" %\n                #  (id_tuple[1], id_tuple[0], request.stage_id, request.arrival_time(), request.constrained, opt, act))\n                if start == -1:\n                  #print \"setting start %s\" % request.arrival_time()\n                  start = request.arrival_time()\n                end = request.arrival_time() + request.response_time()\n            #print \"For query %s from %s: optimal %s actual %s full %s\" % (id_tuple[1], id_tuple[0], optimal, actual, end - start)\n            #print \"end: %s\" % end\n            optimals.append(optimal)\n            actuals.append(actual)\n            fulls.append(end - start)\n\n        optimals.sort()\n        actuals.sort()\n        file = open(\"%s/results_%s\" % (output_dir, tpch_id), \"w\")\n        file.write(\"optimal\\tactual\\n\")\n        NUM_DATA_POINTS = 100\n        for i in range(NUM_DATA_POINTS):\n            i = float(i) / NUM_DATA_POINTS\n            file.write(\"%f\\t%d\\t%d\\n\" % (i, parse_logs.get_percentile(optimals, i), parse_logs.get_percentile(actuals, i)))\n        file.close()\n    total_slots = 400.00\n    load = total_time / (total_slots * (end_sec - start_sec) * 1000)\n    file = open(\"%s/summary\" % output_dir, 'w')\n    file.write(\"Load %s (total time: %s)\\n\" % (load, total_time))\n    file.write(\"%s too early, %s too late, %s total used\\n\" % (too_early, too_late, used_requests))\n    file.write(\"%s total jobs\" % (total_jobs))\n    file.write(\"%s constrained jobs\" % constrained_jobs)\n    print \"Completed TPCH analysis, results in %s\" % output_dir\n\nif __name__ == \"__main__\":\n     main(sys.argv[1:])\n"
  },
  {
    "path": "src/main/python/parse_tpch_logs.sh",
    "content": "#!/bin/sh\n\n#\n# Copyright 2013 The Regents of The University California\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#   http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n\ncd \"`dirname $0`\"\nPYTHONPATH=\"$PYTHONPATH:third_party\" python parse_tpch_logs.py $@\n\n"
  },
  {
    "path": "src/main/python/service_per_node.py",
    "content": "import sys\n\nfor f in sys.argv[1:]:\n  start_times = {}\n  service_times = []\n  for line in open(f): \n    if \"task_runnable\" in line:\n      parts = line.split(\"\\t\")\n      time = int(parts[1])\n      task = parts[2].split(\":\")[2] + \":\" + parts[2].split(\":\")[3]\n      start_times[task] = time\n    if \"task_completed\" in line:\n      parts = line.split(\"\\t\")\n      time = int(parts[1])\n      task = parts[2].split(\":\")[1] + \":\" + parts[2].split(\":\")[2]\n      service_times.append(time - start_times[task])\n\n  if len(service_times) == 0:\n    continue\n  \n  avg = sum(service_times) * 1.0 / (len(service_times) * 1000)\n  print \"%.3f\\t%s\" % (avg, f)\n"
  },
  {
    "path": "src/main/python/third_party/stats.py",
    "content": "# Copyright (c) 1999-2007 Gary Strangman; All Rights Reserved.\r\n#\r\n# Permission is hereby granted, free of charge, to any person obtaining a copy\r\n# of this software and associated documentation files (the \"Software\"), to deal\r\n# in the Software without restriction, including without limitation the rights\r\n# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n# copies of the Software, and to permit persons to whom the Software is\r\n# furnished to do so, subject to the following conditions:\r\n# \r\n# The above copyright notice and this permission notice shall be included in\r\n# all copies or substantial portions of the Software.\r\n# \r\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n# THE SOFTWARE.\r\n#\r\n# Comments and/or additions are welcome (send e-mail to:\r\n# strang@nmr.mgh.harvard.edu).\r\n# \r\n\"\"\"\r\nstats.py module\r\n\r\n(Requires pstats.py module.)\r\n\r\n#################################################\r\n#######  Written by:  Gary Strangman  ###########\r\n#######  Last modified:  Dec 18, 2007 ###########\r\n#################################################\r\n\r\nA collection of basic statistical functions for python.  The function\r\nnames appear below.\r\n\r\nIMPORTANT:  There are really *3* sets of functions.  The first set has an 'l'\r\nprefix, which can be used with list or tuple arguments.  The second set has\r\nan 'a' prefix, which can accept NumPy array arguments.  These latter\r\nfunctions are defined only when NumPy is available on the system.  The third\r\ntype has NO prefix (i.e., has the name that appears below).  Functions of\r\nthis set are members of a \"Dispatch\" class, c/o David Ascher.  This class\r\nallows different functions to be called depending on the type of the passed\r\narguments.  Thus, stats.mean is a member of the Dispatch class and\r\nstats.mean(range(20)) will call stats.lmean(range(20)) while\r\nstats.mean(Numeric.arange(20)) will call stats.amean(Numeric.arange(20)).\r\nThis is a handy way to keep consistent function names when different\r\nargument types require different functions to be called.  Having\r\nimplementated the Dispatch class, however, means that to get info on\r\na given function, you must use the REAL function name ... that is\r\n\"print stats.lmean.__doc__\" or \"print stats.amean.__doc__\" work fine,\r\nwhile \"print stats.mean.__doc__\" will print the doc for the Dispatch\r\nclass.  NUMPY FUNCTIONS ('a' prefix) generally have more argument options\r\nbut should otherwise be consistent with the corresponding list functions.\r\n\r\nDisclaimers:  The function list is obviously incomplete and, worse, the\r\nfunctions are not optimized.  All functions have been tested (some more\r\nso than others), but they are far from bulletproof.  Thus, as with any\r\nfree software, no warranty or guarantee is expressed or implied. :-)  A\r\nfew extra functions that don't appear in the list below can be found by\r\ninterested treasure-hunters.  These functions don't necessarily have\r\nboth list and array versions but were deemed useful\r\n\r\nCENTRAL TENDENCY:  geometricmean\r\n                   harmonicmean\r\n                   mean\r\n                   median\r\n                   medianscore\r\n                   mode\r\n\r\nMOMENTS:  moment\r\n          variation\r\n          skew\r\n          kurtosis\r\n          skewtest   (for Numpy arrays only)\r\n          kurtosistest (for Numpy arrays only)\r\n          normaltest (for Numpy arrays only)\r\n\r\nALTERED VERSIONS:  tmean  (for Numpy arrays only)\r\n                   tvar   (for Numpy arrays only)\r\n                   tmin   (for Numpy arrays only)\r\n                   tmax   (for Numpy arrays only)\r\n                   tstdev (for Numpy arrays only)\r\n                   tsem   (for Numpy arrays only)\r\n                   describe\r\n\r\nFREQUENCY STATS:  itemfreq\r\n                  scoreatpercentile\r\n                  percentileofscore\r\n                  histogram\r\n                  cumfreq\r\n                  relfreq\r\n\r\nVARIABILITY:  obrientransform\r\n              samplevar\r\n              samplestdev\r\n              signaltonoise (for Numpy arrays only)\r\n              var\r\n              stdev\r\n              sterr\r\n              sem\r\n              z\r\n              zs\r\n              zmap (for Numpy arrays only)\r\n\r\nTRIMMING FCNS:  threshold (for Numpy arrays only)\r\n                trimboth\r\n                trim1\r\n                round (round all vals to 'n' decimals; Numpy only)\r\n\r\nCORRELATION FCNS:  covariance  (for Numpy arrays only)\r\n                   correlation (for Numpy arrays only)\r\n                   paired\r\n                   pearsonr\r\n                   spearmanr\r\n                   pointbiserialr\r\n                   kendalltau\r\n                   linregress\r\n\r\nINFERENTIAL STATS:  ttest_1samp\r\n                    ttest_ind\r\n                    ttest_rel\r\n                    chisquare\r\n                    ks_2samp\r\n                    mannwhitneyu\r\n                    ranksums\r\n                    wilcoxont\r\n                    kruskalwallish\r\n                    friedmanchisquare\r\n\r\nPROBABILITY CALCS:  chisqprob\r\n                    erfcc\r\n                    zprob\r\n                    ksprob\r\n                    fprob\r\n                    betacf\r\n                    gammln \r\n                    betai\r\n\r\nANOVA FUNCTIONS:  F_oneway\r\n                  F_value\r\n\r\nSUPPORT FUNCTIONS:  writecc\r\n                    incr\r\n                    sign  (for Numpy arrays only)\r\n                    sum\r\n                    cumsum\r\n                    ss\r\n                    summult\r\n                    sumdiffsquared\r\n                    square_of_sums\r\n                    shellsort\r\n                    rankdata\r\n                    outputpairedstats\r\n                    findwithin\r\n\"\"\"\r\n## CHANGE LOG:\r\n## ===========\r\n## 07-11.26 ... conversion for numpy started\r\n## 07-05-16 ... added Lin's Concordance Correlation Coefficient (alincc) and acov\r\n## 05-08-21 ... added \"Dice's coefficient\"\r\n## 04-10-26 ... added ap2t(), an ugly fcn for converting p-vals to T-vals\r\n## 04-04-03 ... added amasslinregress() function to do regression on N-D arrays\r\n## 03-01-03 ... CHANGED VERSION TO 0.6\r\n##              fixed atsem() to properly handle limits=None case\r\n##              improved histogram and median functions (estbinwidth) and\r\n##                   fixed atvar() function (wrong answers for neg numbers?!?)\r\n## 02-11-19 ... fixed attest_ind and attest_rel for div-by-zero Overflows\r\n## 02-05-10 ... fixed lchisqprob indentation (failed when df=even)\r\n## 00-12-28 ... removed aanova() to separate module, fixed licensing to\r\n##                   match Python License, fixed doc string & imports\r\n## 00-04-13 ... pulled all \"global\" statements, except from aanova()\r\n##              added/fixed lots of documentation, removed io.py dependency\r\n##              changed to version 0.5\r\n## 99-11-13 ... added asign() function\r\n## 99-11-01 ... changed version to 0.4 ... enough incremental changes now\r\n## 99-10-25 ... added acovariance and acorrelation functions\r\n## 99-10-10 ... fixed askew/akurtosis to avoid divide-by-zero errors\r\n##              added aglm function (crude, but will be improved)\r\n## 99-10-04 ... upgraded acumsum, ass, asummult, asamplevar, avar, etc. to\r\n##                   all handle lists of 'dimension's and keepdims\r\n##              REMOVED ar0, ar2, ar3, ar4 and replaced them with around\r\n##              reinserted fixes for abetai to avoid math overflows\r\n## 99-09-05 ... rewrote achisqprob/aerfcc/aksprob/afprob/abetacf/abetai to\r\n##                   handle multi-dimensional arrays (whew!)\r\n## 99-08-30 ... fixed l/amoment, l/askew, l/akurtosis per D'Agostino (1990)\r\n##              added anormaltest per same reference\r\n##              re-wrote azprob to calc arrays of probs all at once\r\n## 99-08-22 ... edited attest_ind printing section so arrays could be rounded\r\n## 99-08-19 ... fixed amean and aharmonicmean for non-error(!) overflow on\r\n##                   short/byte arrays (mean of #s btw 100-300 = -150??)\r\n## 99-08-09 ... fixed asum so that the None case works for Byte arrays\r\n## 99-08-08 ... fixed 7/3 'improvement' to handle t-calcs on N-D arrays\r\n## 99-07-03 ... improved attest_ind, attest_rel (zero-division errortrap)\r\n## 99-06-24 ... fixed bug(?) in attest_ind (n1=a.shape[0])\r\n## 04/11/99 ... added asignaltonoise, athreshold functions, changed all\r\n##                   max/min in array section to N.maximum/N.minimum,\r\n##                   fixed square_of_sums to prevent integer overflow\r\n## 04/10/99 ... !!! Changed function name ... sumsquared ==> square_of_sums\r\n## 03/18/99 ... Added ar0, ar2, ar3 and ar4 rounding functions\r\n## 02/28/99 ... Fixed aobrientransform to return an array rather than a list\r\n## 01/15/99 ... Essentially ceased updating list-versions of functions (!!!)\r\n## 01/13/99 ... CHANGED TO VERSION 0.3\r\n##              fixed bug in a/lmannwhitneyu p-value calculation\r\n## 12/31/98 ... fixed variable-name bug in ldescribe\r\n## 12/19/98 ... fixed bug in findwithin (fcns needed pstats. prefix)\r\n## 12/16/98 ... changed amedianscore to return float (not array) for 1 score\r\n## 12/14/98 ... added atmin and atmax functions\r\n##              removed umath from import line (not needed)\r\n##              l/ageometricmean modified to reduce chance of overflows (take\r\n##                   nth root first, then multiply)\r\n## 12/07/98 ... added __version__variable (now 0.2)\r\n##              removed all 'stats.' from anova() fcn\r\n## 12/06/98 ... changed those functions (except shellsort) that altered\r\n##                   arguments in-place ... cumsum, ranksort, ...\r\n##              updated (and fixed some) doc-strings\r\n## 12/01/98 ... added anova() function (requires NumPy)\r\n##              incorporated Dispatch class\r\n## 11/12/98 ... added functionality to amean, aharmonicmean, ageometricmean\r\n##              added 'asum' function (added functionality to N.add.reduce)\r\n##              fixed both moment and amoment (two errors)\r\n##              changed name of skewness and askewness to skew and askew\r\n##              fixed (a)histogram (which sometimes counted points <lowerlimit)\r\n\r\nimport pstats               # required 3rd party module\r\nimport math, string, copy  # required python modules\r\nfrom types import *\r\n\r\n__version__ = 0.6\r\n\r\n############# DISPATCH CODE ##############\r\n\r\n\r\nclass Dispatch:\r\n    \"\"\"\r\nThe Dispatch class, care of David Ascher, allows different functions to\r\nbe called depending on the argument types.  This way, there can be one\r\nfunction name regardless of the argument type.  To access function doc\r\nin stats.py module, prefix the function with an 'l' or 'a' for list or\r\narray arguments, respectively.  That is, print stats.lmean.__doc__ or\r\nprint stats.amean.__doc__ or whatever.\r\n\"\"\"\r\n\r\n    def __init__(self, *tuples):\r\n        self._dispatch = {}\r\n        for func, types in tuples:\r\n            for t in types:\r\n                if t in self._dispatch.keys():\r\n                    raise ValueError, \"can't have two dispatches on \"+str(t)\r\n                self._dispatch[t] = func\r\n        self._types = self._dispatch.keys()\r\n\r\n    def __call__(self, arg1, *args, **kw):\r\n        if type(arg1) not in self._types:\r\n            raise TypeError, \"don't know how to dispatch %s arguments\" %  type(arg1)\r\n        return apply(self._dispatch[type(arg1)], (arg1,) + args, kw)\r\n\r\n\r\n##########################################################################\r\n########################   LIST-BASED FUNCTIONS   ########################\r\n##########################################################################\r\n\r\n### Define these regardless\r\n\r\n####################################\r\n#######  CENTRAL TENDENCY  #########\r\n####################################\r\n\r\ndef lgeometricmean (inlist):\r\n    \"\"\"\r\nCalculates the geometric mean of the values in the passed list.\r\nThat is:  n-th root of (x1 * x2 * ... * xn).  Assumes a '1D' list.\r\n\r\nUsage:   lgeometricmean(inlist)\r\n\"\"\"\r\n    mult = 1.0\r\n    one_over_n = 1.0/len(inlist)\r\n    for item in inlist:\r\n        mult = mult * pow(item,one_over_n)\r\n    return mult\r\n\r\n\r\ndef lharmonicmean (inlist):\r\n    \"\"\"\r\nCalculates the harmonic mean of the values in the passed list.\r\nThat is:  n / (1/x1 + 1/x2 + ... + 1/xn).  Assumes a '1D' list.\r\n\r\nUsage:   lharmonicmean(inlist)\r\n\"\"\"\r\n    sum = 0\r\n    for item in inlist:\r\n        sum = sum + 1.0/item\r\n    return len(inlist) / sum\r\n\r\n\r\ndef lmean (inlist):\r\n    \"\"\"\r\nReturns the arithematic mean of the values in the passed list.\r\nAssumes a '1D' list, but will function on the 1st dim of an array(!).\r\n\r\nUsage:   lmean(inlist)\r\n\"\"\"\r\n    sum = 0\r\n    for item in inlist:\r\n        sum = sum + item\r\n    return sum/float(len(inlist))\r\n\r\n\r\ndef lmedian (inlist,numbins=1000):\r\n    \"\"\"\r\nReturns the computed median value of a list of numbers, given the\r\nnumber of bins to use for the histogram (more bins brings the computed value\r\ncloser to the median score, default number of bins = 1000).  See G.W.\r\nHeiman's Basic Stats (1st Edition), or CRC Probability & Statistics.\r\n\r\nUsage:   lmedian (inlist, numbins=1000)\r\n\"\"\"\r\n    (hist, smallest, binsize, extras) = histogram(inlist,numbins,[min(inlist),max(inlist)]) # make histog\r\n    cumhist = cumsum(hist)              # make cumulative histogram\r\n    for i in range(len(cumhist)):        # get 1st(!) index holding 50%ile score\r\n        if cumhist[i]>=len(inlist)/2.0:\r\n            cfbin = i\r\n            break\r\n    LRL = smallest + binsize*cfbin        # get lower read limit of that bin\r\n    cfbelow = cumhist[cfbin-1]\r\n    freq = float(hist[cfbin])                # frequency IN the 50%ile bin\r\n    median = LRL + ((len(inlist)/2.0 - cfbelow)/float(freq))*binsize  # median formula\r\n    return median\r\n\r\n\r\ndef lmedianscore (inlist):\r\n    \"\"\"\r\nReturns the 'middle' score of the passed list.  If there is an even\r\nnumber of scores, the mean of the 2 middle scores is returned.\r\n\r\nUsage:   lmedianscore(inlist)\r\n\"\"\"\r\n\r\n    newlist = copy.deepcopy(inlist)\r\n    newlist.sort()\r\n    if len(newlist) % 2 == 0:   # if even number of scores, average middle 2\r\n        index = len(newlist)/2  # integer division correct\r\n        median = float(newlist[index] + newlist[index-1]) /2\r\n    else:\r\n        index = len(newlist)/2  # int divsion gives mid value when count from 0\r\n        median = newlist[index]\r\n    return median\r\n\r\n\r\ndef lmode(inlist):\r\n    \"\"\"\r\nReturns a list of the modal (most common) score(s) in the passed\r\nlist.  If there is more than one such score, all are returned.  The\r\nbin-count for the mode(s) is also returned.\r\n\r\nUsage:   lmode(inlist)\r\nReturns: bin-count for mode(s), a list of modal value(s)\r\n\"\"\"\r\n\r\n    scores = pstats.unique(inlist)\r\n    scores.sort()\r\n    freq = []\r\n    for item in scores:\r\n        freq.append(inlist.count(item))\r\n    maxfreq = max(freq)\r\n    mode = []\r\n    stillmore = 1\r\n    while stillmore:\r\n        try:\r\n            indx = freq.index(maxfreq)\r\n            mode.append(scores[indx])\r\n            del freq[indx]\r\n            del scores[indx]\r\n        except ValueError:\r\n            stillmore=0\r\n    return maxfreq, mode\r\n\r\n\r\n####################################\r\n############  MOMENTS  #############\r\n####################################\r\n\r\ndef lmoment(inlist,moment=1):\r\n    \"\"\"\r\nCalculates the nth moment about the mean for a sample (defaults to\r\nthe 1st moment).  Used to calculate coefficients of skewness and kurtosis.\r\n\r\nUsage:   lmoment(inlist,moment=1)\r\nReturns: appropriate moment (r) from ... 1/n * SUM((inlist(i)-mean)**r)\r\n\"\"\"\r\n    if moment == 1:\r\n        return 0.0\r\n    else:\r\n        mn = mean(inlist)\r\n        n = len(inlist)\r\n        s = 0\r\n        for x in inlist:\r\n            s = s + (x-mn)**moment\r\n        return s/float(n)\r\n\r\n\r\ndef lvariation(inlist):\r\n    \"\"\"\r\nReturns the coefficient of variation, as defined in CRC Standard\r\nProbability and Statistics, p.6.\r\n\r\nUsage:   lvariation(inlist)\r\n\"\"\"\r\n    return 100.0*samplestdev(inlist)/float(mean(inlist))\r\n\r\n\r\ndef lskew(inlist):\r\n    \"\"\"\r\nReturns the skewness of a distribution, as defined in Numerical\r\nRecipies (alternate defn in CRC Standard Probability and Statistics, p.6.)\r\n\r\nUsage:   lskew(inlist)\r\n\"\"\"\r\n    return moment(inlist,3)/pow(moment(inlist,2),1.5)\r\n\r\n\r\ndef lkurtosis(inlist):\r\n    \"\"\"\r\nReturns the kurtosis of a distribution, as defined in Numerical\r\nRecipies (alternate defn in CRC Standard Probability and Statistics, p.6.)\r\n\r\nUsage:   lkurtosis(inlist)\r\n\"\"\"\r\n    return moment(inlist,4)/pow(moment(inlist,2),2.0)\r\n\r\n\r\ndef ldescribe(inlist):\r\n    \"\"\"\r\nReturns some descriptive statistics of the passed list (assumed to be 1D).\r\n\r\nUsage:   ldescribe(inlist)\r\nReturns: n, mean, standard deviation, skew, kurtosis\r\n\"\"\"\r\n    n = len(inlist)\r\n    mm = (min(inlist),max(inlist))\r\n    m = mean(inlist)\r\n    sd = stdev(inlist)\r\n    sk = skew(inlist)\r\n    kurt = kurtosis(inlist)\r\n    return n, mm, m, sd, sk, kurt\r\n\r\n\r\n####################################\r\n#######  FREQUENCY STATS  ##########\r\n####################################\r\n\r\ndef litemfreq(inlist):\r\n    \"\"\"\r\nReturns a list of pairs.  Each pair consists of one of the scores in inlist\r\nand it's frequency count.  Assumes a 1D list is passed.\r\n\r\nUsage:   litemfreq(inlist)\r\nReturns: a 2D frequency table (col [0:n-1]=scores, col n=frequencies)\r\n\"\"\"\r\n    scores = pstats.unique(inlist)\r\n    scores.sort()\r\n    freq = []\r\n    for item in scores:\r\n        freq.append(inlist.count(item))\r\n    return pstats.abut(scores, freq)\r\n\r\n\r\ndef lscoreatpercentile (inlist, percent):\r\n    \"\"\"\r\nReturns the score at a given percentile relative to the distribution\r\ngiven by inlist.\r\n\r\nUsage:   lscoreatpercentile(inlist,percent)\r\n\"\"\"\r\n    if percent > 1:\r\n        print \"\\nDividing percent>1 by 100 in lscoreatpercentile().\\n\"\r\n        percent = percent / 100.0\r\n    targetcf = percent*len(inlist)\r\n    h, lrl, binsize, extras = histogram(inlist)\r\n    cumhist = cumsum(copy.deepcopy(h))\r\n    for i in range(len(cumhist)):\r\n        if cumhist[i] >= targetcf:\r\n            break\r\n    score = binsize * ((targetcf - cumhist[i-1]) / float(h[i])) + (lrl+binsize*i)\r\n    return score\r\n\r\n\r\ndef lpercentileofscore (inlist, score,histbins=10,defaultlimits=None):\r\n    \"\"\"\r\nReturns the percentile value of a score relative to the distribution\r\ngiven by inlist.  Formula depends on the values used to histogram the data(!).\r\n\r\nUsage:   lpercentileofscore(inlist,score,histbins=10,defaultlimits=None)\r\n\"\"\"\r\n\r\n    h, lrl, binsize, extras = histogram(inlist,histbins,defaultlimits)\r\n    cumhist = cumsum(copy.deepcopy(h))\r\n    i = int((score - lrl)/float(binsize))\r\n    pct = (cumhist[i-1]+((score-(lrl+binsize*i))/float(binsize))*h[i])/float(len(inlist)) * 100\r\n    return pct\r\n\r\n\r\ndef lhistogram (inlist,numbins=10,defaultreallimits=None,printextras=0):\r\n    \"\"\"\r\nReturns (i) a list of histogram bin counts, (ii) the smallest value\r\nof the histogram binning, and (iii) the bin width (the last 2 are not\r\nnecessarily integers).  Default number of bins is 10.  If no sequence object\r\nis given for defaultreallimits, the routine picks (usually non-pretty) bins\r\nspanning all the numbers in the inlist.\r\n\r\nUsage:   lhistogram (inlist, numbins=10, defaultreallimits=None,suppressoutput=0)\r\nReturns: list of bin values, lowerreallimit, binsize, extrapoints\r\n\"\"\"\r\n    if (defaultreallimits <> None):\r\n        if type(defaultreallimits) not in [ListType,TupleType] or len(defaultreallimits)==1: # only one limit given, assumed to be lower one & upper is calc'd\r\n            lowerreallimit = defaultreallimits\r\n            upperreallimit = 1.000001 * max(inlist)\r\n        else: # assume both limits given\r\n            lowerreallimit = defaultreallimits[0]\r\n            upperreallimit = defaultreallimits[1]\r\n        binsize = (upperreallimit-lowerreallimit)/float(numbins)\r\n    else:     # no limits given for histogram, both must be calc'd\r\n        estbinwidth=(max(inlist)-min(inlist))/float(numbins) +1e-6 #1=>cover all\r\n        binsize = ((max(inlist)-min(inlist)+estbinwidth))/float(numbins)\r\n        lowerreallimit = min(inlist) - binsize/2 #lower real limit,1st bin\r\n    bins = [0]*(numbins)\r\n    extrapoints = 0\r\n    for num in inlist:\r\n        try:\r\n            if (num-lowerreallimit) < 0:\r\n                extrapoints = extrapoints + 1\r\n            else:\r\n                bintoincrement = int((num-lowerreallimit)/float(binsize))\r\n                bins[bintoincrement] = bins[bintoincrement] + 1\r\n        except:\r\n            extrapoints = extrapoints + 1\r\n    if (extrapoints > 0 and printextras == 1):\r\n        print '\\nPoints outside given histogram range =',extrapoints\r\n    return (bins, lowerreallimit, binsize, extrapoints)\r\n\r\n\r\ndef lcumfreq(inlist,numbins=10,defaultreallimits=None):\r\n    \"\"\"\r\nReturns a cumulative frequency histogram, using the histogram function.\r\n\r\nUsage:   lcumfreq(inlist,numbins=10,defaultreallimits=None)\r\nReturns: list of cumfreq bin values, lowerreallimit, binsize, extrapoints\r\n\"\"\"\r\n    h,l,b,e = histogram(inlist,numbins,defaultreallimits)\r\n    cumhist = cumsum(copy.deepcopy(h))\r\n    return cumhist,l,b,e\r\n\r\n\r\ndef lrelfreq(inlist,numbins=10,defaultreallimits=None):\r\n    \"\"\"\r\nReturns a relative frequency histogram, using the histogram function.\r\n\r\nUsage:   lrelfreq(inlist,numbins=10,defaultreallimits=None)\r\nReturns: list of cumfreq bin values, lowerreallimit, binsize, extrapoints\r\n\"\"\"\r\n    h,l,b,e = histogram(inlist,numbins,defaultreallimits)\r\n    for i in range(len(h)):\r\n        h[i] = h[i]/float(len(inlist))\r\n    return h,l,b,e\r\n\r\n\r\n####################################\r\n#####  VARIABILITY FUNCTIONS  ######\r\n####################################\r\n\r\ndef lobrientransform(*args):\r\n    \"\"\"\r\nComputes a transform on input data (any number of columns).  Used to\r\ntest for homogeneity of variance prior to running one-way stats.  From\r\nMaxwell and Delaney, p.112.\r\n\r\nUsage:   lobrientransform(*args)\r\nReturns: transformed data for use in an ANOVA\r\n\"\"\"\r\n    TINY = 1e-10\r\n    k = len(args)\r\n    n = [0.0]*k\r\n    v = [0.0]*k\r\n    m = [0.0]*k\r\n    nargs = []\r\n    for i in range(k):\r\n        nargs.append(copy.deepcopy(args[i]))\r\n        n[i] = float(len(nargs[i]))\r\n        v[i] = var(nargs[i])\r\n        m[i] = mean(nargs[i])\r\n    for j in range(k):\r\n        for i in range(n[j]):\r\n            t1 = (n[j]-1.5)*n[j]*(nargs[j][i]-m[j])**2\r\n            t2 = 0.5*v[j]*(n[j]-1.0)\r\n            t3 = (n[j]-1.0)*(n[j]-2.0)\r\n            nargs[j][i] = (t1-t2) / float(t3)\r\n    check = 1\r\n    for j in range(k):\r\n        if v[j] - mean(nargs[j]) > TINY:\r\n            check = 0\r\n    if check <> 1:\r\n        raise ValueError, 'Problem in obrientransform.'\r\n    else:\r\n        return nargs\r\n\r\n\r\ndef lsamplevar (inlist):\r\n    \"\"\"\r\nReturns the variance of the values in the passed list using\r\nN for the denominator (i.e., DESCRIBES the sample variance only).\r\n\r\nUsage:   lsamplevar(inlist)\r\n\"\"\"\r\n    n = len(inlist)\r\n    mn = mean(inlist)\r\n    deviations = []\r\n    for item in inlist:\r\n        deviations.append(item-mn)\r\n    return ss(deviations)/float(n)\r\n\r\n\r\ndef lsamplestdev (inlist):\r\n    \"\"\"\r\nReturns the standard deviation of the values in the passed list using\r\nN for the denominator (i.e., DESCRIBES the sample stdev only).\r\n\r\nUsage:   lsamplestdev(inlist)\r\n\"\"\"\r\n    return math.sqrt(samplevar(inlist))\r\n\r\n\r\ndef lcov (x,y, keepdims=0):\r\n    \"\"\"\r\nReturns the estimated covariance of the values in the passed\r\narray (i.e., N-1).  Dimension can equal None (ravel array first), an\r\ninteger (the dimension over which to operate), or a sequence (operate\r\nover multiple dimensions).  Set keepdims=1 to return an array with the\r\nsame number of dimensions as inarray.\r\n\r\nUsage:   lcov(x,y,keepdims=0)\r\n\"\"\"\r\n\r\n    n = len(x)\r\n    xmn = mean(x)\r\n    ymn = mean(y)\r\n    xdeviations = [0]*len(x)\r\n    ydeviations = [0]*len(y)\r\n    for i in range(len(x)):\r\n        xdeviations[i] = x[i] - xmn\r\n        ydeviations[i] = y[i] - ymn\r\n    ss = 0.0\r\n    for i in range(len(xdeviations)):\r\n        ss = ss + xdeviations[i]*ydeviations[i]\r\n    return ss/float(n-1)\r\n\r\n\r\ndef lvar (inlist):\r\n    \"\"\"\r\nReturns the variance of the values in the passed list using N-1\r\nfor the denominator (i.e., for estimating population variance).\r\n\r\nUsage:   lvar(inlist)\r\n\"\"\"\r\n    n = len(inlist)\r\n    mn = mean(inlist)\r\n    deviations = [0]*len(inlist)\r\n    for i in range(len(inlist)):\r\n        deviations[i] = inlist[i] - mn\r\n    return ss(deviations)/float(n-1)\r\n\r\n\r\ndef lstdev (inlist):\r\n    \"\"\"\r\nReturns the standard deviation of the values in the passed list\r\nusing N-1 in the denominator (i.e., to estimate population stdev).\r\n\r\nUsage:   lstdev(inlist)\r\n\"\"\"\r\n    return math.sqrt(var(inlist))\r\n\r\n\r\ndef lsterr(inlist):\r\n    \"\"\"\r\nReturns the standard error of the values in the passed list using N-1\r\nin the denominator (i.e., to estimate population standard error).\r\n\r\nUsage:   lsterr(inlist)\r\n\"\"\"\r\n    return stdev(inlist) / float(math.sqrt(len(inlist)))\r\n\r\n\r\ndef lsem (inlist):\r\n    \"\"\"\r\nReturns the estimated standard error of the mean (sx-bar) of the\r\nvalues in the passed list.  sem = stdev / sqrt(n)\r\n\r\nUsage:   lsem(inlist)\r\n\"\"\"\r\n    sd = stdev(inlist)\r\n    n = len(inlist)\r\n    return sd/math.sqrt(n)\r\n\r\n\r\ndef lz (inlist, score):\r\n    \"\"\"\r\nReturns the z-score for a given input score, given that score and the\r\nlist from which that score came.  Not appropriate for population calculations.\r\n\r\nUsage:   lz(inlist, score)\r\n\"\"\"\r\n    z = (score-mean(inlist))/samplestdev(inlist)\r\n    return z\r\n\r\n\r\ndef lzs (inlist):\r\n    \"\"\"\r\nReturns a list of z-scores, one for each score in the passed list.\r\n\r\nUsage:   lzs(inlist)\r\n\"\"\"\r\n    zscores = []\r\n    for item in inlist:\r\n        zscores.append(z(inlist,item))\r\n    return zscores\r\n\r\n\r\n####################################\r\n#######  TRIMMING FUNCTIONS  #######\r\n####################################\r\n\r\ndef ltrimboth (l,proportiontocut):\r\n    \"\"\"\r\nSlices off the passed proportion of items from BOTH ends of the passed\r\nlist (i.e., with proportiontocut=0.1, slices 'leftmost' 10% AND 'rightmost'\r\n10% of scores.  Assumes list is sorted by magnitude.  Slices off LESS if\r\nproportion results in a non-integer slice index (i.e., conservatively\r\nslices off proportiontocut).\r\n\r\nUsage:   ltrimboth (l,proportiontocut)\r\nReturns: trimmed version of list l\r\n\"\"\"\r\n    lowercut = int(proportiontocut*len(l))\r\n    uppercut = len(l) - lowercut\r\n    return l[lowercut:uppercut]\r\n\r\n\r\ndef ltrim1 (l,proportiontocut,tail='right'):\r\n    \"\"\"\r\nSlices off the passed proportion of items from ONE end of the passed\r\nlist (i.e., if proportiontocut=0.1, slices off 'leftmost' or 'rightmost'\r\n10% of scores).  Slices off LESS if proportion results in a non-integer\r\nslice index (i.e., conservatively slices off proportiontocut).\r\n\r\nUsage:   ltrim1 (l,proportiontocut,tail='right')  or set tail='left'\r\nReturns: trimmed version of list l\r\n\"\"\"\r\n    if tail == 'right':\r\n        lowercut = 0\r\n        uppercut = len(l) - int(proportiontocut*len(l))\r\n    elif tail == 'left':\r\n        lowercut = int(proportiontocut*len(l))\r\n        uppercut = len(l)\r\n    return l[lowercut:uppercut]\r\n\r\n\r\n####################################\r\n#####  CORRELATION FUNCTIONS  ######\r\n####################################\r\n\r\ndef lpaired(x,y):\r\n    \"\"\"\r\nInteractively determines the type of data and then runs the\r\nappropriated statistic for paired group data.\r\n\r\nUsage:   lpaired(x,y)\r\nReturns: appropriate statistic name, value, and probability\r\n\"\"\"\r\n    samples = ''\r\n    while samples not in ['i','r','I','R','c','C']:\r\n        print '\\nIndependent or related samples, or correlation (i,r,c): ',\r\n        samples = raw_input()\r\n\r\n    if samples in ['i','I','r','R']:\r\n        print '\\nComparing variances ...',\r\n# USE O'BRIEN'S TEST FOR HOMOGENEITY OF VARIANCE, Maxwell & delaney, p.112\r\n        r = obrientransform(x,y)\r\n        f,p = F_oneway(pstats.colex(r,0),pstats.colex(r,1))\r\n        if p<0.05:\r\n            vartype='unequal, p='+str(round(p,4))\r\n        else:\r\n            vartype='equal'\r\n        print vartype\r\n        if samples in ['i','I']:\r\n            if vartype[0]=='e':\r\n                t,p = ttest_ind(x,y,0)\r\n                print '\\nIndependent samples t-test:  ', round(t,4),round(p,4)\r\n            else:\r\n                if len(x)>20 or len(y)>20:\r\n                    z,p = ranksums(x,y)\r\n                    print '\\nRank Sums test (NONparametric, n>20):  ', round(z,4),round(p,4)\r\n                else:\r\n                    u,p = mannwhitneyu(x,y)\r\n                    print '\\nMann-Whitney U-test (NONparametric, ns<20):  ', round(u,4),round(p,4)\r\n\r\n        else:  # RELATED SAMPLES\r\n            if vartype[0]=='e':\r\n                t,p = ttest_rel(x,y,0)\r\n                print '\\nRelated samples t-test:  ', round(t,4),round(p,4)\r\n            else:\r\n                t,p = ranksums(x,y)\r\n                print '\\nWilcoxon T-test (NONparametric):  ', round(t,4),round(p,4)\r\n    else:  # CORRELATION ANALYSIS\r\n        corrtype = ''\r\n        while corrtype not in ['c','C','r','R','d','D']:\r\n            print '\\nIs the data Continuous, Ranked, or Dichotomous (c,r,d): ',\r\n            corrtype = raw_input()\r\n        if corrtype in ['c','C']:\r\n            m,b,r,p,see = linregress(x,y)\r\n            print '\\nLinear regression for continuous variables ...'\r\n            lol = [['Slope','Intercept','r','Prob','SEestimate'],[round(m,4),round(b,4),round(r,4),round(p,4),round(see,4)]]\r\n            pstats.printcc(lol)\r\n        elif corrtype in ['r','R']:\r\n            r,p = spearmanr(x,y)\r\n            print '\\nCorrelation for ranked variables ...'\r\n            print \"Spearman's r: \",round(r,4),round(p,4)\r\n        else: # DICHOTOMOUS\r\n            r,p = pointbiserialr(x,y)\r\n            print '\\nAssuming x contains a dichotomous variable ...'\r\n            print 'Point Biserial r: ',round(r,4),round(p,4)\r\n    print '\\n\\n'\r\n    return None\r\n\r\n\r\ndef lpearsonr(x,y):\r\n    \"\"\"\r\nCalculates a Pearson correlation coefficient and the associated\r\nprobability value.  Taken from Heiman's Basic Statistics for the Behav.\r\nSci (2nd), p.195.\r\n\r\nUsage:   lpearsonr(x,y)      where x and y are equal-length lists\r\nReturns: Pearson's r value, two-tailed p-value\r\n\"\"\"\r\n    TINY = 1.0e-30\r\n    if len(x) <> len(y):\r\n        raise ValueError, 'Input values not paired in pearsonr.  Aborting.'\r\n    n = len(x)\r\n    x = map(float,x)\r\n    y = map(float,y)\r\n    xmean = mean(x)\r\n    ymean = mean(y)\r\n    r_num = n*(summult(x,y)) - sum(x)*sum(y)\r\n    r_den = math.sqrt((n*ss(x) - square_of_sums(x))*(n*ss(y)-square_of_sums(y)))\r\n    r = (r_num / r_den)  # denominator already a float\r\n    df = n-2\r\n    t = r*math.sqrt(df/((1.0-r+TINY)*(1.0+r+TINY)))\r\n    prob = betai(0.5*df,0.5,df/float(df+t*t))\r\n    return r, prob\r\n\r\n\r\ndef llincc(x,y):\r\n    \"\"\"\r\nCalculates Lin's concordance correlation coefficient.\r\n\r\nUsage:   alincc(x,y)    where x, y are equal-length arrays\r\nReturns: Lin's CC\r\n\"\"\"\r\n    covar = lcov(x,y)*(len(x)-1)/float(len(x))  # correct denom to n\r\n    xvar = lvar(x)*(len(x)-1)/float(len(x))  # correct denom to n\r\n    yvar = lvar(y)*(len(y)-1)/float(len(y))  # correct denom to n\r\n    lincc = (2 * covar) / ((xvar+yvar) +((amean(x)-amean(y))**2))\r\n    return lincc\r\n\r\n\r\ndef lspearmanr(x,y):\r\n    \"\"\"\r\nCalculates a Spearman rank-order correlation coefficient.  Taken\r\nfrom Heiman's Basic Statistics for the Behav. Sci (1st), p.192.\r\n\r\nUsage:   lspearmanr(x,y)      where x and y are equal-length lists\r\nReturns: Spearman's r, two-tailed p-value\r\n\"\"\"\r\n    TINY = 1e-30\r\n    if len(x) <> len(y):\r\n        raise ValueError, 'Input values not paired in spearmanr.  Aborting.'\r\n    n = len(x)\r\n    rankx = rankdata(x)\r\n    ranky = rankdata(y)\r\n    dsq = sumdiffsquared(rankx,ranky)\r\n    rs = 1 - 6*dsq / float(n*(n**2-1))\r\n    t = rs * math.sqrt((n-2) / ((rs+1.0)*(1.0-rs)))\r\n    df = n-2\r\n    probrs = betai(0.5*df,0.5,df/(df+t*t))  # t already a float\r\n# probability values for rs are from part 2 of the spearman function in\r\n# Numerical Recipies, p.510.  They are close to tables, but not exact. (?)\r\n    return rs, probrs\r\n\r\n\r\ndef lpointbiserialr(x,y):\r\n    \"\"\"\r\nCalculates a point-biserial correlation coefficient and the associated\r\nprobability value.  Taken from Heiman's Basic Statistics for the Behav.\r\nSci (1st), p.194.\r\n\r\nUsage:   lpointbiserialr(x,y)      where x,y are equal-length lists\r\nReturns: Point-biserial r, two-tailed p-value\r\n\"\"\"\r\n    TINY = 1e-30\r\n    if len(x) <> len(y):\r\n        raise ValueError, 'INPUT VALUES NOT PAIRED IN pointbiserialr.  ABORTING.'\r\n    data = pstats.abut(x,y)\r\n    categories = pstats.unique(x)\r\n    if len(categories) <> 2:\r\n        raise ValueError, \"Exactly 2 categories required for pointbiserialr().\"\r\n    else:   # there are 2 categories, continue\r\n        codemap = pstats.abut(categories,range(2))\r\n        recoded = pstats.recode(data,codemap,0)\r\n        x = pstats.linexand(data,0,categories[0])\r\n        y = pstats.linexand(data,0,categories[1])\r\n        xmean = mean(pstats.colex(x,1))\r\n        ymean = mean(pstats.colex(y,1))\r\n        n = len(data)\r\n        adjust = math.sqrt((len(x)/float(n))*(len(y)/float(n)))\r\n        rpb = (ymean - xmean)/samplestdev(pstats.colex(data,1))*adjust\r\n        df = n-2\r\n        t = rpb*math.sqrt(df/((1.0-rpb+TINY)*(1.0+rpb+TINY)))\r\n        prob = betai(0.5*df,0.5,df/(df+t*t))  # t already a float\r\n        return rpb, prob\r\n\r\n\r\ndef lkendalltau(x,y):\r\n    \"\"\"\r\nCalculates Kendall's tau ... correlation of ordinal data.  Adapted\r\nfrom function kendl1 in Numerical Recipies.  Needs good test-routine.@@@\r\n\r\nUsage:   lkendalltau(x,y)\r\nReturns: Kendall's tau, two-tailed p-value\r\n\"\"\"\r\n    n1 = 0\r\n    n2 = 0\r\n    iss = 0\r\n    for j in range(len(x)-1):\r\n        for k in range(j,len(y)):\r\n            a1 = x[j] - x[k]\r\n            a2 = y[j] - y[k]\r\n            aa = a1 * a2\r\n            if (aa):             # neither list has a tie\r\n                n1 = n1 + 1\r\n                n2 = n2 + 1\r\n                if aa > 0:\r\n                    iss = iss + 1\r\n                else:\r\n                    iss = iss -1\r\n            else:\r\n                if (a1):\r\n                    n1 = n1 + 1\r\n                else:\r\n                    n2 = n2 + 1\r\n    tau = iss / math.sqrt(n1*n2)\r\n    svar = (4.0*len(x)+10.0) / (9.0*len(x)*(len(x)-1))\r\n    z = tau / math.sqrt(svar)\r\n    prob = erfcc(abs(z)/1.4142136)\r\n    return tau, prob\r\n\r\n\r\ndef llinregress(x,y):\r\n    \"\"\"\r\nCalculates a regression line on x,y pairs.  \r\n\r\nUsage:   llinregress(x,y)      x,y are equal-length lists of x-y coordinates\r\nReturns: slope, intercept, r, two-tailed prob, sterr-of-estimate\r\n\"\"\"\r\n    TINY = 1.0e-20\r\n    if len(x) <> len(y):\r\n        raise ValueError, 'Input values not paired in linregress.  Aborting.'\r\n    n = len(x)\r\n    x = map(float,x)\r\n    y = map(float,y)\r\n    xmean = mean(x)\r\n    ymean = mean(y)\r\n    r_num = float(n*(summult(x,y)) - sum(x)*sum(y))\r\n    r_den = math.sqrt((n*ss(x) - square_of_sums(x))*(n*ss(y)-square_of_sums(y)))\r\n    r = r_num / r_den\r\n    z = 0.5*math.log((1.0+r+TINY)/(1.0-r+TINY))\r\n    df = n-2\r\n    t = r*math.sqrt(df/((1.0-r+TINY)*(1.0+r+TINY)))\r\n    prob = betai(0.5*df,0.5,df/(df+t*t))\r\n    slope = r_num / float(n*ss(x) - square_of_sums(x))\r\n    intercept = ymean - slope*xmean\r\n    sterrest = math.sqrt(1-r*r)*samplestdev(y)\r\n    return slope, intercept, r, prob, sterrest\r\n\r\n\r\n####################################\r\n#####  INFERENTIAL STATISTICS  #####\r\n####################################\r\n\r\ndef lttest_1samp(a,popmean,printit=0,name='Sample',writemode='a'):\r\n    \"\"\"\r\nCalculates the t-obtained for the independent samples T-test on ONE group\r\nof scores a, given a population mean.  If printit=1, results are printed\r\nto the screen.  If printit='filename', the results are output to 'filename'\r\nusing the given writemode (default=append).  Returns t-value, and prob.\r\n\r\nUsage:   lttest_1samp(a,popmean,Name='Sample',printit=0,writemode='a')\r\nReturns: t-value, two-tailed prob\r\n\"\"\"\r\n    x = mean(a)\r\n    v = var(a)\r\n    n = len(a)\r\n    df = n-1\r\n    svar = ((n-1)*v)/float(df)\r\n    t = (x-popmean)/math.sqrt(svar*(1.0/n))\r\n    prob = betai(0.5*df,0.5,float(df)/(df+t*t))\r\n\r\n    if printit <> 0:\r\n        statname = 'Single-sample T-test.'\r\n        outputpairedstats(printit,writemode,\r\n                          'Population','--',popmean,0,0,0,\r\n                          name,n,x,v,min(a),max(a),\r\n                          statname,t,prob)\r\n    return t,prob\r\n\r\n\r\ndef lttest_ind (a, b, printit=0, name1='Samp1', name2='Samp2', writemode='a'):\r\n    \"\"\"\r\nCalculates the t-obtained T-test on TWO INDEPENDENT samples of\r\nscores a, and b.  From Numerical Recipies, p.483.  If printit=1, results\r\nare printed to the screen.  If printit='filename', the results are output\r\nto 'filename' using the given writemode (default=append).  Returns t-value,\r\nand prob.\r\n\r\nUsage:   lttest_ind(a,b,printit=0,name1='Samp1',name2='Samp2',writemode='a')\r\nReturns: t-value, two-tailed prob\r\n\"\"\"\r\n    x1 = mean(a)\r\n    x2 = mean(b)\r\n    v1 = stdev(a)**2\r\n    v2 = stdev(b)**2\r\n    n1 = len(a)\r\n    n2 = len(b)\r\n    df = n1+n2-2\r\n    svar = ((n1-1)*v1+(n2-1)*v2)/float(df)\r\n    t = (x1-x2)/math.sqrt(svar*(1.0/n1 + 1.0/n2))\r\n    prob = betai(0.5*df,0.5,df/(df+t*t))\r\n\r\n    if printit <> 0:\r\n        statname = 'Independent samples T-test.'\r\n        outputpairedstats(printit,writemode,\r\n                          name1,n1,x1,v1,min(a),max(a),\r\n                          name2,n2,x2,v2,min(b),max(b),\r\n                          statname,t,prob)\r\n    return t,prob\r\n\r\n\r\ndef lttest_rel (a,b,printit=0,name1='Sample1',name2='Sample2',writemode='a'):\r\n    \"\"\"\r\nCalculates the t-obtained T-test on TWO RELATED samples of scores,\r\na and b.  From Numerical Recipies, p.483.  If printit=1, results are\r\nprinted to the screen.  If printit='filename', the results are output to\r\n'filename' using the given writemode (default=append).  Returns t-value,\r\nand prob.\r\n\r\nUsage:   lttest_rel(a,b,printit=0,name1='Sample1',name2='Sample2',writemode='a')\r\nReturns: t-value, two-tailed prob\r\n\"\"\"\r\n    if len(a)<>len(b):\r\n        raise ValueError, 'Unequal length lists in ttest_rel.'\r\n    x1 = mean(a)\r\n    x2 = mean(b)\r\n    v1 = var(a)\r\n    v2 = var(b)\r\n    n = len(a)\r\n    cov = 0\r\n    for i in range(len(a)):\r\n        cov = cov + (a[i]-x1) * (b[i]-x2)\r\n    df = n-1\r\n    cov = cov / float(df)\r\n    sd = math.sqrt((v1+v2 - 2.0*cov)/float(n))\r\n    t = (x1-x2)/sd\r\n    prob = betai(0.5*df,0.5,df/(df+t*t))\r\n\r\n    if printit <> 0:\r\n        statname = 'Related samples T-test.'\r\n        outputpairedstats(printit,writemode,\r\n                          name1,n,x1,v1,min(a),max(a),\r\n                          name2,n,x2,v2,min(b),max(b),\r\n                          statname,t,prob)\r\n    return t, prob\r\n\r\n\r\ndef lchisquare(f_obs,f_exp=None):\r\n    \"\"\"\r\nCalculates a one-way chi square for list of observed frequencies and returns\r\nthe result.  If no expected frequencies are given, the total N is assumed to\r\nbe equally distributed across all groups.\r\n\r\nUsage:   lchisquare(f_obs, f_exp=None)   f_obs = list of observed cell freq.\r\nReturns: chisquare-statistic, associated p-value\r\n\"\"\"\r\n    k = len(f_obs)                 # number of groups\r\n    if f_exp == None:\r\n        f_exp = [sum(f_obs)/float(k)] * len(f_obs) # create k bins with = freq.\r\n    chisq = 0\r\n    for i in range(len(f_obs)):\r\n        chisq = chisq + (f_obs[i]-f_exp[i])**2 / float(f_exp[i])\r\n    return chisq, chisqprob(chisq, k-1)\r\n\r\n\r\ndef lks_2samp (data1,data2):\r\n    \"\"\"\r\nComputes the Kolmogorov-Smirnof statistic on 2 samples.  From\r\nNumerical Recipies in C, page 493.\r\n\r\nUsage:   lks_2samp(data1,data2)   data1&2 are lists of values for 2 conditions\r\nReturns: KS D-value, associated p-value\r\n\"\"\"\r\n    j1 = 0\r\n    j2 = 0\r\n    fn1 = 0.0\r\n    fn2 = 0.0\r\n    n1 = len(data1)\r\n    n2 = len(data2)\r\n    en1 = n1\r\n    en2 = n2\r\n    d = 0.0\r\n    data1.sort()\r\n    data2.sort()\r\n    while j1 < n1 and j2 < n2:\r\n        d1=data1[j1]\r\n        d2=data2[j2]\r\n        if d1 <= d2:\r\n            fn1 = (j1)/float(en1)\r\n            j1 = j1 + 1\r\n        if d2 <= d1:\r\n            fn2 = (j2)/float(en2)\r\n            j2 = j2 + 1\r\n        dt = (fn2-fn1)\r\n        if math.fabs(dt) > math.fabs(d):\r\n            d = dt\r\n    try:\r\n        en = math.sqrt(en1*en2/float(en1+en2))\r\n        prob = ksprob((en+0.12+0.11/en)*abs(d))\r\n    except:\r\n        prob = 1.0\r\n    return d, prob\r\n\r\n\r\ndef lmannwhitneyu(x,y):\r\n    \"\"\"\r\nCalculates a Mann-Whitney U statistic on the provided scores and\r\nreturns the result.  Use only when the n in each condition is < 20 and\r\nyou have 2 independent samples of ranks.  NOTE: Mann-Whitney U is\r\nsignificant if the u-obtained is LESS THAN or equal to the critical\r\nvalue of U found in the tables.  Equivalent to Kruskal-Wallis H with\r\njust 2 groups.\r\n\r\nUsage:   lmannwhitneyu(data)\r\nReturns: u-statistic, one-tailed p-value (i.e., p(z(U)))\r\n\"\"\"\r\n    n1 = len(x)\r\n    n2 = len(y)\r\n    ranked = rankdata(x+y)\r\n    rankx = ranked[0:n1]       # get the x-ranks\r\n    ranky = ranked[n1:]        # the rest are y-ranks\r\n    u1 = n1*n2 + (n1*(n1+1))/2.0 - sum(rankx)  # calc U for x\r\n    u2 = n1*n2 - u1                            # remainder is U for y\r\n    bigu = max(u1,u2)\r\n    smallu = min(u1,u2)\r\n    T = math.sqrt(tiecorrect(ranked))  # correction factor for tied scores\r\n    if T == 0:\r\n        raise ValueError, 'All numbers are identical in lmannwhitneyu'\r\n    sd = math.sqrt(T*n1*n2*(n1+n2+1)/12.0)\r\n    z = abs((bigu-n1*n2/2.0) / sd)  # normal approximation for prob calc\r\n    return smallu, 1.0 - zprob(z)\r\n\r\n\r\ndef ltiecorrect(rankvals):\r\n    \"\"\"\r\nCorrects for ties in Mann Whitney U and Kruskal Wallis H tests.  See\r\nSiegel, S. (1956) Nonparametric Statistics for the Behavioral Sciences.\r\nNew York: McGraw-Hill.  Code adapted from |Stat rankind.c code.\r\n\r\nUsage:   ltiecorrect(rankvals)\r\nReturns: T correction factor for U or H\r\n\"\"\"\r\n    sorted,posn = shellsort(rankvals)\r\n    n = len(sorted)\r\n    T = 0.0\r\n    i = 0\r\n    while (i<n-1):\r\n        if sorted[i] == sorted[i+1]:\r\n            nties = 1\r\n            while (i<n-1) and (sorted[i] == sorted[i+1]):\r\n                nties = nties +1\r\n                i = i +1\r\n            T = T + nties**3 - nties\r\n        i = i+1\r\n    T = T / float(n**3-n)\r\n    return 1.0 - T\r\n\r\n\r\ndef lranksums(x,y):\r\n    \"\"\"\r\nCalculates the rank sums statistic on the provided scores and\r\nreturns the result.  Use only when the n in each condition is > 20 and you\r\nhave 2 independent samples of ranks.\r\n\r\nUsage:   lranksums(x,y)\r\nReturns: a z-statistic, two-tailed p-value\r\n\"\"\"\r\n    n1 = len(x)\r\n    n2 = len(y)\r\n    alldata = x+y\r\n    ranked = rankdata(alldata)\r\n    x = ranked[:n1]\r\n    y = ranked[n1:]\r\n    s = sum(x)\r\n    expected = n1*(n1+n2+1) / 2.0\r\n    z = (s - expected) / math.sqrt(n1*n2*(n1+n2+1)/12.0)\r\n    prob = 2*(1.0 -zprob(abs(z)))\r\n    return z, prob\r\n\r\n\r\ndef lwilcoxont(x,y):\r\n    \"\"\"\r\nCalculates the Wilcoxon T-test for related samples and returns the\r\nresult.  A non-parametric T-test.\r\n\r\nUsage:   lwilcoxont(x,y)\r\nReturns: a t-statistic, two-tail probability estimate\r\n\"\"\"\r\n    if len(x) <> len(y):\r\n        raise ValueError, 'Unequal N in wilcoxont.  Aborting.'\r\n    d=[]\r\n    for i in range(len(x)):\r\n        diff = x[i] - y[i]\r\n        if diff <> 0:\r\n            d.append(diff)\r\n    count = len(d)\r\n    absd = map(abs,d)\r\n    absranked = rankdata(absd)\r\n    r_plus = 0.0\r\n    r_minus = 0.0\r\n    for i in range(len(absd)):\r\n        if d[i] < 0:\r\n            r_minus = r_minus + absranked[i]\r\n        else:\r\n            r_plus = r_plus + absranked[i]\r\n    wt = min(r_plus, r_minus)\r\n    mn = count * (count+1) * 0.25\r\n    se =  math.sqrt(count*(count+1)*(2.0*count+1.0)/24.0)\r\n    z = math.fabs(wt-mn) / se\r\n    prob = 2*(1.0 -zprob(abs(z)))\r\n    return wt, prob\r\n\r\n\r\ndef lkruskalwallish(*args):\r\n    \"\"\"\r\nThe Kruskal-Wallis H-test is a non-parametric ANOVA for 3 or more\r\ngroups, requiring at least 5 subjects in each group.  This function\r\ncalculates the Kruskal-Wallis H-test for 3 or more independent samples\r\nand returns the result.  \r\n\r\nUsage:   lkruskalwallish(*args)\r\nReturns: H-statistic (corrected for ties), associated p-value\r\n\"\"\"\r\n    args = list(args)\r\n    n = [0]*len(args)\r\n    all = []\r\n    n = map(len,args)\r\n    for i in range(len(args)):\r\n        all = all + args[i]\r\n    ranked = rankdata(all)\r\n    T = tiecorrect(ranked)\r\n    for i in range(len(args)):\r\n        args[i] = ranked[0:n[i]]\r\n        del ranked[0:n[i]]\r\n    rsums = []\r\n    for i in range(len(args)):\r\n        rsums.append(sum(args[i])**2)\r\n        rsums[i] = rsums[i] / float(n[i])\r\n    ssbn = sum(rsums)\r\n    totaln = sum(n)\r\n    h = 12.0 / (totaln*(totaln+1)) * ssbn - 3*(totaln+1)\r\n    df = len(args) - 1\r\n    if T == 0:\r\n        raise ValueError, 'All numbers are identical in lkruskalwallish'\r\n    h = h / float(T)\r\n    return h, chisqprob(h,df)\r\n\r\n\r\ndef lfriedmanchisquare(*args):\r\n    \"\"\"\r\nFriedman Chi-Square is a non-parametric, one-way within-subjects\r\nANOVA.  This function calculates the Friedman Chi-square test for repeated\r\nmeasures and returns the result, along with the associated probability\r\nvalue.  It assumes 3 or more repeated measures.  Only 3 levels requires a\r\nminimum of 10 subjects in the study.  Four levels requires 5 subjects per\r\nlevel(??).\r\n\r\nUsage:   lfriedmanchisquare(*args)\r\nReturns: chi-square statistic, associated p-value\r\n\"\"\"\r\n    k = len(args)\r\n    if k < 3:\r\n        raise ValueError, 'Less than 3 levels.  Friedman test not appropriate.'\r\n    n = len(args[0])\r\n    data = apply(pstats.abut,tuple(args))\r\n    for i in range(len(data)):\r\n        data[i] = rankdata(data[i])\r\n    ssbn = 0\r\n    for i in range(k):\r\n        ssbn = ssbn + sum(args[i])**2\r\n    chisq = 12.0 / (k*n*(k+1)) * ssbn - 3*n*(k+1)\r\n    return chisq, chisqprob(chisq,k-1)\r\n\r\n\r\n####################################\r\n####  PROBABILITY CALCULATIONS  ####\r\n####################################\r\n\r\ndef lchisqprob(chisq,df):\r\n    \"\"\"\r\nReturns the (1-tailed) probability value associated with the provided\r\nchi-square value and df.  Adapted from chisq.c in Gary Perlman's |Stat.\r\n\r\nUsage:   lchisqprob(chisq,df)\r\n\"\"\"\r\n    BIG = 20.0\r\n    def ex(x):\r\n        BIG = 20.0\r\n        if x < -BIG:\r\n            return 0.0\r\n        else:\r\n            return math.exp(x)\r\n\r\n    if chisq <=0 or df < 1:\r\n        return 1.0\r\n    a = 0.5 * chisq\r\n    if df%2 == 0:\r\n        even = 1\r\n    else:\r\n        even = 0\r\n    if df > 1:\r\n        y = ex(-a)\r\n    if even:\r\n        s = y\r\n    else:\r\n        s = 2.0 * zprob(-math.sqrt(chisq))\r\n    if (df > 2):\r\n        chisq = 0.5 * (df - 1.0)\r\n        if even:\r\n            z = 1.0\r\n        else:\r\n            z = 0.5\r\n        if a > BIG:\r\n            if even:\r\n                e = 0.0\r\n            else:\r\n                e = math.log(math.sqrt(math.pi))\r\n            c = math.log(a)\r\n            while (z <= chisq):\r\n                e = math.log(z) + e\r\n                s = s + ex(c*z-a-e)\r\n                z = z + 1.0\r\n            return s\r\n        else:\r\n            if even:\r\n                e = 1.0\r\n            else:\r\n                e = 1.0 / math.sqrt(math.pi) / math.sqrt(a)\r\n            c = 0.0\r\n            while (z <= chisq):\r\n                e = e * (a/float(z))\r\n                c = c + e\r\n                z = z + 1.0\r\n            return (c*y+s)\r\n    else:\r\n        return s\r\n\r\n\r\ndef lerfcc(x):\r\n    \"\"\"\r\nReturns the complementary error function erfc(x) with fractional\r\nerror everywhere less than 1.2e-7.  Adapted from Numerical Recipies.\r\n\r\nUsage:   lerfcc(x)\r\n\"\"\"\r\n    z = abs(x)\r\n    t = 1.0 / (1.0+0.5*z)\r\n    ans = t * math.exp(-z*z-1.26551223 + t*(1.00002368+t*(0.37409196+t*(0.09678418+t*(-0.18628806+t*(0.27886807+t*(-1.13520398+t*(1.48851587+t*(-0.82215223+t*0.17087277)))))))))\r\n    if x >= 0:\r\n        return ans\r\n    else:\r\n        return 2.0 - ans\r\n\r\n\r\ndef lzprob(z):\r\n    \"\"\"\r\nReturns the area under the normal curve 'to the left of' the given z value.\r\nThus, \r\n    for z<0, zprob(z) = 1-tail probability\r\n    for z>0, 1.0-zprob(z) = 1-tail probability\r\n    for any z, 2.0*(1.0-zprob(abs(z))) = 2-tail probability\r\nAdapted from z.c in Gary Perlman's |Stat.\r\n\r\nUsage:   lzprob(z)\r\n\"\"\"\r\n    Z_MAX = 6.0    # maximum meaningful z-value\r\n    if z == 0.0:\r\n        x = 0.0\r\n    else:\r\n        y = 0.5 * math.fabs(z)\r\n        if y >= (Z_MAX*0.5):\r\n            x = 1.0\r\n        elif (y < 1.0):\r\n            w = y*y\r\n            x = ((((((((0.000124818987 * w\r\n                        -0.001075204047) * w +0.005198775019) * w\r\n                      -0.019198292004) * w +0.059054035642) * w\r\n                    -0.151968751364) * w +0.319152932694) * w\r\n                  -0.531923007300) * w +0.797884560593) * y * 2.0\r\n        else:\r\n            y = y - 2.0\r\n            x = (((((((((((((-0.000045255659 * y\r\n                             +0.000152529290) * y -0.000019538132) * y\r\n                           -0.000676904986) * y +0.001390604284) * y\r\n                         -0.000794620820) * y -0.002034254874) * y\r\n                       +0.006549791214) * y -0.010557625006) * y\r\n                     +0.011630447319) * y -0.009279453341) * y\r\n                   +0.005353579108) * y -0.002141268741) * y\r\n                 +0.000535310849) * y +0.999936657524\r\n    if z > 0.0:\r\n        prob = ((x+1.0)*0.5)\r\n    else:\r\n        prob = ((1.0-x)*0.5)\r\n    return prob\r\n\r\n\r\ndef lksprob(alam):\r\n    \"\"\"\r\nComputes a Kolmolgorov-Smirnov t-test significance level.  Adapted from\r\nNumerical Recipies.\r\n\r\nUsage:   lksprob(alam)\r\n\"\"\"\r\n    fac = 2.0\r\n    sum = 0.0\r\n    termbf = 0.0\r\n    a2 = -2.0*alam*alam\r\n    for j in range(1,201):\r\n        term = fac*math.exp(a2*j*j)\r\n        sum = sum + term\r\n        if math.fabs(term) <= (0.001*termbf) or math.fabs(term) < (1.0e-8*sum):\r\n            return sum\r\n        fac = -fac\r\n        termbf = math.fabs(term)\r\n    return 1.0             # Get here only if fails to converge; was 0.0!!\r\n\r\n\r\ndef lfprob (dfnum, dfden, F):\r\n    \"\"\"\r\nReturns the (1-tailed) significance level (p-value) of an F\r\nstatistic given the degrees of freedom for the numerator (dfR-dfF) and\r\nthe degrees of freedom for the denominator (dfF).\r\n\r\nUsage:   lfprob(dfnum, dfden, F)   where usually dfnum=dfbn, dfden=dfwn\r\n\"\"\"\r\n    p = betai(0.5*dfden, 0.5*dfnum, dfden/float(dfden+dfnum*F))\r\n    return p\r\n\r\n\r\ndef lbetacf(a,b,x):\r\n    \"\"\"\r\nThis function evaluates the continued fraction form of the incomplete\r\nBeta function, betai.  (Adapted from: Numerical Recipies in C.)\r\n\r\nUsage:   lbetacf(a,b,x)\r\n\"\"\"\r\n    ITMAX = 200\r\n    EPS = 3.0e-7\r\n\r\n    bm = az = am = 1.0\r\n    qab = a+b\r\n    qap = a+1.0\r\n    qam = a-1.0\r\n    bz = 1.0-qab*x/qap\r\n    for i in range(ITMAX+1):\r\n        em = float(i+1)\r\n        tem = em + em\r\n        d = em*(b-em)*x/((qam+tem)*(a+tem))\r\n        ap = az + d*am\r\n        bp = bz+d*bm\r\n        d = -(a+em)*(qab+em)*x/((qap+tem)*(a+tem))\r\n        app = ap+d*az\r\n        bpp = bp+d*bz\r\n        aold = az\r\n        am = ap/bpp\r\n        bm = bp/bpp\r\n        az = app/bpp\r\n        bz = 1.0\r\n        if (abs(az-aold)<(EPS*abs(az))):\r\n            return az\r\n    print 'a or b too big, or ITMAX too small in Betacf.'\r\n\r\n\r\ndef lgammln(xx):\r\n    \"\"\"\r\nReturns the gamma function of xx.\r\n    Gamma(z) = Integral(0,infinity) of t^(z-1)exp(-t) dt.\r\n(Adapted from: Numerical Recipies in C.)\r\n\r\nUsage:   lgammln(xx)\r\n\"\"\"\r\n\r\n    coeff = [76.18009173, -86.50532033, 24.01409822, -1.231739516,\r\n             0.120858003e-2, -0.536382e-5]\r\n    x = xx - 1.0\r\n    tmp = x + 5.5\r\n    tmp = tmp - (x+0.5)*math.log(tmp)\r\n    ser = 1.0\r\n    for j in range(len(coeff)):\r\n        x = x + 1\r\n        ser = ser + coeff[j]/x\r\n    return -tmp + math.log(2.50662827465*ser)\r\n\r\n\r\ndef lbetai(a,b,x):\r\n    \"\"\"\r\nReturns the incomplete beta function:\r\n\r\n    I-sub-x(a,b) = 1/B(a,b)*(Integral(0,x) of t^(a-1)(1-t)^(b-1) dt)\r\n\r\nwhere a,b>0 and B(a,b) = G(a)*G(b)/(G(a+b)) where G(a) is the gamma\r\nfunction of a.  The continued fraction formulation is implemented here,\r\nusing the betacf function.  (Adapted from: Numerical Recipies in C.)\r\n\r\nUsage:   lbetai(a,b,x)\r\n\"\"\"\r\n    if (x<0.0 or x>1.0):\r\n        raise ValueError, 'Bad x in lbetai'\r\n    if (x==0.0 or x==1.0):\r\n        bt = 0.0\r\n    else:\r\n        bt = math.exp(gammln(a+b)-gammln(a)-gammln(b)+a*math.log(x)+b*\r\n                      math.log(1.0-x))\r\n    if (x<(a+1.0)/(a+b+2.0)):\r\n        return bt*betacf(a,b,x)/float(a)\r\n    else:\r\n        return 1.0-bt*betacf(b,a,1.0-x)/float(b)\r\n\r\n\r\n####################################\r\n#######  ANOVA CALCULATIONS  #######\r\n####################################\r\n\r\ndef lF_oneway(*lists):\r\n    \"\"\"\r\nPerforms a 1-way ANOVA, returning an F-value and probability given\r\nany number of groups.  From Heiman, pp.394-7.\r\n\r\nUsage:   F_oneway(*lists)    where *lists is any number of lists, one per\r\n                                  treatment group\r\nReturns: F value, one-tailed p-value\r\n\"\"\"\r\n    a = len(lists)           # ANOVA on 'a' groups, each in it's own list\r\n    means = [0]*a\r\n    vars = [0]*a\r\n    ns = [0]*a\r\n    alldata = []\r\n    tmp = map(N.array,lists)\r\n    means = map(amean,tmp)\r\n    vars = map(avar,tmp)\r\n    ns = map(len,lists)\r\n    for i in range(len(lists)):\r\n        alldata = alldata + lists[i]\r\n    alldata = N.array(alldata)\r\n    bign = len(alldata)\r\n    sstot = ass(alldata)-(asquare_of_sums(alldata)/float(bign))\r\n    ssbn = 0\r\n    for list in lists:\r\n        ssbn = ssbn + asquare_of_sums(N.array(list))/float(len(list))\r\n    ssbn = ssbn - (asquare_of_sums(alldata)/float(bign))\r\n    sswn = sstot-ssbn\r\n    dfbn = a-1\r\n    dfwn = bign - a\r\n    msb = ssbn/float(dfbn)\r\n    msw = sswn/float(dfwn)\r\n    f = msb/msw\r\n    prob = fprob(dfbn,dfwn,f)\r\n    return f, prob\r\n\r\n\r\ndef lF_value (ER,EF,dfnum,dfden):\r\n    \"\"\"\r\nReturns an F-statistic given the following:\r\n        ER  = error associated with the null hypothesis (the Restricted model)\r\n        EF  = error associated with the alternate hypothesis (the Full model)\r\n        dfR-dfF = degrees of freedom of the numerator\r\n        dfF = degrees of freedom associated with the denominator/Full model\r\n\r\nUsage:   lF_value(ER,EF,dfnum,dfden)\r\n\"\"\"\r\n    return ((ER-EF)/float(dfnum) / (EF/float(dfden)))\r\n\r\n\r\n####################################\r\n########  SUPPORT FUNCTIONS  #######\r\n####################################\r\n\r\ndef writecc (listoflists,file,writetype='w',extra=2):\r\n    \"\"\"\r\nWrites a list of lists to a file in columns, customized by the max\r\nsize of items within the columns (max size of items in col, +2 characters)\r\nto specified file.  File-overwrite is the default.\r\n\r\nUsage:   writecc (listoflists,file,writetype='w',extra=2)\r\nReturns: None\r\n\"\"\"\r\n    if type(listoflists[0]) not in [ListType,TupleType]:\r\n        listoflists = [listoflists]\r\n    outfile = open(file,writetype)\r\n    rowstokill = []\r\n    list2print = copy.deepcopy(listoflists)\r\n    for i in range(len(listoflists)):\r\n        if listoflists[i] == ['\\n'] or listoflists[i]=='\\n' or listoflists[i]=='dashes':\r\n            rowstokill = rowstokill + [i]\r\n    rowstokill.reverse()\r\n    for row in rowstokill:\r\n        del list2print[row]\r\n    maxsize = [0]*len(list2print[0])\r\n    for col in range(len(list2print[0])):\r\n        items = pstats.colex(list2print,col)\r\n        items = map(pstats.makestr,items)\r\n        maxsize[col] = max(map(len,items)) + extra\r\n    for row in listoflists:\r\n        if row == ['\\n'] or row == '\\n':\r\n            outfile.write('\\n')\r\n        elif row == ['dashes'] or row == 'dashes':\r\n            dashes = [0]*len(maxsize)\r\n            for j in range(len(maxsize)):\r\n                dashes[j] = '-'*(maxsize[j]-2)\r\n            outfile.write(pstats.lineincustcols(dashes,maxsize))\r\n        else:\r\n            outfile.write(pstats.lineincustcols(row,maxsize))\r\n        outfile.write('\\n')\r\n    outfile.close()\r\n    return None\r\n\r\n\r\ndef lincr(l,cap):        # to increment a list up to a max-list of 'cap'\r\n    \"\"\"\r\nSimulate a counting system from an n-dimensional list.\r\n\r\nUsage:   lincr(l,cap)   l=list to increment, cap=max values for each list pos'n\r\nReturns: next set of values for list l, OR -1 (if overflow)\r\n\"\"\"\r\n    l[0] = l[0] + 1     # e.g., [0,0,0] --> [2,4,3] (=cap)\r\n    for i in range(len(l)):\r\n        if l[i] > cap[i] and i < len(l)-1: # if carryover AND not done\r\n            l[i] = 0\r\n            l[i+1] = l[i+1] + 1\r\n        elif l[i] > cap[i] and i == len(l)-1: # overflow past last column, must be finished\r\n            l = -1\r\n    return l\r\n\r\n\r\ndef lsum (inlist):\r\n    \"\"\"\r\nReturns the sum of the items in the passed list.\r\n\r\nUsage:   lsum(inlist)\r\n\"\"\"\r\n    s = 0\r\n    for item in inlist:\r\n        s = s + item\r\n    return s\r\n\r\n\r\ndef lcumsum (inlist):\r\n    \"\"\"\r\nReturns a list consisting of the cumulative sum of the items in the\r\npassed list.\r\n\r\nUsage:   lcumsum(inlist)\r\n\"\"\"\r\n    newlist = copy.deepcopy(inlist)\r\n    for i in range(1,len(newlist)):\r\n        newlist[i] = newlist[i] + newlist[i-1]\r\n    return newlist\r\n\r\n\r\ndef lss(inlist):\r\n    \"\"\"\r\nSquares each value in the passed list, adds up these squares and\r\nreturns the result.\r\n\r\nUsage:   lss(inlist)\r\n\"\"\"\r\n    ss = 0\r\n    for item in inlist:\r\n        ss = ss + item*item\r\n    return ss\r\n\r\n\r\ndef lsummult (list1,list2):\r\n    \"\"\"\r\nMultiplies elements in list1 and list2, element by element, and\r\nreturns the sum of all resulting multiplications.  Must provide equal\r\nlength lists.\r\n\r\nUsage:   lsummult(list1,list2)\r\n\"\"\"\r\n    if len(list1) <> len(list2):\r\n        raise ValueError, \"Lists not equal length in summult.\"\r\n    s = 0\r\n    for item1,item2 in pstats.abut(list1,list2):\r\n        s = s + item1*item2\r\n    return s\r\n\r\n\r\ndef lsumdiffsquared(x,y):\r\n    \"\"\"\r\nTakes pairwise differences of the values in lists x and y, squares\r\nthese differences, and returns the sum of these squares.\r\n\r\nUsage:   lsumdiffsquared(x,y)\r\nReturns: sum[(x[i]-y[i])**2]\r\n\"\"\"\r\n    sds = 0\r\n    for i in range(len(x)):\r\n        sds = sds + (x[i]-y[i])**2\r\n    return sds\r\n\r\n\r\ndef lsquare_of_sums(inlist):\r\n    \"\"\"\r\nAdds the values in the passed list, squares the sum, and returns\r\nthe result.\r\n\r\nUsage:   lsquare_of_sums(inlist)\r\nReturns: sum(inlist[i])**2\r\n\"\"\"\r\n    s = sum(inlist)\r\n    return float(s)*s\r\n\r\n\r\ndef lshellsort(inlist):\r\n    \"\"\"\r\nShellsort algorithm.  Sorts a 1D-list.\r\n\r\nUsage:   lshellsort(inlist)\r\nReturns: sorted-inlist, sorting-index-vector (for original list)\r\n\"\"\"\r\n    n = len(inlist)\r\n    svec = copy.deepcopy(inlist)\r\n    ivec = range(n)\r\n    gap = n/2   # integer division needed\r\n    while gap >0:\r\n        for i in range(gap,n):\r\n            for j in range(i-gap,-1,-gap):\r\n                while j>=0 and svec[j]>svec[j+gap]:\r\n                    temp        = svec[j]\r\n                    svec[j]     = svec[j+gap]\r\n                    svec[j+gap] = temp\r\n                    itemp       = ivec[j]\r\n                    ivec[j]     = ivec[j+gap]\r\n                    ivec[j+gap] = itemp\r\n        gap = gap / 2  # integer division needed\r\n# svec is now sorted inlist, and ivec has the order svec[i] = vec[ivec[i]]\r\n    return svec, ivec\r\n\r\n\r\ndef lrankdata(inlist):\r\n    \"\"\"\r\nRanks the data in inlist, dealing with ties appropritely.  Assumes\r\na 1D inlist.  Adapted from Gary Perlman's |Stat ranksort.\r\n\r\nUsage:   lrankdata(inlist)\r\nReturns: a list of length equal to inlist, containing rank scores\r\n\"\"\"\r\n    n = len(inlist)\r\n    svec, ivec = shellsort(inlist)\r\n    sumranks = 0\r\n    dupcount = 0\r\n    newlist = [0]*n\r\n    for i in range(n):\r\n        sumranks = sumranks + i\r\n        dupcount = dupcount + 1\r\n        if i==n-1 or svec[i] <> svec[i+1]:\r\n            averank = sumranks / float(dupcount) + 1\r\n            for j in range(i-dupcount+1,i+1):\r\n                newlist[ivec[j]] = averank\r\n            sumranks = 0\r\n            dupcount = 0\r\n    return newlist\r\n\r\n\r\ndef outputpairedstats(fname,writemode,name1,n1,m1,se1,min1,max1,name2,n2,m2,se2,min2,max2,statname,stat,prob):\r\n    \"\"\"\r\nPrints or write to a file stats for two groups, using the name, n,\r\nmean, sterr, min and max for each group, as well as the statistic name,\r\nits value, and the associated p-value.\r\n\r\nUsage:   outputpairedstats(fname,writemode,\r\n                           name1,n1,mean1,stderr1,min1,max1,\r\n                           name2,n2,mean2,stderr2,min2,max2,\r\n                           statname,stat,prob)\r\nReturns: None\r\n\"\"\"\r\n    suffix = ''                       # for *s after the p-value\r\n    try:\r\n        x = prob.shape\r\n        prob = prob[0]\r\n    except:\r\n        pass\r\n    if  prob < 0.001:  suffix = '  ***'\r\n    elif prob < 0.01:  suffix = '  **'\r\n    elif prob < 0.05:  suffix = '  *'\r\n    title = [['Name','N','Mean','SD','Min','Max']]\r\n    lofl = title+[[name1,n1,round(m1,3),round(math.sqrt(se1),3),min1,max1],\r\n                  [name2,n2,round(m2,3),round(math.sqrt(se2),3),min2,max2]]\r\n    if type(fname)<>StringType or len(fname)==0:\r\n        print\r\n        print statname\r\n        print\r\n        pstats.printcc(lofl)\r\n        print\r\n        try:\r\n            if stat.shape == ():\r\n                stat = stat[0]\r\n            if prob.shape == ():\r\n                prob = prob[0]\r\n        except:\r\n            pass\r\n        print 'Test statistic = ',round(stat,3),'   p = ',round(prob,3),suffix\r\n        print\r\n    else:\r\n        file = open(fname,writemode)\r\n        file.write('\\n'+statname+'\\n\\n')\r\n        file.close()\r\n        writecc(lofl,fname,'a')\r\n        file = open(fname,'a')\r\n        try:\r\n            if stat.shape == ():\r\n                stat = stat[0]\r\n            if prob.shape == ():\r\n                prob = prob[0]\r\n        except:\r\n            pass\r\n        file.write(pstats.list2string(['\\nTest statistic = ',round(stat,4),'   p = ',round(prob,4),suffix,'\\n\\n']))\r\n        file.close()\r\n    return None\r\n\r\n\r\ndef lfindwithin (data):\r\n    \"\"\"\r\nReturns an integer representing a binary vector, where 1=within-\r\nsubject factor, 0=between.  Input equals the entire data 2D list (i.e.,\r\ncolumn 0=random factor, column -1=measured values (those two are skipped).\r\nNote: input data is in |Stat format ... a list of lists (\"2D list\") with \r\none row per measured value, first column=subject identifier, last column=\r\nscore, one in-between column per factor (these columns contain level\r\ndesignations on each factor).  See also stats.anova.__doc__.\r\n\r\nUsage:   lfindwithin(data)     data in |Stat format\r\n\"\"\"\r\n\r\n    numfact = len(data[0])-1\r\n    withinvec = 0\r\n    for col in range(1,numfact):\r\n        examplelevel = pstats.unique(pstats.colex(data,col))[0]\r\n        rows = pstats.linexand(data,col,examplelevel)  # get 1 level of this factor\r\n        factsubjs = pstats.unique(pstats.colex(rows,0))\r\n        allsubjs = pstats.unique(pstats.colex(data,0))\r\n        if len(factsubjs) == len(allsubjs):  # fewer Ss than scores on this factor?\r\n            withinvec = withinvec + (1 << col)\r\n    return withinvec\r\n\r\n\r\n#########################################################\r\n#########################################################\r\n####### DISPATCH LISTS AND TUPLES TO ABOVE FCNS #########\r\n#########################################################\r\n#########################################################\r\n\r\n## CENTRAL TENDENCY:\r\ngeometricmean = Dispatch ( (lgeometricmean, (ListType, TupleType)), )\r\nharmonicmean = Dispatch ( (lharmonicmean, (ListType, TupleType)), )\r\nmean = Dispatch ( (lmean, (ListType, TupleType)), )\r\nmedian = Dispatch ( (lmedian, (ListType, TupleType)), )\r\nmedianscore = Dispatch ( (lmedianscore, (ListType, TupleType)), )\r\nmode = Dispatch ( (lmode, (ListType, TupleType)), )\r\n\r\n## MOMENTS:\r\nmoment = Dispatch ( (lmoment, (ListType, TupleType)), )\r\nvariation = Dispatch ( (lvariation, (ListType, TupleType)), )\r\nskew = Dispatch ( (lskew, (ListType, TupleType)), )\r\nkurtosis = Dispatch ( (lkurtosis, (ListType, TupleType)), )\r\ndescribe = Dispatch ( (ldescribe, (ListType, TupleType)), )\r\n\r\n## FREQUENCY STATISTICS:\r\nitemfreq = Dispatch ( (litemfreq, (ListType, TupleType)), )\r\nscoreatpercentile = Dispatch ( (lscoreatpercentile, (ListType, TupleType)), )\r\npercentileofscore = Dispatch ( (lpercentileofscore, (ListType, TupleType)), )\r\nhistogram = Dispatch ( (lhistogram, (ListType, TupleType)), )\r\ncumfreq = Dispatch ( (lcumfreq, (ListType, TupleType)), )\r\nrelfreq = Dispatch ( (lrelfreq, (ListType, TupleType)), )\r\n\r\n## VARIABILITY:\r\nobrientransform = Dispatch ( (lobrientransform, (ListType, TupleType)), )\r\nsamplevar = Dispatch ( (lsamplevar, (ListType, TupleType)), )\r\nsamplestdev = Dispatch ( (lsamplestdev, (ListType, TupleType)), )\r\nvar = Dispatch ( (lvar, (ListType, TupleType)), )\r\nstdev = Dispatch ( (lstdev, (ListType, TupleType)), )\r\nsterr = Dispatch ( (lsterr, (ListType, TupleType)), )\r\nsem = Dispatch ( (lsem, (ListType, TupleType)), )\r\nz = Dispatch ( (lz, (ListType, TupleType)), )\r\nzs = Dispatch ( (lzs, (ListType, TupleType)), )\r\n\r\n## TRIMMING FCNS:\r\ntrimboth = Dispatch ( (ltrimboth, (ListType, TupleType)), )\r\ntrim1 = Dispatch ( (ltrim1, (ListType, TupleType)), )\r\n\r\n## CORRELATION FCNS:\r\npaired = Dispatch ( (lpaired, (ListType, TupleType)), )\r\npearsonr = Dispatch ( (lpearsonr, (ListType, TupleType)), )\r\nspearmanr = Dispatch ( (lspearmanr, (ListType, TupleType)), )\r\npointbiserialr = Dispatch ( (lpointbiserialr, (ListType, TupleType)), )\r\nkendalltau = Dispatch ( (lkendalltau, (ListType, TupleType)), )\r\nlinregress = Dispatch ( (llinregress, (ListType, TupleType)), )\r\n\r\n## INFERENTIAL STATS:\r\nttest_1samp = Dispatch ( (lttest_1samp, (ListType, TupleType)), )\r\nttest_ind = Dispatch ( (lttest_ind, (ListType, TupleType)), )\r\nttest_rel = Dispatch ( (lttest_rel, (ListType, TupleType)), )\r\nchisquare = Dispatch ( (lchisquare, (ListType, TupleType)), )\r\nks_2samp = Dispatch ( (lks_2samp, (ListType, TupleType)), )\r\nmannwhitneyu = Dispatch ( (lmannwhitneyu, (ListType, TupleType)), )\r\nranksums = Dispatch ( (lranksums, (ListType, TupleType)), )\r\ntiecorrect = Dispatch ( (ltiecorrect, (ListType, TupleType)), )\r\nwilcoxont = Dispatch ( (lwilcoxont, (ListType, TupleType)), )\r\nkruskalwallish = Dispatch ( (lkruskalwallish, (ListType, TupleType)), )\r\nfriedmanchisquare = Dispatch ( (lfriedmanchisquare, (ListType, TupleType)), )\r\n\r\n## PROBABILITY CALCS:\r\nchisqprob = Dispatch ( (lchisqprob, (IntType, FloatType)), )\r\nzprob = Dispatch ( (lzprob, (IntType, FloatType)), )\r\nksprob = Dispatch ( (lksprob, (IntType, FloatType)), )\r\nfprob = Dispatch ( (lfprob, (IntType, FloatType)), )\r\nbetacf = Dispatch ( (lbetacf, (IntType, FloatType)), )\r\nbetai = Dispatch ( (lbetai, (IntType, FloatType)), )\r\nerfcc = Dispatch ( (lerfcc, (IntType, FloatType)), )\r\ngammln = Dispatch ( (lgammln, (IntType, FloatType)), )\r\n\r\n## ANOVA FUNCTIONS:\r\nF_oneway = Dispatch ( (lF_oneway, (ListType, TupleType)), )\r\nF_value = Dispatch ( (lF_value, (ListType, TupleType)), )\r\n\r\n## SUPPORT FUNCTIONS:\r\nincr = Dispatch ( (lincr, (ListType, TupleType)), )\r\nsum = Dispatch ( (lsum, (ListType, TupleType)), )\r\ncumsum = Dispatch ( (lcumsum, (ListType, TupleType)), )\r\nss = Dispatch ( (lss, (ListType, TupleType)), )\r\nsummult = Dispatch ( (lsummult, (ListType, TupleType)), )\r\nsquare_of_sums = Dispatch ( (lsquare_of_sums, (ListType, TupleType)), )\r\nsumdiffsquared = Dispatch ( (lsumdiffsquared, (ListType, TupleType)), )\r\nshellsort = Dispatch ( (lshellsort, (ListType, TupleType)), )\r\nrankdata = Dispatch ( (lrankdata, (ListType, TupleType)), )\r\nfindwithin = Dispatch ( (lfindwithin, (ListType, TupleType)), )\r\n\r\n\r\n#=============  THE ARRAY-VERSION OF THE STATS FUNCTIONS  ===============\r\n#=============  THE ARRAY-VERSION OF THE STATS FUNCTIONS  ===============\r\n#=============  THE ARRAY-VERSION OF THE STATS FUNCTIONS  ===============\r\n#=============  THE ARRAY-VERSION OF THE STATS FUNCTIONS  ===============\r\n#=============  THE ARRAY-VERSION OF THE STATS FUNCTIONS  ===============\r\n#=============  THE ARRAY-VERSION OF THE STATS FUNCTIONS  ===============\r\n#=============  THE ARRAY-VERSION OF THE STATS FUNCTIONS  ===============\r\n#=============  THE ARRAY-VERSION OF THE STATS FUNCTIONS  ===============\r\n#=============  THE ARRAY-VERSION OF THE STATS FUNCTIONS  ===============\r\n#=============  THE ARRAY-VERSION OF THE STATS FUNCTIONS  ===============\r\n#=============  THE ARRAY-VERSION OF THE STATS FUNCTIONS  ===============\r\n#=============  THE ARRAY-VERSION OF THE STATS FUNCTIONS  ===============\r\n#=============  THE ARRAY-VERSION OF THE STATS FUNCTIONS  ===============\r\n#=============  THE ARRAY-VERSION OF THE STATS FUNCTIONS  ===============\r\n#=============  THE ARRAY-VERSION OF THE STATS FUNCTIONS  ===============\r\n#=============  THE ARRAY-VERSION OF THE STATS FUNCTIONS  ===============\r\n#=============  THE ARRAY-VERSION OF THE STATS FUNCTIONS  ===============\r\n#=============  THE ARRAY-VERSION OF THE STATS FUNCTIONS  ===============\r\n#=============  THE ARRAY-VERSION OF THE STATS FUNCTIONS  ===============\r\n\r\ntry:                         # DEFINE THESE *ONLY* IF NUMERIC IS AVAILABLE\r\n import numpy as N\r\n import numpy.linalg as LA\r\n\r\n\r\n#####################################\r\n########  ACENTRAL TENDENCY  ########\r\n#####################################\r\n\r\n def ageometricmean (inarray,dimension=None,keepdims=0):\r\n    \"\"\"\r\nCalculates the geometric mean of the values in the passed array.\r\nThat is:  n-th root of (x1 * x2 * ... * xn).  Defaults to ALL values in\r\nthe passed array.  Use dimension=None to flatten array first.  REMEMBER: if\r\ndimension=0, it collapses over dimension 0 ('rows' in a 2D array) only, and\r\nif dimension is a sequence, it collapses over all specified dimensions.  If\r\nkeepdims is set to 1, the resulting array will have as many dimensions as\r\ninarray, with only 1 'level' per dim that was collapsed over.\r\n\r\nUsage:   ageometricmean(inarray,dimension=None,keepdims=0)\r\nReturns: geometric mean computed over dim(s) listed in dimension\r\n\"\"\"\r\n    inarray = N.array(inarray,N.float_)\r\n    if dimension == None:\r\n        inarray = N.ravel(inarray)\r\n        size = len(inarray)\r\n        mult = N.power(inarray,1.0/size)\r\n        mult = N.multiply.reduce(mult)\r\n    elif type(dimension) in [IntType,FloatType]:\r\n        size = inarray.shape[dimension]\r\n        mult = N.power(inarray,1.0/size)\r\n        mult = N.multiply.reduce(mult,dimension)\r\n        if keepdims == 1:\r\n            shp = list(inarray.shape)\r\n            shp[dimension] = 1\r\n            sum = N.reshape(sum,shp)\r\n    else: # must be a SEQUENCE of dims to average over\r\n        dims = list(dimension)\r\n        dims.sort()\r\n        dims.reverse()\r\n        size = N.array(N.multiply.reduce(N.take(inarray.shape,dims)),N.float_)\r\n        mult = N.power(inarray,1.0/size)\r\n        for dim in dims:\r\n            mult = N.multiply.reduce(mult,dim)\r\n        if keepdims == 1:\r\n            shp = list(inarray.shape)\r\n            for dim in dims:\r\n                shp[dim] = 1\r\n            mult = N.reshape(mult,shp)\r\n    return mult\r\n\r\n\r\n def aharmonicmean (inarray,dimension=None,keepdims=0):\r\n    \"\"\"\r\nCalculates the harmonic mean of the values in the passed array.\r\nThat is:  n / (1/x1 + 1/x2 + ... + 1/xn).  Defaults to ALL values in\r\nthe passed array.  Use dimension=None to flatten array first.  REMEMBER: if\r\ndimension=0, it collapses over dimension 0 ('rows' in a 2D array) only, and\r\nif dimension is a sequence, it collapses over all specified dimensions.  If\r\nkeepdims is set to 1, the resulting array will have as many dimensions as\r\ninarray, with only 1 'level' per dim that was collapsed over.\r\n\r\nUsage:   aharmonicmean(inarray,dimension=None,keepdims=0)\r\nReturns: harmonic mean computed over dim(s) in dimension\r\n\"\"\"\r\n    inarray = inarray.astype(N.float_)\r\n    if dimension == None:\r\n        inarray = N.ravel(inarray)\r\n        size = len(inarray)\r\n        s = N.add.reduce(1.0 / inarray)\r\n    elif type(dimension) in [IntType,FloatType]:\r\n        size = float(inarray.shape[dimension])\r\n        s = N.add.reduce(1.0/inarray, dimension)\r\n        if keepdims == 1:\r\n            shp = list(inarray.shape)\r\n            shp[dimension] = 1\r\n            s = N.reshape(s,shp)\r\n    else: # must be a SEQUENCE of dims to average over\r\n        dims = list(dimension)\r\n        dims.sort()\r\n        nondims = []\r\n        for i in range(len(inarray.shape)):\r\n            if i not in dims:\r\n                nondims.append(i)\r\n        tinarray = N.transpose(inarray,nondims+dims) # put keep-dims first\r\n        idx = [0] *len(nondims)\r\n        if idx == []:\r\n            size = len(N.ravel(inarray))\r\n            s = asum(1.0 / inarray)\r\n            if keepdims == 1:\r\n                s = N.reshape([s],N.ones(len(inarray.shape)))\r\n        else:\r\n            idx[0] = -1\r\n            loopcap = N.array(tinarray.shape[0:len(nondims)]) -1\r\n            s = N.zeros(loopcap+1,N.float_)\r\n            while incr(idx,loopcap) <> -1:\r\n                s[idx] = asum(1.0/tinarray[idx])\r\n            size = N.multiply.reduce(N.take(inarray.shape,dims))\r\n            if keepdims == 1:\r\n                shp = list(inarray.shape)\r\n                for dim in dims:\r\n                    shp[dim] = 1\r\n                s = N.reshape(s,shp)\r\n    return size / s\r\n\r\n\r\n def amean (inarray,dimension=None,keepdims=0):\r\n    \"\"\"\r\nCalculates the arithmatic mean of the values in the passed array.\r\nThat is:  1/n * (x1 + x2 + ... + xn).  Defaults to ALL values in the\r\npassed array.  Use dimension=None to flatten array first.  REMEMBER: if\r\ndimension=0, it collapses over dimension 0 ('rows' in a 2D array) only, and\r\nif dimension is a sequence, it collapses over all specified dimensions.  If\r\nkeepdims is set to 1, the resulting array will have as many dimensions as\r\ninarray, with only 1 'level' per dim that was collapsed over.\r\n\r\nUsage:   amean(inarray,dimension=None,keepdims=0)\r\nReturns: arithematic mean calculated over dim(s) in dimension\r\n\"\"\"\r\n    if inarray.dtype in [N.int_, N.short,N.ubyte]:\r\n        inarray = inarray.astype(N.float_)\r\n    if dimension == None:\r\n        inarray = N.ravel(inarray)\r\n        sum = N.add.reduce(inarray)\r\n        denom = float(len(inarray))\r\n    elif type(dimension) in [IntType,FloatType]:\r\n        sum = asum(inarray,dimension)\r\n        denom = float(inarray.shape[dimension])\r\n        if keepdims == 1:\r\n            shp = list(inarray.shape)\r\n            shp[dimension] = 1\r\n            sum = N.reshape(sum,shp)\r\n    else: # must be a TUPLE of dims to average over\r\n        dims = list(dimension)\r\n        dims.sort()\r\n        dims.reverse()\r\n        sum = inarray *1.0\r\n        for dim in dims:\r\n            sum = N.add.reduce(sum,dim)\r\n        denom = N.array(N.multiply.reduce(N.take(inarray.shape,dims)),N.float_)\r\n        if keepdims == 1:\r\n            shp = list(inarray.shape)\r\n            for dim in dims:\r\n                shp[dim] = 1\r\n            sum = N.reshape(sum,shp)\r\n    return sum/denom\r\n\r\n\r\n def amedian (inarray,numbins=1000):\r\n    \"\"\"\r\nCalculates the COMPUTED median value of an array of numbers, given the\r\nnumber of bins to use for the histogram (more bins approaches finding the\r\nprecise median value of the array; default number of bins = 1000).  From\r\nG.W. Heiman's Basic Stats, or CRC Probability & Statistics.\r\nNOTE:  THIS ROUTINE ALWAYS uses the entire passed array (flattens it first).\r\n\r\nUsage:   amedian(inarray,numbins=1000)\r\nReturns: median calculated over ALL values in inarray\r\n\"\"\"\r\n    inarray = N.ravel(inarray)\r\n    (hist, smallest, binsize, extras) = ahistogram(inarray,numbins,[min(inarray),max(inarray)])\r\n    cumhist = N.cumsum(hist)            # make cumulative histogram\r\n    otherbins = N.greater_equal(cumhist,len(inarray)/2.0)\r\n    otherbins = list(otherbins)         # list of 0/1s, 1s start at median bin\r\n    cfbin = otherbins.index(1)                # get 1st(!) index holding 50%ile score\r\n    LRL = smallest + binsize*cfbin        # get lower read limit of that bin\r\n    cfbelow = N.add.reduce(hist[0:cfbin])        # cum. freq. below bin\r\n    freq = hist[cfbin]                        # frequency IN the 50%ile bin\r\n    median = LRL + ((len(inarray)/2.0-cfbelow)/float(freq))*binsize # MEDIAN\r\n    return median\r\n\r\n\r\n def amedianscore (inarray,dimension=None):\r\n    \"\"\"\r\nReturns the 'middle' score of the passed array.  If there is an even\r\nnumber of scores, the mean of the 2 middle scores is returned.  Can function\r\nwith 1D arrays, or on the FIRST dimension of 2D arrays (i.e., dimension can\r\nbe None, to pre-flatten the array, or else dimension must equal 0).\r\n\r\nUsage:   amedianscore(inarray,dimension=None)\r\nReturns: 'middle' score of the array, or the mean of the 2 middle scores\r\n\"\"\"\r\n    if dimension == None:\r\n        inarray = N.ravel(inarray)\r\n        dimension = 0\r\n    inarray = N.sort(inarray,dimension)\r\n    if inarray.shape[dimension] % 2 == 0:   # if even number of elements\r\n        indx = inarray.shape[dimension]/2   # integer division correct\r\n        median = N.asarray(inarray[indx]+inarray[indx-1]) / 2.0\r\n    else:\r\n        indx = inarray.shape[dimension] / 2 # integer division correct\r\n        median = N.take(inarray,[indx],dimension)\r\n        if median.shape == (1,):\r\n            median = median[0]\r\n    return median\r\n\r\n\r\n def amode(a, dimension=None):\r\n    \"\"\"\r\nReturns an array of the modal (most common) score in the passed array.\r\nIf there is more than one such score, ONLY THE FIRST is returned.\r\nThe bin-count for the modal values is also returned.  Operates on whole\r\narray (dimension=None), or on a given dimension.\r\n\r\nUsage:   amode(a, dimension=None)\r\nReturns: array of bin-counts for mode(s), array of corresponding modal values\r\n\"\"\"\r\n\r\n    if dimension == None:\r\n        a = N.ravel(a)\r\n        dimension = 0\r\n    scores = pstats.aunique(N.ravel(a))       # get ALL unique values\r\n    testshape = list(a.shape)\r\n    testshape[dimension] = 1\r\n    oldmostfreq = N.zeros(testshape)\r\n    oldcounts = N.zeros(testshape)\r\n    for score in scores:\r\n        template = N.equal(a,score)\r\n        counts = asum(template,dimension,1)\r\n        mostfrequent = N.where(counts>oldcounts,score,oldmostfreq)\r\n        oldcounts = N.where(counts>oldcounts,counts,oldcounts)\r\n        oldmostfreq = mostfrequent\r\n    return oldcounts, mostfrequent\r\n\r\n\r\n def atmean(a,limits=None,inclusive=(1,1)):\r\n     \"\"\"\r\nReturns the arithmetic mean of all values in an array, ignoring values\r\nstrictly outside the sequence passed to 'limits'.   Note: either limit\r\nin the sequence, or the value of limits itself, can be set to None.  The\r\ninclusive list/tuple determines whether the lower and upper limiting bounds\r\n(respectively) are open/exclusive (0) or closed/inclusive (1).\r\n\r\nUsage:   atmean(a,limits=None,inclusive=(1,1))\r\n\"\"\"\r\n     if a.dtype in [N.int_, N.short,N.ubyte]:\r\n         a = a.astype(N.float_)\r\n     if limits == None:\r\n         return mean(a)\r\n     assert type(limits) in [ListType,TupleType,N.ndarray], \"Wrong type for limits in atmean\"\r\n     if inclusive[0]:         lowerfcn = N.greater_equal\r\n     else:               lowerfcn = N.greater\r\n     if inclusive[1]:         upperfcn = N.less_equal\r\n     else:               upperfcn = N.less\r\n     if limits[0] > N.maximum.reduce(N.ravel(a)) or limits[1] < N.minimum.reduce(N.ravel(a)):\r\n         raise ValueError, \"No array values within given limits (atmean).\"\r\n     elif limits[0]==None and limits[1]<>None:\r\n         mask = upperfcn(a,limits[1])\r\n     elif limits[0]<>None and limits[1]==None:\r\n         mask = lowerfcn(a,limits[0])\r\n     elif limits[0]<>None and limits[1]<>None:\r\n         mask = lowerfcn(a,limits[0])*upperfcn(a,limits[1])\r\n     s = float(N.add.reduce(N.ravel(a*mask)))\r\n     n = float(N.add.reduce(N.ravel(mask)))\r\n     return s/n\r\n\r\n\r\n def atvar(a,limits=None,inclusive=(1,1)):\r\n     \"\"\"\r\nReturns the sample variance of values in an array, (i.e., using N-1),\r\nignoring values strictly outside the sequence passed to 'limits'.  \r\nNote: either limit in the sequence, or the value of limits itself,\r\ncan be set to None.  The inclusive list/tuple determines whether the lower\r\nand upper limiting bounds (respectively) are open/exclusive (0) or\r\nclosed/inclusive (1). ASSUMES A FLAT ARRAY (OR ELSE PREFLATTENS).\r\n\r\nUsage:   atvar(a,limits=None,inclusive=(1,1))\r\n\"\"\"\r\n     a = a.astype(N.float_)\r\n     if limits == None or limits == [None,None]:\r\n         return avar(a)\r\n     assert type(limits) in [ListType,TupleType,N.ndarray], \"Wrong type for limits in atvar\"\r\n     if inclusive[0]:    lowerfcn = N.greater_equal\r\n     else:               lowerfcn = N.greater\r\n     if inclusive[1]:    upperfcn = N.less_equal\r\n     else:               upperfcn = N.less\r\n     if limits[0] > N.maximum.reduce(N.ravel(a)) or limits[1] < N.minimum.reduce(N.ravel(a)):\r\n         raise ValueError, \"No array values within given limits (atvar).\"\r\n     elif limits[0]==None and limits[1]<>None:\r\n         mask = upperfcn(a,limits[1])\r\n     elif limits[0]<>None and limits[1]==None:\r\n         mask = lowerfcn(a,limits[0])\r\n     elif limits[0]<>None and limits[1]<>None:\r\n         mask = lowerfcn(a,limits[0])*upperfcn(a,limits[1])\r\n\r\n     a = N.compress(mask,a)  # squish out excluded values\r\n     return avar(a)\r\n\r\n\r\n def atmin(a,lowerlimit=None,dimension=None,inclusive=1):\r\n     \"\"\"\r\nReturns the minimum value of a, along dimension, including only values less\r\nthan (or equal to, if inclusive=1) lowerlimit.  If the limit is set to None,\r\nall values in the array are used.\r\n\r\nUsage:   atmin(a,lowerlimit=None,dimension=None,inclusive=1)\r\n\"\"\"\r\n     if inclusive:         lowerfcn = N.greater\r\n     else:               lowerfcn = N.greater_equal\r\n     if dimension == None:\r\n         a = N.ravel(a)\r\n         dimension = 0\r\n     if lowerlimit == None:\r\n         lowerlimit = N.minimum.reduce(N.ravel(a))-11\r\n     biggest = N.maximum.reduce(N.ravel(a))\r\n     ta = N.where(lowerfcn(a,lowerlimit),a,biggest)\r\n     return N.minimum.reduce(ta,dimension)\r\n\r\n\r\n def atmax(a,upperlimit,dimension=None,inclusive=1):\r\n     \"\"\"\r\nReturns the maximum value of a, along dimension, including only values greater\r\nthan (or equal to, if inclusive=1) upperlimit.  If the limit is set to None,\r\na limit larger than the max value in the array is used.\r\n\r\nUsage:   atmax(a,upperlimit,dimension=None,inclusive=1)\r\n\"\"\"\r\n     if inclusive:         upperfcn = N.less\r\n     else:               upperfcn = N.less_equal\r\n     if dimension == None:\r\n         a = N.ravel(a)\r\n         dimension = 0\r\n     if upperlimit == None:\r\n         upperlimit = N.maximum.reduce(N.ravel(a))+1\r\n     smallest = N.minimum.reduce(N.ravel(a))\r\n     ta = N.where(upperfcn(a,upperlimit),a,smallest)\r\n     return N.maximum.reduce(ta,dimension)\r\n\r\n\r\n def atstdev(a,limits=None,inclusive=(1,1)):\r\n     \"\"\"\r\nReturns the standard deviation of all values in an array, ignoring values\r\nstrictly outside the sequence passed to 'limits'.   Note: either limit\r\nin the sequence, or the value of limits itself, can be set to None.  The\r\ninclusive list/tuple determines whether the lower and upper limiting bounds\r\n(respectively) are open/exclusive (0) or closed/inclusive (1).\r\n\r\nUsage:   atstdev(a,limits=None,inclusive=(1,1))\r\n\"\"\"\r\n     return N.sqrt(tvar(a,limits,inclusive))\r\n\r\n\r\n def atsem(a,limits=None,inclusive=(1,1)):\r\n     \"\"\"\r\nReturns the standard error of the mean for the values in an array,\r\n(i.e., using N for the denominator), ignoring values strictly outside\r\nthe sequence passed to 'limits'.   Note: either limit in the sequence,\r\nor the value of limits itself, can be set to None.  The inclusive list/tuple\r\ndetermines whether the lower and upper limiting bounds (respectively) are\r\nopen/exclusive (0) or closed/inclusive (1).\r\n\r\nUsage:   atsem(a,limits=None,inclusive=(1,1))\r\n\"\"\"\r\n     sd = tstdev(a,limits,inclusive)\r\n     if limits == None or limits == [None,None]:\r\n         n = float(len(N.ravel(a)))\r\n         limits = [min(a)-1, max(a)+1]\r\n     assert type(limits) in [ListType,TupleType,N.ndarray], \"Wrong type for limits in atsem\"\r\n     if inclusive[0]:         lowerfcn = N.greater_equal\r\n     else:               lowerfcn = N.greater\r\n     if inclusive[1]:         upperfcn = N.less_equal\r\n     else:               upperfcn = N.less\r\n     if limits[0] > N.maximum.reduce(N.ravel(a)) or limits[1] < N.minimum.reduce(N.ravel(a)):\r\n         raise ValueError, \"No array values within given limits (atsem).\"\r\n     elif limits[0]==None and limits[1]<>None:\r\n         mask = upperfcn(a,limits[1])\r\n     elif limits[0]<>None and limits[1]==None:\r\n         mask = lowerfcn(a,limits[0])\r\n     elif limits[0]<>None and limits[1]<>None:\r\n         mask = lowerfcn(a,limits[0])*upperfcn(a,limits[1])\r\n     term1 = N.add.reduce(N.ravel(a*a*mask))\r\n     n = float(N.add.reduce(N.ravel(mask)))\r\n     return sd/math.sqrt(n)\r\n\r\n\r\n#####################################\r\n############  AMOMENTS  #############\r\n#####################################\r\n\r\n def amoment(a,moment=1,dimension=None):\r\n    \"\"\"\r\nCalculates the nth moment about the mean for a sample (defaults to the\r\n1st moment).  Generally used to calculate coefficients of skewness and\r\nkurtosis.  Dimension can equal None (ravel array first), an integer\r\n(the dimension over which to operate), or a sequence (operate over\r\nmultiple dimensions).\r\n\r\nUsage:   amoment(a,moment=1,dimension=None)\r\nReturns: appropriate moment along given dimension\r\n\"\"\"\r\n    if dimension == None:\r\n        a = N.ravel(a)\r\n        dimension = 0\r\n    if moment == 1:\r\n        return 0.0\r\n    else:\r\n        mn = amean(a,dimension,1)  # 1=keepdims\r\n        s = N.power((a-mn),moment)\r\n        return amean(s,dimension)\r\n\r\n\r\n def avariation(a,dimension=None):\r\n    \"\"\"\r\nReturns the coefficient of variation, as defined in CRC Standard\r\nProbability and Statistics, p.6. Dimension can equal None (ravel array\r\nfirst), an integer (the dimension over which to operate), or a\r\nsequence (operate over multiple dimensions).\r\n\r\nUsage:   avariation(a,dimension=None)\r\n\"\"\"\r\n    return 100.0*asamplestdev(a,dimension)/amean(a,dimension)\r\n\r\n\r\n def askew(a,dimension=None): \r\n    \"\"\" \r\nReturns the skewness of a distribution (normal ==> 0.0; >0 means extra\r\nweight in left tail).  Use askewtest() to see if it's close enough.\r\nDimension can equal None (ravel array first), an integer (the\r\ndimension over which to operate), or a sequence (operate over multiple\r\ndimensions).\r\n\r\nUsage:   askew(a, dimension=None)\r\nReturns: skew of vals in a along dimension, returning ZERO where all vals equal\r\n\"\"\"\r\n    denom = N.power(amoment(a,2,dimension),1.5)\r\n    zero = N.equal(denom,0)\r\n    if type(denom) == N.ndarray and asum(zero) <> 0:\r\n        print \"Number of zeros in askew: \",asum(zero)\r\n    denom = denom + zero  # prevent divide-by-zero\r\n    return N.where(zero, 0, amoment(a,3,dimension)/denom)\r\n\r\n\r\n def akurtosis(a,dimension=None):\r\n    \"\"\"\r\nReturns the kurtosis of a distribution (normal ==> 3.0; >3 means\r\nheavier in the tails, and usually more peaked).  Use akurtosistest()\r\nto see if it's close enough.  Dimension can equal None (ravel array\r\nfirst), an integer (the dimension over which to operate), or a\r\nsequence (operate over multiple dimensions).\r\n\r\nUsage:   akurtosis(a,dimension=None)\r\nReturns: kurtosis of values in a along dimension, and ZERO where all vals equal\r\n\"\"\"\r\n    denom = N.power(amoment(a,2,dimension),2)\r\n    zero = N.equal(denom,0)\r\n    if type(denom) == N.ndarray and asum(zero) <> 0:\r\n        print \"Number of zeros in akurtosis: \",asum(zero)\r\n    denom = denom + zero  # prevent divide-by-zero\r\n    return N.where(zero,0,amoment(a,4,dimension)/denom)\r\n\r\n\r\n def adescribe(inarray,dimension=None):\r\n     \"\"\"\r\nReturns several descriptive statistics of the passed array.  Dimension\r\ncan equal None (ravel array first), an integer (the dimension over\r\nwhich to operate), or a sequence (operate over multiple dimensions).\r\n\r\nUsage:   adescribe(inarray,dimension=None)\r\nReturns: n, (min,max), mean, standard deviation, skew, kurtosis\r\n\"\"\"\r\n     if dimension == None:\r\n         inarray = N.ravel(inarray)\r\n         dimension = 0\r\n     n = inarray.shape[dimension]\r\n     mm = (N.minimum.reduce(inarray),N.maximum.reduce(inarray))\r\n     m = amean(inarray,dimension)\r\n     sd = astdev(inarray,dimension)\r\n     skew = askew(inarray,dimension)\r\n     kurt = akurtosis(inarray,dimension)\r\n     return n, mm, m, sd, skew, kurt\r\n\r\n\r\n#####################################\r\n########  NORMALITY TESTS  ##########\r\n#####################################\r\n\r\n def askewtest(a,dimension=None):\r\n    \"\"\"\r\nTests whether the skew is significantly different from a normal\r\ndistribution.  Dimension can equal None (ravel array first), an\r\ninteger (the dimension over which to operate), or a sequence (operate\r\nover multiple dimensions).\r\n\r\nUsage:   askewtest(a,dimension=None)\r\nReturns: z-score and 2-tail z-probability\r\n\"\"\"\r\n    if dimension == None:\r\n        a = N.ravel(a)\r\n        dimension = 0\r\n    b2 = askew(a,dimension)\r\n    n = float(a.shape[dimension])\r\n    y = b2 * N.sqrt(((n+1)*(n+3)) / (6.0*(n-2)) )\r\n    beta2 = ( 3.0*(n*n+27*n-70)*(n+1)*(n+3) ) / ( (n-2.0)*(n+5)*(n+7)*(n+9) )\r\n    W2 = -1 + N.sqrt(2*(beta2-1))\r\n    delta = 1/N.sqrt(N.log(N.sqrt(W2)))\r\n    alpha = N.sqrt(2/(W2-1))\r\n    y = N.where(y==0,1,y)\r\n    Z = delta*N.log(y/alpha + N.sqrt((y/alpha)**2+1))\r\n    return Z, (1.0-zprob(Z))*2\r\n\r\n\r\n def akurtosistest(a,dimension=None):\r\n    \"\"\"\r\nTests whether a dataset has normal kurtosis (i.e.,\r\nkurtosis=3(n-1)/(n+1)) Valid only for n>20.  Dimension can equal None\r\n(ravel array first), an integer (the dimension over which to operate),\r\nor a sequence (operate over multiple dimensions).\r\n\r\nUsage:   akurtosistest(a,dimension=None)\r\nReturns: z-score and 2-tail z-probability, returns 0 for bad pixels\r\n\"\"\"\r\n    if dimension == None:\r\n        a = N.ravel(a)\r\n        dimension = 0\r\n    n = float(a.shape[dimension])\r\n    if n<20:\r\n        print \"akurtosistest only valid for n>=20 ... continuing anyway, n=\",n\r\n    b2 = akurtosis(a,dimension)\r\n    E = 3.0*(n-1) /(n+1)\r\n    varb2 = 24.0*n*(n-2)*(n-3) / ((n+1)*(n+1)*(n+3)*(n+5))\r\n    x = (b2-E)/N.sqrt(varb2)\r\n    sqrtbeta1 = 6.0*(n*n-5*n+2)/((n+7)*(n+9)) * N.sqrt((6.0*(n+3)*(n+5))/\r\n                                                       (n*(n-2)*(n-3)))\r\n    A = 6.0 + 8.0/sqrtbeta1 *(2.0/sqrtbeta1 + N.sqrt(1+4.0/(sqrtbeta1**2)))\r\n    term1 = 1 -2/(9.0*A)\r\n    denom = 1 +x*N.sqrt(2/(A-4.0))\r\n    denom = N.where(N.less(denom,0), 99, denom)\r\n    term2 = N.where(N.equal(denom,0), term1, N.power((1-2.0/A)/denom,1/3.0))\r\n    Z = ( term1 - term2 ) / N.sqrt(2/(9.0*A))\r\n    Z = N.where(N.equal(denom,99), 0, Z)\r\n    return Z, (1.0-zprob(Z))*2\r\n\r\n\r\n def anormaltest(a,dimension=None):\r\n    \"\"\"\r\nTests whether skew and/OR kurtosis of dataset differs from normal\r\ncurve.  Can operate over multiple dimensions.  Dimension can equal\r\nNone (ravel array first), an integer (the dimension over which to\r\noperate), or a sequence (operate over multiple dimensions).\r\n\r\nUsage:   anormaltest(a,dimension=None)\r\nReturns: z-score and 2-tail probability\r\n\"\"\"\r\n    if dimension == None:\r\n        a = N.ravel(a)\r\n        dimension = 0\r\n    s,p = askewtest(a,dimension)\r\n    k,p = akurtosistest(a,dimension)\r\n    k2 = N.power(s,2) + N.power(k,2)\r\n    return k2, achisqprob(k2,2)\r\n\r\n\r\n#####################################\r\n######  AFREQUENCY FUNCTIONS  #######\r\n#####################################\r\n\r\n def aitemfreq(a):\r\n    \"\"\"\r\nReturns a 2D array of item frequencies.  Column 1 contains item values,\r\ncolumn 2 contains their respective counts.  Assumes a 1D array is passed.\r\n@@@sorting OK?\r\n\r\nUsage:   aitemfreq(a)\r\nReturns: a 2D frequency table (col [0:n-1]=scores, col n=frequencies)\r\n\"\"\"\r\n    scores = pstats.aunique(a)\r\n    scores = N.sort(scores)\r\n    freq = N.zeros(len(scores))\r\n    for i in range(len(scores)):\r\n        freq[i] = N.add.reduce(N.equal(a,scores[i]))\r\n    return N.array(pstats.aabut(scores, freq))\r\n\r\n\r\n def ascoreatpercentile (inarray, percent):\r\n    \"\"\"\r\nUsage:   ascoreatpercentile(inarray,percent)   0<percent<100\r\nReturns: score at given percentile, relative to inarray distribution\r\n\"\"\"\r\n    percent = percent / 100.0\r\n    targetcf = percent*len(inarray)\r\n    h, lrl, binsize, extras = histogram(inarray)\r\n    cumhist = cumsum(h*1)\r\n    for i in range(len(cumhist)):\r\n        if cumhist[i] >= targetcf:\r\n            break\r\n    score = binsize * ((targetcf - cumhist[i-1]) / float(h[i])) + (lrl+binsize*i)\r\n    return score\r\n\r\n\r\n def apercentileofscore (inarray,score,histbins=10,defaultlimits=None):\r\n    \"\"\"\r\nNote: result of this function depends on the values used to histogram\r\nthe data(!).\r\n\r\nUsage:   apercentileofscore(inarray,score,histbins=10,defaultlimits=None)\r\nReturns: percentile-position of score (0-100) relative to inarray\r\n\"\"\"\r\n    h, lrl, binsize, extras = histogram(inarray,histbins,defaultlimits)\r\n    cumhist = cumsum(h*1)\r\n    i = int((score - lrl)/float(binsize))\r\n    pct = (cumhist[i-1]+((score-(lrl+binsize*i))/float(binsize))*h[i])/float(len(inarray)) * 100\r\n    return pct\r\n\r\n\r\n def ahistogram (inarray,numbins=10,defaultlimits=None,printextras=1):\r\n    \"\"\"\r\nReturns (i) an array of histogram bin counts, (ii) the smallest value\r\nof the histogram binning, and (iii) the bin width (the last 2 are not\r\nnecessarily integers).  Default number of bins is 10.  Defaultlimits\r\ncan be None (the routine picks bins spanning all the numbers in the\r\ninarray) or a 2-sequence (lowerlimit, upperlimit).  Returns all of the\r\nfollowing: array of bin values, lowerreallimit, binsize, extrapoints.\r\n\r\nUsage:   ahistogram(inarray,numbins=10,defaultlimits=None,printextras=1)\r\nReturns: (array of bin counts, bin-minimum, min-width, #-points-outside-range)\r\n\"\"\"\r\n    inarray = N.ravel(inarray)               # flatten any >1D arrays\r\n    if (defaultlimits <> None):\r\n        lowerreallimit = defaultlimits[0]\r\n        upperreallimit = defaultlimits[1]\r\n        binsize = (upperreallimit-lowerreallimit) / float(numbins)\r\n    else:\r\n        Min = N.minimum.reduce(inarray)\r\n        Max = N.maximum.reduce(inarray)\r\n        estbinwidth = float(Max - Min)/float(numbins) + 1e-6\r\n        binsize = (Max-Min+estbinwidth)/float(numbins)\r\n        lowerreallimit = Min - binsize/2.0  #lower real limit,1st bin\r\n    bins = N.zeros(numbins)\r\n    extrapoints = 0\r\n    for num in inarray:\r\n        try:\r\n            if (num-lowerreallimit) < 0:\r\n                extrapoints = extrapoints + 1\r\n            else:\r\n                bintoincrement = int((num-lowerreallimit) / float(binsize))\r\n                bins[bintoincrement] = bins[bintoincrement] + 1\r\n        except:                           # point outside lower/upper limits\r\n            extrapoints = extrapoints + 1\r\n    if (extrapoints > 0 and printextras == 1):\r\n        print '\\nPoints outside given histogram range =',extrapoints\r\n    return (bins, lowerreallimit, binsize, extrapoints)\r\n\r\n\r\n def acumfreq(a,numbins=10,defaultreallimits=None):\r\n    \"\"\"\r\nReturns a cumulative frequency histogram, using the histogram function.\r\nDefaultreallimits can be None (use all data), or a 2-sequence containing\r\nlower and upper limits on values to include.\r\n\r\nUsage:   acumfreq(a,numbins=10,defaultreallimits=None)\r\nReturns: array of cumfreq bin values, lowerreallimit, binsize, extrapoints\r\n\"\"\"\r\n    h,l,b,e = histogram(a,numbins,defaultreallimits)\r\n    cumhist = cumsum(h*1)\r\n    return cumhist,l,b,e\r\n\r\n\r\n def arelfreq(a,numbins=10,defaultreallimits=None):\r\n    \"\"\"\r\nReturns a relative frequency histogram, using the histogram function.\r\nDefaultreallimits can be None (use all data), or a 2-sequence containing\r\nlower and upper limits on values to include.\r\n\r\nUsage:   arelfreq(a,numbins=10,defaultreallimits=None)\r\nReturns: array of cumfreq bin values, lowerreallimit, binsize, extrapoints\r\n\"\"\"\r\n    h,l,b,e = histogram(a,numbins,defaultreallimits)\r\n    h = N.array(h/float(a.shape[0]))\r\n    return h,l,b,e\r\n\r\n\r\n#####################################\r\n######  AVARIABILITY FUNCTIONS  #####\r\n#####################################\r\n\r\n def aobrientransform(*args):\r\n    \"\"\"\r\nComputes a transform on input data (any number of columns).  Used to\r\ntest for homogeneity of variance prior to running one-way stats.  Each\r\narray in *args is one level of a factor.  If an F_oneway() run on the\r\ntransformed data and found significant, variances are unequal.   From\r\nMaxwell and Delaney, p.112.\r\n\r\nUsage:   aobrientransform(*args)    *args = 1D arrays, one per level of factor\r\nReturns: transformed data for use in an ANOVA\r\n\"\"\"\r\n    TINY = 1e-10\r\n    k = len(args)\r\n    n = N.zeros(k,N.float_)\r\n    v = N.zeros(k,N.float_)\r\n    m = N.zeros(k,N.float_)\r\n    nargs = []\r\n    for i in range(k):\r\n        nargs.append(args[i].astype(N.float_))\r\n        n[i] = float(len(nargs[i]))\r\n        v[i] = var(nargs[i])\r\n        m[i] = mean(nargs[i])\r\n    for j in range(k):\r\n        for i in range(n[j]):\r\n            t1 = (n[j]-1.5)*n[j]*(nargs[j][i]-m[j])**2\r\n            t2 = 0.5*v[j]*(n[j]-1.0)\r\n            t3 = (n[j]-1.0)*(n[j]-2.0)\r\n            nargs[j][i] = (t1-t2) / float(t3)\r\n    check = 1\r\n    for j in range(k):\r\n        if v[j] - mean(nargs[j]) > TINY:\r\n            check = 0\r\n    if check <> 1:\r\n        raise ValueError, 'Lack of convergence in obrientransform.'\r\n    else:\r\n        return N.array(nargs)\r\n\r\n\r\n def asamplevar (inarray,dimension=None,keepdims=0):\r\n    \"\"\"\r\nReturns the sample standard deviation of the values in the passed\r\narray (i.e., using N).  Dimension can equal None (ravel array first),\r\nan integer (the dimension over which to operate), or a sequence\r\n(operate over multiple dimensions).  Set keepdims=1 to return an array\r\nwith the same number of dimensions as inarray.\r\n\r\nUsage:   asamplevar(inarray,dimension=None,keepdims=0)\r\n\"\"\"\r\n    if dimension == None:\r\n        inarray = N.ravel(inarray)\r\n        dimension = 0\r\n    if dimension == 1:\r\n        mn = amean(inarray,dimension)[:,N.NewAxis]\r\n    else:\r\n        mn = amean(inarray,dimension,keepdims=1)\r\n    deviations = inarray - mn \r\n    if type(dimension) == ListType:\r\n        n = 1\r\n        for d in dimension:\r\n            n = n*inarray.shape[d]\r\n    else:\r\n        n = inarray.shape[dimension]\r\n    svar = ass(deviations,dimension,keepdims) / float(n)\r\n    return svar\r\n\r\n\r\n def asamplestdev (inarray, dimension=None, keepdims=0):\r\n    \"\"\"\r\nReturns the sample standard deviation of the values in the passed\r\narray (i.e., using N).  Dimension can equal None (ravel array first),\r\nan integer (the dimension over which to operate), or a sequence\r\n(operate over multiple dimensions).  Set keepdims=1 to return an array\r\nwith the same number of dimensions as inarray.\r\n\r\nUsage:   asamplestdev(inarray,dimension=None,keepdims=0)\r\n\"\"\"\r\n    return N.sqrt(asamplevar(inarray,dimension,keepdims))\r\n\r\n\r\n def asignaltonoise(instack,dimension=0):\r\n    \"\"\"\r\nCalculates signal-to-noise.  Dimension can equal None (ravel array\r\nfirst), an integer (the dimension over which to operate), or a\r\nsequence (operate over multiple dimensions).\r\n\r\nUsage:   asignaltonoise(instack,dimension=0):\r\nReturns: array containing the value of (mean/stdev) along dimension,\r\n         or 0 when stdev=0\r\n\"\"\"\r\n    m = mean(instack,dimension)\r\n    sd = stdev(instack,dimension)\r\n    return N.where(sd==0,0,m/sd)\r\n\r\n\r\n def acov (x,y, dimension=None,keepdims=0):\r\n    \"\"\"\r\nReturns the estimated covariance of the values in the passed\r\narray (i.e., N-1).  Dimension can equal None (ravel array first), an\r\ninteger (the dimension over which to operate), or a sequence (operate\r\nover multiple dimensions).  Set keepdims=1 to return an array with the\r\nsame number of dimensions as inarray.\r\n\r\nUsage:   acov(x,y,dimension=None,keepdims=0)\r\n\"\"\"\r\n    if dimension == None:\r\n        x = N.ravel(x)\r\n        y = N.ravel(y)\r\n        dimension = 0\r\n    xmn = amean(x,dimension,1)  # keepdims\r\n    xdeviations = x - xmn\r\n    ymn = amean(y,dimension,1)  # keepdims\r\n    ydeviations = y - ymn\r\n    if type(dimension) == ListType:\r\n        n = 1\r\n        for d in dimension:\r\n            n = n*x.shape[d]\r\n    else:\r\n        n = x.shape[dimension]\r\n    covar = N.sum(xdeviations*ydeviations)/float(n-1)\r\n    return covar\r\n\r\n\r\n def avar (inarray, dimension=None,keepdims=0):\r\n    \"\"\"\r\nReturns the estimated population variance of the values in the passed\r\narray (i.e., N-1).  Dimension can equal None (ravel array first), an\r\ninteger (the dimension over which to operate), or a sequence (operate\r\nover multiple dimensions).  Set keepdims=1 to return an array with the\r\nsame number of dimensions as inarray.\r\n\r\nUsage:   avar(inarray,dimension=None,keepdims=0)\r\n\"\"\"\r\n    if dimension == None:\r\n        inarray = N.ravel(inarray)\r\n        dimension = 0\r\n    mn = amean(inarray,dimension,1)\r\n    deviations = inarray - mn\r\n    if type(dimension) == ListType:\r\n        n = 1\r\n        for d in dimension:\r\n            n = n*inarray.shape[d]\r\n    else:\r\n        n = inarray.shape[dimension]\r\n    var = ass(deviations,dimension,keepdims)/float(n-1)\r\n    return var\r\n\r\n\r\n def astdev (inarray, dimension=None, keepdims=0):\r\n    \"\"\"\r\nReturns the estimated population standard deviation of the values in\r\nthe passed array (i.e., N-1).  Dimension can equal None (ravel array\r\nfirst), an integer (the dimension over which to operate), or a\r\nsequence (operate over multiple dimensions).  Set keepdims=1 to return\r\nan array with the same number of dimensions as inarray.\r\n\r\nUsage:   astdev(inarray,dimension=None,keepdims=0)\r\n\"\"\"\r\n    return N.sqrt(avar(inarray,dimension,keepdims))\r\n\r\n\r\n def asterr (inarray, dimension=None, keepdims=0):\r\n    \"\"\"\r\nReturns the estimated population standard error of the values in the\r\npassed array (i.e., N-1).  Dimension can equal None (ravel array\r\nfirst), an integer (the dimension over which to operate), or a\r\nsequence (operate over multiple dimensions).  Set keepdims=1 to return\r\nan array with the same number of dimensions as inarray.\r\n\r\nUsage:   asterr(inarray,dimension=None,keepdims=0)\r\n\"\"\"\r\n    if dimension == None:\r\n        inarray = N.ravel(inarray)\r\n        dimension = 0\r\n    return astdev(inarray,dimension,keepdims) / float(N.sqrt(inarray.shape[dimension]))\r\n\r\n\r\n def asem (inarray, dimension=None, keepdims=0):\r\n    \"\"\"\r\nReturns the standard error of the mean (i.e., using N) of the values\r\nin the passed array.  Dimension can equal None (ravel array first), an\r\ninteger (the dimension over which to operate), or a sequence (operate\r\nover multiple dimensions).  Set keepdims=1 to return an array with the\r\nsame number of dimensions as inarray.\r\n\r\nUsage:   asem(inarray,dimension=None, keepdims=0)\r\n\"\"\"\r\n    if dimension == None:\r\n        inarray = N.ravel(inarray)\r\n        dimension = 0\r\n    if type(dimension) == ListType:\r\n        n = 1\r\n        for d in dimension:\r\n            n = n*inarray.shape[d]\r\n    else:\r\n        n = inarray.shape[dimension]\r\n    s = asamplestdev(inarray,dimension,keepdims) / N.sqrt(n-1)\r\n    return s\r\n\r\n\r\n def az (a, score):\r\n    \"\"\"\r\nReturns the z-score of a given input score, given thearray from which\r\nthat score came.  Not appropriate for population calculations, nor for\r\narrays > 1D.\r\n\r\nUsage:   az(a, score)\r\n\"\"\"\r\n    z = (score-amean(a)) / asamplestdev(a)\r\n    return z\r\n\r\n\r\n def azs (a):\r\n    \"\"\"\r\nReturns a 1D array of z-scores, one for each score in the passed array,\r\ncomputed relative to the passed array.\r\n\r\nUsage:   azs(a)\r\n\"\"\"\r\n    zscores = []\r\n    for item in a:\r\n        zscores.append(z(a,item))\r\n    return N.array(zscores)\r\n\r\n\r\n def azmap (scores, compare, dimension=0):\r\n    \"\"\"\r\nReturns an array of z-scores the shape of scores (e.g., [x,y]), compared to\r\narray passed to compare (e.g., [time,x,y]).  Assumes collapsing over dim 0\r\nof the compare array.\r\n\r\nUsage:   azs(scores, compare, dimension=0)\r\n\"\"\"\r\n    mns = amean(compare,dimension)\r\n    sstd = asamplestdev(compare,0)\r\n    return (scores - mns) / sstd\r\n\r\n\r\n#####################################\r\n#######  ATRIMMING FUNCTIONS  #######\r\n#####################################\r\n\r\n## deleted around() as it's in numpy now\r\n\r\n def athreshold(a,threshmin=None,threshmax=None,newval=0):\r\n    \"\"\"\r\nLike Numeric.clip() except that values <threshmid or >threshmax are replaced\r\nby newval instead of by threshmin/threshmax (respectively).\r\n\r\nUsage:   athreshold(a,threshmin=None,threshmax=None,newval=0)\r\nReturns: a, with values <threshmin or >threshmax replaced with newval\r\n\"\"\"\r\n    mask = N.zeros(a.shape)\r\n    if threshmin <> None:\r\n        mask = mask + N.where(a<threshmin,1,0)\r\n    if threshmax <> None:\r\n        mask = mask + N.where(a>threshmax,1,0)\r\n    mask = N.clip(mask,0,1)\r\n    return N.where(mask,newval,a)\r\n\r\n\r\n def atrimboth (a,proportiontocut):\r\n    \"\"\"\r\nSlices off the passed proportion of items from BOTH ends of the passed\r\narray (i.e., with proportiontocut=0.1, slices 'leftmost' 10% AND\r\n'rightmost' 10% of scores.  You must pre-sort the array if you want\r\n\"proper\" trimming.  Slices off LESS if proportion results in a\r\nnon-integer slice index (i.e., conservatively slices off\r\nproportiontocut).\r\n\r\nUsage:   atrimboth (a,proportiontocut)\r\nReturns: trimmed version of array a\r\n\"\"\"\r\n    lowercut = int(proportiontocut*len(a))\r\n    uppercut = len(a) - lowercut\r\n    return a[lowercut:uppercut]\r\n\r\n\r\n def atrim1 (a,proportiontocut,tail='right'):\r\n    \"\"\"\r\nSlices off the passed proportion of items from ONE end of the passed\r\narray (i.e., if proportiontocut=0.1, slices off 'leftmost' or 'rightmost'\r\n10% of scores).  Slices off LESS if proportion results in a non-integer\r\nslice index (i.e., conservatively slices off proportiontocut).\r\n\r\nUsage:   atrim1(a,proportiontocut,tail='right')  or set tail='left'\r\nReturns: trimmed version of array a\r\n\"\"\"\r\n    if string.lower(tail) == 'right':\r\n        lowercut = 0\r\n        uppercut = len(a) - int(proportiontocut*len(a))\r\n    elif string.lower(tail) == 'left':\r\n        lowercut = int(proportiontocut*len(a))\r\n        uppercut = len(a)\r\n    return a[lowercut:uppercut]\r\n\r\n\r\n#####################################\r\n#####  ACORRELATION FUNCTIONS  ######\r\n#####################################\r\n\r\n def acovariance(X):\r\n    \"\"\"\r\nComputes the covariance matrix of a matrix X.  Requires a 2D matrix input.\r\n\r\nUsage:   acovariance(X)\r\nReturns: covariance matrix of X\r\n\"\"\"\r\n    if len(X.shape) <> 2:\r\n        raise TypeError, \"acovariance requires 2D matrices\"\r\n    n = X.shape[0]\r\n    mX = amean(X,0)\r\n    return N.dot(N.transpose(X),X) / float(n) - N.multiply.outer(mX,mX)\r\n\r\n\r\n def acorrelation(X):\r\n    \"\"\"\r\nComputes the correlation matrix of a matrix X.  Requires a 2D matrix input.\r\n\r\nUsage:   acorrelation(X)\r\nReturns: correlation matrix of X\r\n\"\"\"\r\n    C = acovariance(X)\r\n    V = N.diagonal(C)\r\n    return C / N.sqrt(N.multiply.outer(V,V))\r\n\r\n\r\n def apaired(x,y):\r\n    \"\"\"\r\nInteractively determines the type of data in x and y, and then runs the\r\nappropriated statistic for paired group data.\r\n\r\nUsage:   apaired(x,y)     x,y = the two arrays of values to be compared\r\nReturns: appropriate statistic name, value, and probability\r\n\"\"\"\r\n    samples = ''\r\n    while samples not in ['i','r','I','R','c','C']:\r\n        print '\\nIndependent or related samples, or correlation (i,r,c): ',\r\n        samples = raw_input()\r\n\r\n    if samples in ['i','I','r','R']:\r\n        print '\\nComparing variances ...',\r\n# USE O'BRIEN'S TEST FOR HOMOGENEITY OF VARIANCE, Maxwell & delaney, p.112\r\n        r = obrientransform(x,y)\r\n        f,p = F_oneway(pstats.colex(r,0),pstats.colex(r,1))\r\n        if p<0.05:\r\n            vartype='unequal, p='+str(round(p,4))\r\n        else:\r\n            vartype='equal'\r\n        print vartype\r\n        if samples in ['i','I']:\r\n            if vartype[0]=='e':\r\n                t,p = ttest_ind(x,y,None,0)\r\n                print '\\nIndependent samples t-test:  ', round(t,4),round(p,4)\r\n            else:\r\n                if len(x)>20 or len(y)>20:\r\n                    z,p = ranksums(x,y)\r\n                    print '\\nRank Sums test (NONparametric, n>20):  ', round(z,4),round(p,4)\r\n                else:\r\n                    u,p = mannwhitneyu(x,y)\r\n                    print '\\nMann-Whitney U-test (NONparametric, ns<20):  ', round(u,4),round(p,4)\r\n\r\n        else:  # RELATED SAMPLES\r\n            if vartype[0]=='e':\r\n                t,p = ttest_rel(x,y,0)\r\n                print '\\nRelated samples t-test:  ', round(t,4),round(p,4)\r\n            else:\r\n                t,p = ranksums(x,y)\r\n                print '\\nWilcoxon T-test (NONparametric):  ', round(t,4),round(p,4)\r\n    else:  # CORRELATION ANALYSIS\r\n        corrtype = ''\r\n        while corrtype not in ['c','C','r','R','d','D']:\r\n            print '\\nIs the data Continuous, Ranked, or Dichotomous (c,r,d): ',\r\n            corrtype = raw_input()\r\n        if corrtype in ['c','C']:\r\n            m,b,r,p,see = linregress(x,y)\r\n            print '\\nLinear regression for continuous variables ...'\r\n            lol = [['Slope','Intercept','r','Prob','SEestimate'],[round(m,4),round(b,4),round(r,4),round(p,4),round(see,4)]]\r\n            pstats.printcc(lol)\r\n        elif corrtype in ['r','R']:\r\n            r,p = spearmanr(x,y)\r\n            print '\\nCorrelation for ranked variables ...'\r\n            print \"Spearman's r: \",round(r,4),round(p,4)\r\n        else: # DICHOTOMOUS\r\n            r,p = pointbiserialr(x,y)\r\n            print '\\nAssuming x contains a dichotomous variable ...'\r\n            print 'Point Biserial r: ',round(r,4),round(p,4)\r\n    print '\\n\\n'\r\n    return None\r\n\r\n\r\n def dices(x,y):\r\n    \"\"\"\r\nCalculates Dice's coefficient ... (2*number of common terms)/(number of terms in x +\r\nnumber of terms in y). Returns a value between 0 (orthogonal) and 1.\r\n\r\nUsage:  dices(x,y)\r\n\"\"\"\r\n    import sets\r\n    x = sets.Set(x)\r\n    y = sets.Set(y)\r\n    common = len(x.intersection(y))\r\n    total = float(len(x) + len(y))\r\n    return 2*common/total\r\n\r\n\r\n def icc(x,y=None,verbose=0):\r\n    \"\"\"\r\nCalculates intraclass correlation coefficients using simple, Type I sums of squares.\r\nIf only one variable is passed, assumed it's an Nx2 matrix\r\n\r\nUsage:   icc(x,y=None,verbose=0)\r\nReturns: icc rho, prob ####PROB IS A GUESS BASED ON PEARSON\r\n\"\"\"\r\n    TINY = 1.0e-20\r\n    if y:\r\n        all = N.concatenate([x,y],0)\r\n    else:\r\n        all = x+0\r\n        x = all[:,0]\r\n        y = all[:,1]\r\n    totalss = ass(all-mean(all))\r\n    pairmeans = (x+y)/2.\r\n    withinss = ass(x-pairmeans) + ass(y-pairmeans)\r\n    withindf = float(len(x))\r\n    betwdf = float(len(x)-1)\r\n    withinms = withinss / withindf\r\n    betweenms = (totalss-withinss) / betwdf\r\n    rho = (betweenms-withinms)/(withinms+betweenms)\r\n    t = rho*math.sqrt(betwdf/((1.0-rho+TINY)*(1.0+rho+TINY)))\r\n    prob = abetai(0.5*betwdf,0.5,betwdf/(betwdf+t*t),verbose)\r\n    return rho, prob\r\n\r\n\r\n def alincc(x,y):\r\n    \"\"\"\r\nCalculates Lin's concordance correlation coefficient.\r\n\r\nUsage:   alincc(x,y)    where x, y are equal-length arrays\r\nReturns: Lin's CC\r\n\"\"\"\r\n    x = N.ravel(x)\r\n    y = N.ravel(y)\r\n    covar = acov(x,y)*(len(x)-1)/float(len(x))  # correct denom to n\r\n    xvar = avar(x)*(len(x)-1)/float(len(x))  # correct denom to n\r\n    yvar = avar(y)*(len(y)-1)/float(len(y))  # correct denom to n\r\n    lincc = (2 * covar) / ((xvar+yvar) +((amean(x)-amean(y))**2))\r\n    return lincc\r\n\r\n\r\n def apearsonr(x,y,verbose=1):\r\n    \"\"\"\r\nCalculates a Pearson correlation coefficient and returns p.  Taken\r\nfrom Heiman's Basic Statistics for the Behav. Sci (2nd), p.195.\r\n\r\nUsage:   apearsonr(x,y,verbose=1)      where x,y are equal length arrays\r\nReturns: Pearson's r, two-tailed p-value\r\n\"\"\"\r\n    TINY = 1.0e-20\r\n    n = len(x)\r\n    xmean = amean(x)\r\n    ymean = amean(y)\r\n    r_num = n*(N.add.reduce(x*y)) - N.add.reduce(x)*N.add.reduce(y)\r\n    r_den = math.sqrt((n*ass(x) - asquare_of_sums(x))*(n*ass(y)-asquare_of_sums(y)))\r\n    r = (r_num / r_den)\r\n    df = n-2\r\n    t = r*math.sqrt(df/((1.0-r+TINY)*(1.0+r+TINY)))\r\n    prob = abetai(0.5*df,0.5,df/(df+t*t),verbose)\r\n    return r,prob\r\n\r\n\r\n def aspearmanr(x,y):\r\n    \"\"\"\r\nCalculates a Spearman rank-order correlation coefficient.  Taken\r\nfrom Heiman's Basic Statistics for the Behav. Sci (1st), p.192.\r\n\r\nUsage:   aspearmanr(x,y)      where x,y are equal-length arrays\r\nReturns: Spearman's r, two-tailed p-value\r\n\"\"\"\r\n    TINY = 1e-30\r\n    n = len(x)\r\n    rankx = rankdata(x)\r\n    ranky = rankdata(y)\r\n    dsq = N.add.reduce((rankx-ranky)**2)\r\n    rs = 1 - 6*dsq / float(n*(n**2-1))\r\n    t = rs * math.sqrt((n-2) / ((rs+1.0)*(1.0-rs)))\r\n    df = n-2\r\n    probrs = abetai(0.5*df,0.5,df/(df+t*t))\r\n# probability values for rs are from part 2 of the spearman function in\r\n# Numerical Recipies, p.510.  They close to tables, but not exact.(?)\r\n    return rs, probrs\r\n\r\n\r\n def apointbiserialr(x,y):\r\n    \"\"\"\r\nCalculates a point-biserial correlation coefficient and the associated\r\nprobability value.  Taken from Heiman's Basic Statistics for the Behav.\r\nSci (1st), p.194.\r\n\r\nUsage:   apointbiserialr(x,y)      where x,y are equal length arrays\r\nReturns: Point-biserial r, two-tailed p-value\r\n\"\"\"\r\n    TINY = 1e-30\r\n    categories = pstats.aunique(x)\r\n    data = pstats.aabut(x,y)\r\n    if len(categories) <> 2:\r\n        raise ValueError, \"Exactly 2 categories required (in x) for pointbiserialr().\"\r\n    else:   # there are 2 categories, continue\r\n        codemap = pstats.aabut(categories,N.arange(2))\r\n        recoded = pstats.arecode(data,codemap,0)\r\n        x = pstats.alinexand(data,0,categories[0])\r\n        y = pstats.alinexand(data,0,categories[1])\r\n        xmean = amean(pstats.acolex(x,1))\r\n        ymean = amean(pstats.acolex(y,1))\r\n        n = len(data)\r\n        adjust = math.sqrt((len(x)/float(n))*(len(y)/float(n)))\r\n        rpb = (ymean - xmean)/asamplestdev(pstats.acolex(data,1))*adjust\r\n        df = n-2\r\n        t = rpb*math.sqrt(df/((1.0-rpb+TINY)*(1.0+rpb+TINY)))\r\n        prob = abetai(0.5*df,0.5,df/(df+t*t))\r\n        return rpb, prob\r\n\r\n\r\n def akendalltau(x,y):\r\n    \"\"\"\r\nCalculates Kendall's tau ... correlation of ordinal data.  Adapted\r\nfrom function kendl1 in Numerical Recipies.  Needs good test-cases.@@@\r\n\r\nUsage:   akendalltau(x,y)\r\nReturns: Kendall's tau, two-tailed p-value\r\n\"\"\"\r\n    n1 = 0\r\n    n2 = 0\r\n    iss = 0\r\n    for j in range(len(x)-1):\r\n        for k in range(j,len(y)):\r\n            a1 = x[j] - x[k]\r\n            a2 = y[j] - y[k]\r\n            aa = a1 * a2\r\n            if (aa):             # neither array has a tie\r\n                n1 = n1 + 1\r\n                n2 = n2 + 1\r\n                if aa > 0:\r\n                    iss = iss + 1\r\n                else:\r\n                    iss = iss -1\r\n            else:\r\n                if (a1):\r\n                    n1 = n1 + 1\r\n                else:\r\n                    n2 = n2 + 1\r\n    tau = iss / math.sqrt(n1*n2)\r\n    svar = (4.0*len(x)+10.0) / (9.0*len(x)*(len(x)-1))\r\n    z = tau / math.sqrt(svar)\r\n    prob = erfcc(abs(z)/1.4142136)\r\n    return tau, prob\r\n\r\n\r\n def alinregress(*args):\r\n    \"\"\"\r\nCalculates a regression line on two arrays, x and y, corresponding to x,y\r\npairs.  If a single 2D array is passed, alinregress finds dim with 2 levels\r\nand splits data into x,y pairs along that dim.\r\n\r\nUsage:   alinregress(*args)    args=2 equal-length arrays, or one 2D array\r\nReturns: slope, intercept, r, two-tailed prob, sterr-of-the-estimate, n\r\n\"\"\"\r\n    TINY = 1.0e-20\r\n    if len(args) == 1:  # more than 1D array?\r\n        args = args[0]\r\n        if len(args) == 2:\r\n            x = args[0]\r\n            y = args[1]\r\n        else:\r\n            x = args[:,0]\r\n            y = args[:,1]\r\n    else:\r\n        x = args[0]\r\n        y = args[1]\r\n    n = len(x)\r\n    xmean = amean(x)\r\n    ymean = amean(y)\r\n    r_num = n*(N.add.reduce(x*y)) - N.add.reduce(x)*N.add.reduce(y)\r\n    r_den = math.sqrt((n*ass(x) - asquare_of_sums(x))*(n*ass(y)-asquare_of_sums(y)))\r\n    r = r_num / r_den\r\n    z = 0.5*math.log((1.0+r+TINY)/(1.0-r+TINY))\r\n    df = n-2\r\n    t = r*math.sqrt(df/((1.0-r+TINY)*(1.0+r+TINY)))\r\n    prob = abetai(0.5*df,0.5,df/(df+t*t))\r\n    slope = r_num / (float(n)*ass(x) - asquare_of_sums(x))\r\n    intercept = ymean - slope*xmean\r\n    sterrest = math.sqrt(1-r*r)*asamplestdev(y)\r\n    return slope, intercept, r, prob, sterrest, n\r\n\r\n def amasslinregress(*args):\r\n    \"\"\"\r\nCalculates a regression line on one 1D array (x) and one N-D array (y).\r\n\r\nReturns: slope, intercept, r, two-tailed prob, sterr-of-the-estimate, n\r\n\"\"\"\r\n    TINY = 1.0e-20\r\n    if len(args) == 1:  # more than 1D array?\r\n        args = args[0]\r\n        if len(args) == 2:\r\n            x = N.ravel(args[0])\r\n            y = args[1]\r\n        else:\r\n            x = N.ravel(args[:,0])\r\n            y = args[:,1]\r\n    else:\r\n        x = args[0]\r\n        y = args[1]\r\n    x = x.astype(N.float_)\r\n    y = y.astype(N.float_)\r\n    n = len(x)\r\n    xmean = amean(x)\r\n    ymean = amean(y,0)\r\n    shp = N.ones(len(y.shape))\r\n    shp[0] = len(x)\r\n    x.shape = shp\r\n    print x.shape, y.shape\r\n    r_num = n*(N.add.reduce(x*y,0)) - N.add.reduce(x)*N.add.reduce(y,0)\r\n    r_den = N.sqrt((n*ass(x) - asquare_of_sums(x))*(n*ass(y,0)-asquare_of_sums(y,0)))\r\n    zerodivproblem = N.equal(r_den,0)\r\n    r_den = N.where(zerodivproblem,1,r_den)  # avoid zero-division in 1st place\r\n    r = r_num / r_den  # need to do this nicely for matrix division\r\n    r = N.where(zerodivproblem,0.0,r)\r\n    z = 0.5*N.log((1.0+r+TINY)/(1.0-r+TINY))\r\n    df = n-2\r\n    t = r*N.sqrt(df/((1.0-r+TINY)*(1.0+r+TINY)))\r\n    prob = abetai(0.5*df,0.5,df/(df+t*t))\r\n\r\n    ss = float(n)*ass(x)-asquare_of_sums(x)\r\n    s_den = N.where(ss==0,1,ss)  # avoid zero-division in 1st place\r\n    slope = r_num / s_den\r\n    intercept = ymean - slope*xmean\r\n    sterrest = N.sqrt(1-r*r)*asamplestdev(y,0)\r\n    return slope, intercept, r, prob, sterrest, n\r\n\r\n\r\n#####################################\r\n#####  AINFERENTIAL STATISTICS  #####\r\n#####################################\r\n\r\n def attest_1samp(a,popmean,printit=0,name='Sample',writemode='a'):\r\n    \"\"\"\r\nCalculates the t-obtained for the independent samples T-test on ONE group\r\nof scores a, given a population mean.  If printit=1, results are printed\r\nto the screen.  If printit='filename', the results are output to 'filename'\r\nusing the given writemode (default=append).  Returns t-value, and prob.\r\n\r\nUsage:   attest_1samp(a,popmean,Name='Sample',printit=0,writemode='a')\r\nReturns: t-value, two-tailed prob\r\n\"\"\"\r\n    if type(a) != N.ndarray:\r\n        a = N.array(a)\r\n    x = amean(a)\r\n    v = avar(a)\r\n    n = len(a)\r\n    df = n-1\r\n    svar = ((n-1)*v) / float(df)\r\n    t = (x-popmean)/math.sqrt(svar*(1.0/n))\r\n    prob = abetai(0.5*df,0.5,df/(df+t*t))\r\n\r\n    if printit <> 0:\r\n        statname = 'Single-sample T-test.'\r\n        outputpairedstats(printit,writemode,\r\n                          'Population','--',popmean,0,0,0,\r\n                          name,n,x,v,N.minimum.reduce(N.ravel(a)),\r\n                          N.maximum.reduce(N.ravel(a)),\r\n                          statname,t,prob)\r\n    return t,prob\r\n\r\n\r\n def attest_ind (a, b, dimension=None, printit=0, name1='Samp1', name2='Samp2',writemode='a'):\r\n    \"\"\"\r\nCalculates the t-obtained T-test on TWO INDEPENDENT samples of scores\r\na, and b.  From Numerical Recipies, p.483.  If printit=1, results are\r\nprinted to the screen.  If printit='filename', the results are output\r\nto 'filename' using the given writemode (default=append).  Dimension\r\ncan equal None (ravel array first), or an integer (the dimension over\r\nwhich to operate on a and b).\r\n\r\nUsage:   attest_ind (a,b,dimension=None,printit=0,\r\n                     Name1='Samp1',Name2='Samp2',writemode='a')\r\nReturns: t-value, two-tailed p-value\r\n\"\"\"\r\n    if dimension == None:\r\n        a = N.ravel(a)\r\n        b = N.ravel(b)\r\n        dimension = 0\r\n    x1 = amean(a,dimension)\r\n    x2 = amean(b,dimension)\r\n    v1 = avar(a,dimension)\r\n    v2 = avar(b,dimension)\r\n    n1 = a.shape[dimension]\r\n    n2 = b.shape[dimension]\r\n    df = n1+n2-2\r\n    svar = ((n1-1)*v1+(n2-1)*v2) / float(df)\r\n    zerodivproblem = N.equal(svar,0)\r\n    svar = N.where(zerodivproblem,1,svar)  # avoid zero-division in 1st place\r\n    t = (x1-x2)/N.sqrt(svar*(1.0/n1 + 1.0/n2))  # N-D COMPUTATION HERE!!!!!!\r\n    t = N.where(zerodivproblem,1.0,t)     # replace NaN/wrong t-values with 1.0\r\n    probs = abetai(0.5*df,0.5,float(df)/(df+t*t))\r\n\r\n    if type(t) == N.ndarray:\r\n        probs = N.reshape(probs,t.shape)\r\n    if probs.shape == (1,):\r\n        probs = probs[0]\r\n        \r\n    if printit <> 0:\r\n        if type(t) == N.ndarray:\r\n            t = t[0]\r\n        if type(probs) == N.ndarray:\r\n            probs = probs[0]\r\n        statname = 'Independent samples T-test.'\r\n        outputpairedstats(printit,writemode,\r\n                          name1,n1,x1,v1,N.minimum.reduce(N.ravel(a)),\r\n                          N.maximum.reduce(N.ravel(a)),\r\n                          name2,n2,x2,v2,N.minimum.reduce(N.ravel(b)),\r\n                          N.maximum.reduce(N.ravel(b)),\r\n                          statname,t,probs)\r\n        return\r\n    return t, probs\r\n\r\n def ap2t(pval,df):\r\n    \"\"\"\r\nTries to compute a t-value from a p-value (or pval array) and associated df.\r\nSLOW for large numbers of elements(!) as it re-computes p-values 20 times\r\n(smaller step-sizes) at which point it decides it's done. Keeps the signs\r\nof the input array. Returns 1000 (or -1000) if t>100.\r\n\r\nUsage:  ap2t(pval,df)\r\nReturns: an array of t-values with the shape of pval\r\n    \"\"\"\r\n    pval = N.array(pval)\r\n    signs = N.sign(pval)\r\n    pval = abs(pval)\r\n    t = N.ones(pval.shape,N.float_)*50\r\n    step = N.ones(pval.shape,N.float_)*25\r\n    print \"Initial ap2t() prob calc\"\r\n    prob = abetai(0.5*df,0.5,float(df)/(df+t*t))\r\n    print 'ap2t() iter: ',\r\n    for i in range(10):\r\n        print i,' ',\r\n        t = N.where(pval<prob,t+step,t-step)\r\n        prob = abetai(0.5*df,0.5,float(df)/(df+t*t))\r\n        step = step/2\r\n    print\r\n    # since this is an ugly hack, we get ugly boundaries\r\n    t = N.where(t>99.9,1000,t)      # hit upper-boundary\r\n    t = t+signs\r\n    return t #, prob, pval\r\n\r\n\r\n def attest_rel (a,b,dimension=None,printit=0,name1='Samp1',name2='Samp2',writemode='a'):\r\n    \"\"\"\r\nCalculates the t-obtained T-test on TWO RELATED samples of scores, a\r\nand b.  From Numerical Recipies, p.483.  If printit=1, results are\r\nprinted to the screen.  If printit='filename', the results are output\r\nto 'filename' using the given writemode (default=append).  Dimension\r\ncan equal None (ravel array first), or an integer (the dimension over\r\nwhich to operate on a and b).\r\n\r\nUsage:   attest_rel(a,b,dimension=None,printit=0,\r\n                    name1='Samp1',name2='Samp2',writemode='a')\r\nReturns: t-value, two-tailed p-value\r\n\"\"\"\r\n    if dimension == None:\r\n        a = N.ravel(a)\r\n        b = N.ravel(b)\r\n        dimension = 0\r\n    if len(a)<>len(b):\r\n        raise ValueError, 'Unequal length arrays.'\r\n    x1 = amean(a,dimension)\r\n    x2 = amean(b,dimension)\r\n    v1 = avar(a,dimension)\r\n    v2 = avar(b,dimension)\r\n    n = a.shape[dimension]\r\n    df = float(n-1)\r\n    d = (a-b).astype('d')\r\n\r\n    denom = N.sqrt((n*N.add.reduce(d*d,dimension) - N.add.reduce(d,dimension)**2) /df)\r\n    zerodivproblem = N.equal(denom,0)\r\n    denom = N.where(zerodivproblem,1,denom)  # avoid zero-division in 1st place\r\n    t = N.add.reduce(d,dimension) / denom      # N-D COMPUTATION HERE!!!!!!\r\n    t = N.where(zerodivproblem,1.0,t)     # replace NaN/wrong t-values with 1.0\r\n    probs = abetai(0.5*df,0.5,float(df)/(df+t*t))\r\n    if type(t) == N.ndarray:\r\n        probs = N.reshape(probs,t.shape)\r\n    if probs.shape == (1,):\r\n        probs = probs[0]\r\n\r\n    if printit <> 0:\r\n        statname = 'Related samples T-test.'\r\n        outputpairedstats(printit,writemode,\r\n                          name1,n,x1,v1,N.minimum.reduce(N.ravel(a)),\r\n                          N.maximum.reduce(N.ravel(a)),\r\n                          name2,n,x2,v2,N.minimum.reduce(N.ravel(b)),\r\n                          N.maximum.reduce(N.ravel(b)),\r\n                          statname,t,probs)\r\n        return\r\n    return t, probs\r\n\r\n\r\n def achisquare(f_obs,f_exp=None):\r\n    \"\"\"\r\nCalculates a one-way chi square for array of observed frequencies and returns\r\nthe result.  If no expected frequencies are given, the total N is assumed to\r\nbe equally distributed across all groups.\r\n@@@NOT RIGHT??\r\n\r\nUsage:   achisquare(f_obs, f_exp=None)   f_obs = array of observed cell freq.\r\nReturns: chisquare-statistic, associated p-value\r\n\"\"\"\r\n\r\n    k = len(f_obs)\r\n    if f_exp == None:\r\n        f_exp = N.array([sum(f_obs)/float(k)] * len(f_obs),N.float_)\r\n    f_exp = f_exp.astype(N.float_)\r\n    chisq = N.add.reduce((f_obs-f_exp)**2 / f_exp)\r\n    return chisq, achisqprob(chisq, k-1)\r\n\r\n\r\n def aks_2samp (data1,data2):\r\n    \"\"\"\r\nComputes the Kolmogorov-Smirnof statistic on 2 samples.  Modified from\r\nNumerical Recipies in C, page 493.  Returns KS D-value, prob.  Not ufunc-\r\nlike.\r\n\r\nUsage:   aks_2samp(data1,data2)  where data1 and data2 are 1D arrays\r\nReturns: KS D-value, p-value\r\n\"\"\"\r\n    j1 = 0    # N.zeros(data1.shape[1:]) TRIED TO MAKE THIS UFUNC-LIKE\r\n    j2 = 0    # N.zeros(data2.shape[1:])\r\n    fn1 = 0.0 # N.zeros(data1.shape[1:],N.float_)\r\n    fn2 = 0.0 # N.zeros(data2.shape[1:],N.float_)\r\n    n1 = data1.shape[0]\r\n    n2 = data2.shape[0]\r\n    en1 = n1*1\r\n    en2 = n2*1\r\n    d = N.zeros(data1.shape[1:],N.float_)\r\n    data1 = N.sort(data1,0)\r\n    data2 = N.sort(data2,0)\r\n    while j1 < n1 and j2 < n2:\r\n        d1=data1[j1]\r\n        d2=data2[j2]\r\n        if d1 <= d2:\r\n            fn1 = (j1)/float(en1)\r\n            j1 = j1 + 1\r\n        if d2 <= d1:\r\n            fn2 = (j2)/float(en2)\r\n            j2 = j2 + 1\r\n        dt = (fn2-fn1)\r\n        if abs(dt) > abs(d):\r\n            d = dt\r\n#    try:\r\n    en = math.sqrt(en1*en2/float(en1+en2))\r\n    prob = aksprob((en+0.12+0.11/en)*N.fabs(d))\r\n#    except:\r\n#        prob = 1.0\r\n    return d, prob\r\n\r\n\r\n def amannwhitneyu(x,y):\r\n    \"\"\"\r\nCalculates a Mann-Whitney U statistic on the provided scores and\r\nreturns the result.  Use only when the n in each condition is < 20 and\r\nyou have 2 independent samples of ranks.  REMEMBER: Mann-Whitney U is\r\nsignificant if the u-obtained is LESS THAN or equal to the critical\r\nvalue of U.\r\n\r\nUsage:   amannwhitneyu(x,y)     where x,y are arrays of values for 2 conditions\r\nReturns: u-statistic, one-tailed p-value (i.e., p(z(U)))\r\n\"\"\"\r\n    n1 = len(x)\r\n    n2 = len(y)\r\n    ranked = rankdata(N.concatenate((x,y)))\r\n    rankx = ranked[0:n1]       # get the x-ranks\r\n    ranky = ranked[n1:]        # the rest are y-ranks\r\n    u1 = n1*n2 + (n1*(n1+1))/2.0 - sum(rankx)  # calc U for x\r\n    u2 = n1*n2 - u1                            # remainder is U for y\r\n    bigu = max(u1,u2)\r\n    smallu = min(u1,u2)\r\n    T = math.sqrt(tiecorrect(ranked))  # correction factor for tied scores\r\n    if T == 0:\r\n        raise ValueError, 'All numbers are identical in amannwhitneyu'\r\n    sd = math.sqrt(T*n1*n2*(n1+n2+1)/12.0)\r\n    z = abs((bigu-n1*n2/2.0) / sd)  # normal approximation for prob calc\r\n    return smallu, 1.0 - azprob(z)\r\n\r\n\r\n def atiecorrect(rankvals):\r\n    \"\"\"\r\nTie-corrector for ties in Mann Whitney U and Kruskal Wallis H tests.\r\nSee Siegel, S. (1956) Nonparametric Statistics for the Behavioral\r\nSciences.  New York: McGraw-Hill.  Code adapted from |Stat rankind.c\r\ncode.\r\n\r\nUsage:   atiecorrect(rankvals)\r\nReturns: T correction factor for U or H\r\n\"\"\"\r\n    sorted,posn = ashellsort(N.array(rankvals))\r\n    n = len(sorted)\r\n    T = 0.0\r\n    i = 0\r\n    while (i<n-1):\r\n        if sorted[i] == sorted[i+1]:\r\n            nties = 1\r\n            while (i<n-1) and (sorted[i] == sorted[i+1]):\r\n                nties = nties +1\r\n                i = i +1\r\n            T = T + nties**3 - nties\r\n        i = i+1\r\n    T = T / float(n**3-n)\r\n    return 1.0 - T\r\n\r\n\r\n def aranksums(x,y):\r\n    \"\"\"\r\nCalculates the rank sums statistic on the provided scores and returns\r\nthe result.\r\n\r\nUsage:   aranksums(x,y)     where x,y are arrays of values for 2 conditions\r\nReturns: z-statistic, two-tailed p-value\r\n\"\"\"\r\n    n1 = len(x)\r\n    n2 = len(y)\r\n    alldata = N.concatenate((x,y))\r\n    ranked = arankdata(alldata)\r\n    x = ranked[:n1]\r\n    y = ranked[n1:]\r\n    s = sum(x)\r\n    expected = n1*(n1+n2+1) / 2.0\r\n    z = (s - expected) / math.sqrt(n1*n2*(n1+n2+1)/12.0)\r\n    prob = 2*(1.0 - azprob(abs(z)))\r\n    return z, prob\r\n\r\n\r\n def awilcoxont(x,y):\r\n    \"\"\"\r\nCalculates the Wilcoxon T-test for related samples and returns the\r\nresult.  A non-parametric T-test.\r\n\r\nUsage:   awilcoxont(x,y)     where x,y are equal-length arrays for 2 conditions\r\nReturns: t-statistic, two-tailed p-value\r\n\"\"\"\r\n    if len(x) <> len(y):\r\n        raise ValueError, 'Unequal N in awilcoxont.  Aborting.'\r\n    d = x-y\r\n    d = N.compress(N.not_equal(d,0),d) # Keep all non-zero differences\r\n    count = len(d)\r\n    absd = abs(d)\r\n    absranked = arankdata(absd)\r\n    r_plus = 0.0\r\n    r_minus = 0.0\r\n    for i in range(len(absd)):\r\n        if d[i] < 0:\r\n            r_minus = r_minus + absranked[i]\r\n        else:\r\n            r_plus = r_plus + absranked[i]\r\n    wt = min(r_plus, r_minus)\r\n    mn = count * (count+1) * 0.25\r\n    se =  math.sqrt(count*(count+1)*(2.0*count+1.0)/24.0)\r\n    z = math.fabs(wt-mn) / se\r\n    z = math.fabs(wt-mn) / se\r\n    prob = 2*(1.0 -zprob(abs(z)))\r\n    return wt, prob\r\n\r\n\r\n def akruskalwallish(*args):\r\n    \"\"\"\r\nThe Kruskal-Wallis H-test is a non-parametric ANOVA for 3 or more\r\ngroups, requiring at least 5 subjects in each group.  This function\r\ncalculates the Kruskal-Wallis H and associated p-value for 3 or more\r\nindependent samples.\r\n\r\nUsage:   akruskalwallish(*args)     args are separate arrays for 3+ conditions\r\nReturns: H-statistic (corrected for ties), associated p-value\r\n\"\"\"\r\n    assert len(args) == 3, \"Need at least 3 groups in stats.akruskalwallish()\"\r\n    args = list(args)\r\n    n = [0]*len(args)\r\n    n = map(len,args)\r\n    all = []\r\n    for i in range(len(args)):\r\n        all = all + args[i].tolist()\r\n    ranked = rankdata(all)\r\n    T = tiecorrect(ranked)\r\n    for i in range(len(args)):\r\n        args[i] = ranked[0:n[i]]\r\n        del ranked[0:n[i]]\r\n    rsums = []\r\n    for i in range(len(args)):\r\n        rsums.append(sum(args[i])**2)\r\n        rsums[i] = rsums[i] / float(n[i])\r\n    ssbn = sum(rsums)\r\n    totaln = sum(n)\r\n    h = 12.0 / (totaln*(totaln+1)) * ssbn - 3*(totaln+1)\r\n    df = len(args) - 1\r\n    if T == 0:\r\n        raise ValueError, 'All numbers are identical in akruskalwallish'\r\n    h = h / float(T)\r\n    return h, chisqprob(h,df)\r\n\r\n\r\n def afriedmanchisquare(*args):\r\n    \"\"\"\r\nFriedman Chi-Square is a non-parametric, one-way within-subjects\r\nANOVA.  This function calculates the Friedman Chi-square test for\r\nrepeated measures and returns the result, along with the associated\r\nprobability value.  It assumes 3 or more repeated measures.  Only 3\r\nlevels requires a minimum of 10 subjects in the study.  Four levels\r\nrequires 5 subjects per level(??).\r\n\r\nUsage:   afriedmanchisquare(*args)   args are separate arrays for 2+ conditions\r\nReturns: chi-square statistic, associated p-value\r\n\"\"\"\r\n    k = len(args)\r\n    if k < 3:\r\n        raise ValueError, '\\nLess than 3 levels.  Friedman test not appropriate.\\n'\r\n    n = len(args[0])\r\n    data = apply(pstats.aabut,args)\r\n    data = data.astype(N.float_)\r\n    for i in range(len(data)):\r\n        data[i] = arankdata(data[i])\r\n    ssbn = asum(asum(args,1)**2)\r\n    chisq = 12.0 / (k*n*(k+1)) * ssbn - 3*n*(k+1)\r\n    return chisq, achisqprob(chisq,k-1)\r\n\r\n\r\n#####################################\r\n####  APROBABILITY CALCULATIONS  ####\r\n#####################################\r\n\r\n def achisqprob(chisq,df):\r\n    \"\"\"\r\nReturns the (1-tail) probability value associated with the provided chi-square\r\nvalue and df.  Heavily modified from chisq.c in Gary Perlman's |Stat.  Can\r\nhandle multiple dimensions.\r\n\r\nUsage:   achisqprob(chisq,df)    chisq=chisquare stat., df=degrees of freedom\r\n\"\"\"\r\n    BIG = 200.0\r\n    def ex(x):\r\n        BIG = 200.0\r\n        exponents = N.where(N.less(x,-BIG),-BIG,x)\r\n        return N.exp(exponents)\r\n\r\n    if type(chisq) == N.ndarray:\r\n        arrayflag = 1\r\n    else:\r\n        arrayflag = 0\r\n        chisq = N.array([chisq])\r\n    if df < 1:\r\n        return N.ones(chisq.shape,N.float)\r\n    probs = N.zeros(chisq.shape,N.float_)\r\n    probs = N.where(N.less_equal(chisq,0),1.0,probs)  # set prob=1 for chisq<0\r\n    a = 0.5 * chisq\r\n    if df > 1:\r\n        y = ex(-a)\r\n    if df%2 == 0:\r\n        even = 1\r\n        s = y*1\r\n        s2 = s*1\r\n    else:\r\n        even = 0\r\n        s = 2.0 * azprob(-N.sqrt(chisq))\r\n        s2 = s*1\r\n    if (df > 2):\r\n        chisq = 0.5 * (df - 1.0)\r\n        if even:\r\n            z = N.ones(probs.shape,N.float_)\r\n        else:\r\n            z = 0.5 *N.ones(probs.shape,N.float_)\r\n        if even:\r\n            e = N.zeros(probs.shape,N.float_)\r\n        else:\r\n            e = N.log(N.sqrt(N.pi)) *N.ones(probs.shape,N.float_)\r\n        c = N.log(a)\r\n        mask = N.zeros(probs.shape)\r\n        a_big = N.greater(a,BIG)\r\n        a_big_frozen = -1 *N.ones(probs.shape,N.float_)\r\n        totalelements = N.multiply.reduce(N.array(probs.shape))\r\n        while asum(mask)<>totalelements:\r\n            e = N.log(z) + e\r\n            s = s + ex(c*z-a-e)\r\n            z = z + 1.0\r\n#            print z, e, s\r\n            newmask = N.greater(z,chisq)\r\n            a_big_frozen = N.where(newmask*N.equal(mask,0)*a_big, s, a_big_frozen)\r\n            mask = N.clip(newmask+mask,0,1)\r\n        if even:\r\n            z = N.ones(probs.shape,N.float_)\r\n            e = N.ones(probs.shape,N.float_)\r\n        else:\r\n            z = 0.5 *N.ones(probs.shape,N.float_)\r\n            e = 1.0 / N.sqrt(N.pi) / N.sqrt(a) * N.ones(probs.shape,N.float_)\r\n        c = 0.0\r\n        mask = N.zeros(probs.shape)\r\n        a_notbig_frozen = -1 *N.ones(probs.shape,N.float_)\r\n        while asum(mask)<>totalelements:\r\n            e = e * (a/z.astype(N.float_))\r\n            c = c + e\r\n            z = z + 1.0\r\n#            print '#2', z, e, c, s, c*y+s2\r\n            newmask = N.greater(z,chisq)\r\n            a_notbig_frozen = N.where(newmask*N.equal(mask,0)*(1-a_big),\r\n                                      c*y+s2, a_notbig_frozen)\r\n            mask = N.clip(newmask+mask,0,1)\r\n        probs = N.where(N.equal(probs,1),1,\r\n                        N.where(N.greater(a,BIG),a_big_frozen,a_notbig_frozen))\r\n        return probs\r\n    else:\r\n        return s\r\n\r\n\r\n def aerfcc(x):\r\n    \"\"\"\r\nReturns the complementary error function erfc(x) with fractional error\r\neverywhere less than 1.2e-7.  Adapted from Numerical Recipies.  Can\r\nhandle multiple dimensions.\r\n\r\nUsage:   aerfcc(x)\r\n\"\"\"\r\n    z = abs(x)\r\n    t = 1.0 / (1.0+0.5*z)\r\n    ans = t * N.exp(-z*z-1.26551223 + t*(1.00002368+t*(0.37409196+t*(0.09678418+t*(-0.18628806+t*(0.27886807+t*(-1.13520398+t*(1.48851587+t*(-0.82215223+t*0.17087277)))))))))\r\n    return N.where(N.greater_equal(x,0), ans, 2.0-ans)\r\n\r\n\r\n def azprob(z):\r\n    \"\"\"\r\nReturns the area under the normal curve 'to the left of' the given z value.\r\nThus, \r\n    for z<0, zprob(z) = 1-tail probability\r\n    for z>0, 1.0-zprob(z) = 1-tail probability\r\n    for any z, 2.0*(1.0-zprob(abs(z))) = 2-tail probability\r\nAdapted from z.c in Gary Perlman's |Stat.  Can handle multiple dimensions.\r\n\r\nUsage:   azprob(z)    where z is a z-value\r\n\"\"\"\r\n    def yfunc(y):\r\n        x = (((((((((((((-0.000045255659 * y\r\n                         +0.000152529290) * y -0.000019538132) * y\r\n                       -0.000676904986) * y +0.001390604284) * y\r\n                     -0.000794620820) * y -0.002034254874) * y\r\n                   +0.006549791214) * y -0.010557625006) * y\r\n                 +0.011630447319) * y -0.009279453341) * y\r\n               +0.005353579108) * y -0.002141268741) * y\r\n             +0.000535310849) * y +0.999936657524\r\n        return x\r\n\r\n    def wfunc(w):\r\n        x = ((((((((0.000124818987 * w\r\n                    -0.001075204047) * w +0.005198775019) * w\r\n                  -0.019198292004) * w +0.059054035642) * w\r\n                -0.151968751364) * w +0.319152932694) * w\r\n              -0.531923007300) * w +0.797884560593) * N.sqrt(w) * 2.0\r\n        return x\r\n\r\n    Z_MAX = 6.0    # maximum meaningful z-value\r\n    x = N.zeros(z.shape,N.float_) # initialize\r\n    y = 0.5 * N.fabs(z)\r\n    x = N.where(N.less(y,1.0),wfunc(y*y),yfunc(y-2.0)) # get x's\r\n    x = N.where(N.greater(y,Z_MAX*0.5),1.0,x)          # kill those with big Z\r\n    prob = N.where(N.greater(z,0),(x+1)*0.5,(1-x)*0.5)\r\n    return prob\r\n\r\n\r\n def aksprob(alam):\r\n     \"\"\"\r\nReturns the probability value for a K-S statistic computed via ks_2samp.\r\nAdapted from Numerical Recipies.  Can handle multiple dimensions.\r\n\r\nUsage:   aksprob(alam)\r\n\"\"\"\r\n     if type(alam) == N.ndarray:\r\n         frozen = -1 *N.ones(alam.shape,N.float64)\r\n         alam = alam.astype(N.float64)\r\n         arrayflag = 1\r\n     else:\r\n         frozen = N.array(-1.)\r\n         alam = N.array(alam,N.float64)\r\n         arrayflag = 1\r\n     mask = N.zeros(alam.shape)\r\n     fac = 2.0 *N.ones(alam.shape,N.float_)\r\n     sum = N.zeros(alam.shape,N.float_)\r\n     termbf = N.zeros(alam.shape,N.float_)\r\n     a2 = N.array(-2.0*alam*alam,N.float64)\r\n     totalelements = N.multiply.reduce(N.array(mask.shape))\r\n     for j in range(1,201):\r\n         if asum(mask) == totalelements:\r\n             break\r\n         exponents = (a2*j*j)\r\n         overflowmask = N.less(exponents,-746)\r\n         frozen = N.where(overflowmask,0,frozen)\r\n         mask = mask+overflowmask\r\n         term = fac*N.exp(exponents)\r\n         sum = sum + term\r\n         newmask = N.where(N.less_equal(abs(term),(0.001*termbf)) +\r\n                           N.less(abs(term),1.0e-8*sum), 1, 0)\r\n         frozen = N.where(newmask*N.equal(mask,0), sum, frozen)\r\n         mask = N.clip(mask+newmask,0,1)\r\n         fac = -fac\r\n         termbf = abs(term)\r\n     if arrayflag:\r\n         return N.where(N.equal(frozen,-1), 1.0, frozen)  # 1.0 if doesn't converge\r\n     else:\r\n         return N.where(N.equal(frozen,-1), 1.0, frozen)[0]  # 1.0 if doesn't converge\r\n\r\n\r\n def afprob (dfnum, dfden, F):\r\n    \"\"\"\r\nReturns the 1-tailed significance level (p-value) of an F statistic\r\ngiven the degrees of freedom for the numerator (dfR-dfF) and the degrees\r\nof freedom for the denominator (dfF).  Can handle multiple dims for F.\r\n\r\nUsage:   afprob(dfnum, dfden, F)   where usually dfnum=dfbn, dfden=dfwn\r\n\"\"\"\r\n    if type(F) == N.ndarray:\r\n        return abetai(0.5*dfden, 0.5*dfnum, dfden/(1.0*dfden+dfnum*F))\r\n    else:\r\n        return abetai(0.5*dfden, 0.5*dfnum, dfden/float(dfden+dfnum*F))\r\n\r\n\r\n def abetacf(a,b,x,verbose=1):\r\n    \"\"\"\r\nEvaluates the continued fraction form of the incomplete Beta function,\r\nbetai.  (Adapted from: Numerical Recipies in C.)  Can handle multiple\r\ndimensions for x.\r\n\r\nUsage:   abetacf(a,b,x,verbose=1)\r\n\"\"\"\r\n    ITMAX = 200\r\n    EPS = 3.0e-7\r\n\r\n    arrayflag = 1\r\n    if type(x) == N.ndarray:\r\n        frozen = N.ones(x.shape,N.float_) *-1  #start out w/ -1s, should replace all\r\n    else:\r\n        arrayflag = 0\r\n        frozen = N.array([-1])\r\n        x = N.array([x])\r\n    mask = N.zeros(x.shape)\r\n    bm = az = am = 1.0\r\n    qab = a+b\r\n    qap = a+1.0\r\n    qam = a-1.0\r\n    bz = 1.0-qab*x/qap\r\n    for i in range(ITMAX+1):\r\n        if N.sum(N.ravel(N.equal(frozen,-1)))==0:\r\n            break\r\n        em = float(i+1)\r\n        tem = em + em\r\n        d = em*(b-em)*x/((qam+tem)*(a+tem))\r\n        ap = az + d*am\r\n        bp = bz+d*bm\r\n        d = -(a+em)*(qab+em)*x/((qap+tem)*(a+tem))\r\n        app = ap+d*az\r\n        bpp = bp+d*bz\r\n        aold = az*1\r\n        am = ap/bpp\r\n        bm = bp/bpp\r\n        az = app/bpp\r\n        bz = 1.0\r\n        newmask = N.less(abs(az-aold),EPS*abs(az))\r\n        frozen = N.where(newmask*N.equal(mask,0), az, frozen)\r\n        mask = N.clip(mask+newmask,0,1)\r\n    noconverge = asum(N.equal(frozen,-1))\r\n    if noconverge <> 0 and verbose:\r\n        print 'a or b too big, or ITMAX too small in Betacf for ',noconverge,' elements'\r\n    if arrayflag:\r\n        return frozen\r\n    else:\r\n        return frozen[0]\r\n\r\n\r\n def agammln(xx):\r\n    \"\"\"\r\nReturns the gamma function of xx.\r\n    Gamma(z) = Integral(0,infinity) of t^(z-1)exp(-t) dt.\r\nAdapted from: Numerical Recipies in C.  Can handle multiple dims ... but\r\nprobably doesn't normally have to.\r\n\r\nUsage:   agammln(xx)\r\n\"\"\"\r\n    coeff = [76.18009173, -86.50532033, 24.01409822, -1.231739516,\r\n             0.120858003e-2, -0.536382e-5]\r\n    x = xx - 1.0\r\n    tmp = x + 5.5\r\n    tmp = tmp - (x+0.5)*N.log(tmp)\r\n    ser = 1.0\r\n    for j in range(len(coeff)):\r\n        x = x + 1\r\n        ser = ser + coeff[j]/x\r\n    return -tmp + N.log(2.50662827465*ser)\r\n\r\n\r\n def abetai(a,b,x,verbose=1):\r\n    \"\"\"\r\nReturns the incomplete beta function:\r\n\r\n    I-sub-x(a,b) = 1/B(a,b)*(Integral(0,x) of t^(a-1)(1-t)^(b-1) dt)\r\n\r\nwhere a,b>0 and B(a,b) = G(a)*G(b)/(G(a+b)) where G(a) is the gamma\r\nfunction of a.  The continued fraction formulation is implemented\r\nhere, using the betacf function.  (Adapted from: Numerical Recipies in\r\nC.)  Can handle multiple dimensions.\r\n\r\nUsage:   abetai(a,b,x,verbose=1)\r\n\"\"\"\r\n    TINY = 1e-15\r\n    if type(a) == N.ndarray:\r\n        if asum(N.less(x,0)+N.greater(x,1)) <> 0:\r\n            raise ValueError, 'Bad x in abetai'\r\n    x = N.where(N.equal(x,0),TINY,x)\r\n    x = N.where(N.equal(x,1.0),1-TINY,x)\r\n\r\n    bt = N.where(N.equal(x,0)+N.equal(x,1), 0, -1)\r\n    exponents = ( gammln(a+b)-gammln(a)-gammln(b)+a*N.log(x)+b*\r\n                  N.log(1.0-x) )\r\n    # 746 (below) is the MAX POSSIBLE BEFORE OVERFLOW\r\n    exponents = N.where(N.less(exponents,-740),-740,exponents)\r\n    bt = N.exp(exponents)\r\n    if type(x) == N.ndarray:\r\n        ans = N.where(N.less(x,(a+1)/(a+b+2.0)),\r\n                      bt*abetacf(a,b,x,verbose)/float(a),\r\n                      1.0-bt*abetacf(b,a,1.0-x,verbose)/float(b))\r\n    else:\r\n        if x<(a+1)/(a+b+2.0):\r\n            ans = bt*abetacf(a,b,x,verbose)/float(a)\r\n        else:\r\n            ans = 1.0-bt*abetacf(b,a,1.0-x,verbose)/float(b)\r\n    return ans\r\n\r\n\r\n#####################################\r\n#######  AANOVA CALCULATIONS  #######\r\n#####################################\r\n\r\n import LinearAlgebra, operator\r\n LA = LinearAlgebra\r\n\r\n def aglm(data,para):\r\n    \"\"\"\r\nCalculates a linear model fit ... anova/ancova/lin-regress/t-test/etc. Taken\r\nfrom:\r\n    Peterson et al. Statistical limitations in functional neuroimaging\r\n    I. Non-inferential methods and statistical models.  Phil Trans Royal Soc\r\n    Lond B 354: 1239-1260.\r\n\r\nUsage:   aglm(data,para)\r\nReturns: statistic, p-value ???\r\n\"\"\"\r\n    if len(para) <> len(data):\r\n        print \"data and para must be same length in aglm\"\r\n        return\r\n    n = len(para)\r\n    p = pstats.aunique(para)\r\n    x = N.zeros((n,len(p)))  # design matrix\r\n    for l in range(len(p)):\r\n        x[:,l] = N.equal(para,p[l])\r\n    b = N.dot(N.dot(LA.inv(N.dot(N.transpose(x),x)),  # i.e., b=inv(X'X)X'Y\r\n                    N.transpose(x)),\r\n              data)\r\n    diffs = (data - N.dot(x,b))\r\n    s_sq = 1./(n-len(p)) * N.dot(N.transpose(diffs), diffs)\r\n\r\n    if len(p) == 2:  # ttest_ind\r\n        c = N.array([1,-1])\r\n        df = n-2\r\n        fact = asum(1.0/asum(x,0))  # i.e., 1/n1 + 1/n2 + 1/n3 ...\r\n        t = N.dot(c,b) / N.sqrt(s_sq*fact)\r\n        probs = abetai(0.5*df,0.5,float(df)/(df+t*t))\r\n        return t, probs\r\n\r\n\r\n def aF_oneway(*args):\r\n    \"\"\"\r\nPerforms a 1-way ANOVA, returning an F-value and probability given\r\nany number of groups.  From Heiman, pp.394-7.\r\n\r\nUsage:   aF_oneway (*args)    where *args is 2 or more arrays, one per\r\n                                  treatment group\r\nReturns: f-value, probability\r\n\"\"\"\r\n    na = len(args)            # ANOVA on 'na' groups, each in it's own array\r\n    means = [0]*na\r\n    vars = [0]*na\r\n    ns = [0]*na\r\n    alldata = []\r\n    tmp = map(N.array,args)\r\n    means = map(amean,tmp)\r\n    vars = map(avar,tmp)\r\n    ns = map(len,args)\r\n    alldata = N.concatenate(args)\r\n    bign = len(alldata)\r\n    sstot = ass(alldata)-(asquare_of_sums(alldata)/float(bign))\r\n    ssbn = 0\r\n    for a in args:\r\n        ssbn = ssbn + asquare_of_sums(N.array(a))/float(len(a))\r\n    ssbn = ssbn - (asquare_of_sums(alldata)/float(bign))\r\n    sswn = sstot-ssbn\r\n    dfbn = na-1\r\n    dfwn = bign - na\r\n    msb = ssbn/float(dfbn)\r\n    msw = sswn/float(dfwn)\r\n    f = msb/msw\r\n    prob = fprob(dfbn,dfwn,f)\r\n    return f, prob\r\n\r\n\r\n def aF_value (ER,EF,dfR,dfF):\r\n    \"\"\"\r\nReturns an F-statistic given the following:\r\n        ER  = error associated with the null hypothesis (the Restricted model)\r\n        EF  = error associated with the alternate hypothesis (the Full model)\r\n        dfR = degrees of freedom the Restricted model\r\n        dfF = degrees of freedom associated with the Restricted model\r\n\"\"\"\r\n    return ((ER-EF)/float(dfR-dfF) / (EF/float(dfF)))\r\n\r\n\r\n def outputfstats(Enum, Eden, dfnum, dfden, f, prob):\r\n     Enum = round(Enum,3)\r\n     Eden = round(Eden,3)\r\n     dfnum = round(Enum,3)\r\n     dfden = round(dfden,3)\r\n     f = round(f,3)\r\n     prob = round(prob,3)\r\n     suffix = ''                       # for *s after the p-value\r\n     if  prob < 0.001:  suffix = '  ***'\r\n     elif prob < 0.01:  suffix = '  **'\r\n     elif prob < 0.05:  suffix = '  *'\r\n     title = [['EF/ER','DF','Mean Square','F-value','prob','']]\r\n     lofl = title+[[Enum, dfnum, round(Enum/float(dfnum),3), f, prob, suffix],\r\n                   [Eden, dfden, round(Eden/float(dfden),3),'','','']]\r\n     pstats.printcc(lofl)\r\n     return\r\n\r\n\r\n def F_value_multivariate(ER, EF, dfnum, dfden):\r\n     \"\"\"\r\nReturns an F-statistic given the following:\r\n        ER  = error associated with the null hypothesis (the Restricted model)\r\n        EF  = error associated with the alternate hypothesis (the Full model)\r\n        dfR = degrees of freedom the Restricted model\r\n        dfF = degrees of freedom associated with the Restricted model\r\nwhere ER and EF are matrices from a multivariate F calculation.\r\n\"\"\"\r\n     if type(ER) in [IntType, FloatType]:\r\n         ER = N.array([[ER]])\r\n     if type(EF) in [IntType, FloatType]:\r\n         EF = N.array([[EF]])\r\n     n_um = (LA.det(ER) - LA.det(EF)) / float(dfnum)\r\n     d_en = LA.det(EF) / float(dfden)\r\n     return n_um / d_en\r\n\r\n\r\n#####################################\r\n#######  ASUPPORT FUNCTIONS  ########\r\n#####################################\r\n\r\n def asign(a):\r\n    \"\"\"\r\nUsage:   asign(a)\r\nReturns: array shape of a, with -1 where a<0 and +1 where a>=0\r\n\"\"\"\r\n    a = N.asarray(a)\r\n    if ((type(a) == type(1.4)) or (type(a) == type(1))):\r\n        return a-a-N.less(a,0)+N.greater(a,0)\r\n    else:\r\n        return N.zeros(N.shape(a))-N.less(a,0)+N.greater(a,0)\r\n\r\n\r\n def asum (a, dimension=None,keepdims=0):\r\n     \"\"\"\r\nAn alternative to the Numeric.add.reduce function, which allows one to\r\n(1) collapse over multiple dimensions at once, and/or (2) to retain\r\nall dimensions in the original array (squashing one down to size.\r\nDimension can equal None (ravel array first), an integer (the\r\ndimension over which to operate), or a sequence (operate over multiple\r\ndimensions).  If keepdims=1, the resulting array will have as many\r\ndimensions as the input array.\r\n\r\nUsage:   asum(a, dimension=None, keepdims=0)\r\nReturns: array summed along 'dimension'(s), same _number_ of dims if keepdims=1\r\n\"\"\"\r\n     if type(a) == N.ndarray and a.dtype in [N.int_, N.short, N.ubyte]:\r\n         a = a.astype(N.float_)\r\n     if dimension == None:\r\n         s = N.sum(N.ravel(a))\r\n     elif type(dimension) in [IntType,FloatType]:\r\n         s = N.add.reduce(a, dimension)\r\n         if keepdims == 1:\r\n             shp = list(a.shape)\r\n             shp[dimension] = 1\r\n             s = N.reshape(s,shp)\r\n     else: # must be a SEQUENCE of dims to sum over\r\n        dims = list(dimension)\r\n        dims.sort()\r\n        dims.reverse()\r\n        s = a *1.0\r\n        for dim in dims:\r\n            s = N.add.reduce(s,dim)\r\n        if keepdims == 1:\r\n            shp = list(a.shape)\r\n            for dim in dims:\r\n                shp[dim] = 1\r\n            s = N.reshape(s,shp)\r\n     return s\r\n\r\n\r\n def acumsum (a,dimension=None):\r\n    \"\"\"\r\nReturns an array consisting of the cumulative sum of the items in the\r\npassed array.  Dimension can equal None (ravel array first), an\r\ninteger (the dimension over which to operate), or a sequence (operate\r\nover multiple dimensions, but this last one just barely makes sense).\r\n\r\nUsage:   acumsum(a,dimension=None)\r\n\"\"\"\r\n    if dimension == None:\r\n        a = N.ravel(a)\r\n        dimension = 0\r\n    if type(dimension) in [ListType, TupleType, N.ndarray]:\r\n        dimension = list(dimension)\r\n        dimension.sort()\r\n        dimension.reverse()\r\n        for d in dimension:\r\n            a = N.add.accumulate(a,d)\r\n        return a\r\n    else:\r\n        return N.add.accumulate(a,dimension)\r\n\r\n\r\n def ass(inarray, dimension=None, keepdims=0):\r\n    \"\"\"\r\nSquares each value in the passed array, adds these squares & returns\r\nthe result.  Unfortunate function name. :-) Defaults to ALL values in\r\nthe array.  Dimension can equal None (ravel array first), an integer\r\n(the dimension over which to operate), or a sequence (operate over\r\nmultiple dimensions).  Set keepdims=1 to maintain the original number\r\nof dimensions.\r\n\r\nUsage:   ass(inarray, dimension=None, keepdims=0)\r\nReturns: sum-along-'dimension' for (inarray*inarray)\r\n\"\"\"\r\n    if dimension == None:\r\n        inarray = N.ravel(inarray)\r\n        dimension = 0\r\n    return asum(inarray*inarray,dimension,keepdims)\r\n\r\n\r\n def asummult (array1,array2,dimension=None,keepdims=0):\r\n    \"\"\"\r\nMultiplies elements in array1 and array2, element by element, and\r\nreturns the sum (along 'dimension') of all resulting multiplications.\r\nDimension can equal None (ravel array first), an integer (the\r\ndimension over which to operate), or a sequence (operate over multiple\r\ndimensions).  A trivial function, but included for completeness.\r\n\r\nUsage:   asummult(array1,array2,dimension=None,keepdims=0)\r\n\"\"\"\r\n    if dimension == None:\r\n        array1 = N.ravel(array1)\r\n        array2 = N.ravel(array2)\r\n        dimension = 0\r\n    return asum(array1*array2,dimension,keepdims)\r\n\r\n\r\n def asquare_of_sums(inarray, dimension=None, keepdims=0):\r\n    \"\"\"\r\nAdds the values in the passed array, squares that sum, and returns the\r\nresult.  Dimension can equal None (ravel array first), an integer (the\r\ndimension over which to operate), or a sequence (operate over multiple\r\ndimensions).  If keepdims=1, the returned array will have the same\r\nNUMBER of dimensions as the original.\r\n\r\nUsage:   asquare_of_sums(inarray, dimension=None, keepdims=0)\r\nReturns: the square of the sum over dim(s) in dimension\r\n\"\"\"\r\n    if dimension == None:\r\n        inarray = N.ravel(inarray)\r\n        dimension = 0\r\n    s = asum(inarray,dimension,keepdims)\r\n    if type(s) == N.ndarray:\r\n        return s.astype(N.float_)*s\r\n    else:\r\n        return float(s)*s\r\n\r\n\r\n def asumdiffsquared(a,b, dimension=None, keepdims=0):\r\n    \"\"\"\r\nTakes pairwise differences of the values in arrays a and b, squares\r\nthese differences, and returns the sum of these squares.  Dimension\r\ncan equal None (ravel array first), an integer (the dimension over\r\nwhich to operate), or a sequence (operate over multiple dimensions).\r\nkeepdims=1 means the return shape = len(a.shape) = len(b.shape)\r\n\r\nUsage:   asumdiffsquared(a,b)\r\nReturns: sum[ravel(a-b)**2]\r\n\"\"\"\r\n    if dimension == None:\r\n        inarray = N.ravel(a)\r\n        dimension = 0\r\n    return asum((a-b)**2,dimension,keepdims)\r\n\r\n\r\n def ashellsort(inarray):\r\n    \"\"\"\r\nShellsort algorithm.  Sorts a 1D-array.\r\n\r\nUsage:   ashellsort(inarray)\r\nReturns: sorted-inarray, sorting-index-vector (for original array)\r\n\"\"\"\r\n    n = len(inarray)\r\n    svec = inarray *1.0\r\n    ivec = range(n)\r\n    gap = n/2   # integer division needed\r\n    while gap >0:\r\n        for i in range(gap,n):\r\n            for j in range(i-gap,-1,-gap):\r\n                while j>=0 and svec[j]>svec[j+gap]:\r\n                    temp        = svec[j]\r\n                    svec[j]     = svec[j+gap]\r\n                    svec[j+gap] = temp\r\n                    itemp       = ivec[j]\r\n                    ivec[j]     = ivec[j+gap]\r\n                    ivec[j+gap] = itemp\r\n        gap = gap / 2  # integer division needed\r\n#    svec is now sorted input vector, ivec has the order svec[i] = vec[ivec[i]]\r\n    return svec, ivec\r\n\r\n\r\n def arankdata(inarray):\r\n    \"\"\"\r\nRanks the data in inarray, dealing with ties appropritely.  Assumes\r\na 1D inarray.  Adapted from Gary Perlman's |Stat ranksort.\r\n\r\nUsage:   arankdata(inarray)\r\nReturns: array of length equal to inarray, containing rank scores\r\n\"\"\"\r\n    n = len(inarray)\r\n    svec, ivec = ashellsort(inarray)\r\n    sumranks = 0\r\n    dupcount = 0\r\n    newarray = N.zeros(n,N.float_)\r\n    for i in range(n):\r\n        sumranks = sumranks + i\r\n        dupcount = dupcount + 1\r\n        if i==n-1 or svec[i] <> svec[i+1]:\r\n            averank = sumranks / float(dupcount) + 1\r\n            for j in range(i-dupcount+1,i+1):\r\n                newarray[ivec[j]] = averank\r\n            sumranks = 0\r\n            dupcount = 0\r\n    return newarray\r\n\r\n\r\n def afindwithin(data):\r\n    \"\"\"\r\nReturns a binary vector, 1=within-subject factor, 0=between.  Input\r\nequals the entire data array (i.e., column 1=random factor, last\r\ncolumn = measured values.\r\n\r\nUsage:   afindwithin(data)     data in |Stat format\r\n\"\"\"\r\n    numfact = len(data[0])-2\r\n    withinvec = [0]*numfact\r\n    for col in range(1,numfact+1):\r\n        rows = pstats.linexand(data,col,pstats.unique(pstats.colex(data,1))[0])  # get 1 level of this factor\r\n        if len(pstats.unique(pstats.colex(rows,0))) < len(rows):   # if fewer subjects than scores on this factor\r\n            withinvec[col-1] = 1\r\n    return withinvec\r\n\r\n\r\n #########################################################\r\n #########################################################\r\n ######  RE-DEFINE DISPATCHES TO INCLUDE ARRAYS  #########\r\n #########################################################\r\n #########################################################\r\n\r\n## CENTRAL TENDENCY:\r\n geometricmean = Dispatch ( (lgeometricmean, (ListType, TupleType)),\r\n                            (ageometricmean, (N.ndarray,)) )\r\n harmonicmean = Dispatch ( (lharmonicmean, (ListType, TupleType)),\r\n                           (aharmonicmean, (N.ndarray,)) )\r\n mean = Dispatch ( (lmean, (ListType, TupleType)),\r\n                   (amean, (N.ndarray,)) )\r\n median = Dispatch ( (lmedian, (ListType, TupleType)),\r\n                     (amedian, (N.ndarray,)) )\r\n medianscore = Dispatch ( (lmedianscore, (ListType, TupleType)),\r\n                          (amedianscore, (N.ndarray,)) )\r\n mode = Dispatch ( (lmode, (ListType, TupleType)),\r\n                   (amode, (N.ndarray,)) )\r\n tmean = Dispatch ( (atmean, (N.ndarray,)) )\r\n tvar = Dispatch ( (atvar, (N.ndarray,)) )\r\n tstdev = Dispatch ( (atstdev, (N.ndarray,)) )\r\n tsem = Dispatch ( (atsem, (N.ndarray,)) )\r\n\r\n## VARIATION:\r\n moment = Dispatch ( (lmoment, (ListType, TupleType)),\r\n                     (amoment, (N.ndarray,)) )\r\n variation = Dispatch ( (lvariation, (ListType, TupleType)),\r\n                        (avariation, (N.ndarray,)) )\r\n skew = Dispatch ( (lskew, (ListType, TupleType)),\r\n                   (askew, (N.ndarray,)) )\r\n kurtosis = Dispatch ( (lkurtosis, (ListType, TupleType)),\r\n                       (akurtosis, (N.ndarray,)) )\r\n describe = Dispatch ( (ldescribe, (ListType, TupleType)),\r\n                       (adescribe, (N.ndarray,)) )\r\n\r\n## DISTRIBUTION TESTS\r\n\r\n skewtest = Dispatch ( (askewtest, (ListType, TupleType)),\r\n                       (askewtest, (N.ndarray,)) )\r\n kurtosistest = Dispatch ( (akurtosistest, (ListType, TupleType)),\r\n                           (akurtosistest, (N.ndarray,)) )\r\n normaltest = Dispatch ( (anormaltest, (ListType, TupleType)),\r\n                         (anormaltest, (N.ndarray,)) )\r\n\r\n## FREQUENCY STATS:\r\n itemfreq = Dispatch ( (litemfreq, (ListType, TupleType)),\r\n                       (aitemfreq, (N.ndarray,)) )\r\n scoreatpercentile = Dispatch ( (lscoreatpercentile, (ListType, TupleType)),\r\n                                (ascoreatpercentile, (N.ndarray,)) )\r\n percentileofscore = Dispatch ( (lpercentileofscore, (ListType, TupleType)),\r\n                                 (apercentileofscore, (N.ndarray,)) )\r\n histogram = Dispatch ( (lhistogram, (ListType, TupleType)),\r\n                        (ahistogram, (N.ndarray,)) )\r\n cumfreq = Dispatch ( (lcumfreq, (ListType, TupleType)),\r\n                      (acumfreq, (N.ndarray,)) )\r\n relfreq = Dispatch ( (lrelfreq, (ListType, TupleType)),\r\n                      (arelfreq, (N.ndarray,)) )\r\n \r\n## VARIABILITY:\r\n obrientransform = Dispatch ( (lobrientransform, (ListType, TupleType)),\r\n                              (aobrientransform, (N.ndarray,)) )\r\n samplevar = Dispatch ( (lsamplevar, (ListType, TupleType)),\r\n                        (asamplevar, (N.ndarray,)) )\r\n samplestdev = Dispatch ( (lsamplestdev, (ListType, TupleType)),\r\n                          (asamplestdev, (N.ndarray,)) )\r\n signaltonoise = Dispatch( (asignaltonoise, (N.ndarray,)),)\r\n var = Dispatch ( (lvar, (ListType, TupleType)),\r\n                  (avar, (N.ndarray,)) )\r\n stdev = Dispatch ( (lstdev, (ListType, TupleType)),\r\n                    (astdev, (N.ndarray,)) )\r\n sterr = Dispatch ( (lsterr, (ListType, TupleType)),\r\n                    (asterr, (N.ndarray,)) )\r\n sem = Dispatch ( (lsem, (ListType, TupleType)),\r\n                  (asem, (N.ndarray,)) )\r\n z = Dispatch ( (lz, (ListType, TupleType)),\r\n                (az, (N.ndarray,)) )\r\n zs = Dispatch ( (lzs, (ListType, TupleType)),\r\n                 (azs, (N.ndarray,)) )\r\n \r\n## TRIMMING FCNS:\r\n threshold = Dispatch( (athreshold, (N.ndarray,)),)\r\n trimboth = Dispatch ( (ltrimboth, (ListType, TupleType)),\r\n                       (atrimboth, (N.ndarray,)) )\r\n trim1 = Dispatch ( (ltrim1, (ListType, TupleType)),\r\n                    (atrim1, (N.ndarray,)) )\r\n \r\n## CORRELATION FCNS:\r\n paired = Dispatch ( (lpaired, (ListType, TupleType)),\r\n                     (apaired, (N.ndarray,)) )\r\n lincc = Dispatch ( (llincc, (ListType, TupleType)),\r\n                       (alincc, (N.ndarray,)) )\r\n pearsonr = Dispatch ( (lpearsonr, (ListType, TupleType)),\r\n                       (apearsonr, (N.ndarray,)) )\r\n spearmanr = Dispatch ( (lspearmanr, (ListType, TupleType)),\r\n                        (aspearmanr, (N.ndarray,)) )\r\n pointbiserialr = Dispatch ( (lpointbiserialr, (ListType, TupleType)),\r\n                             (apointbiserialr, (N.ndarray,)) )\r\n kendalltau = Dispatch ( (lkendalltau, (ListType, TupleType)),\r\n                         (akendalltau, (N.ndarray,)) )\r\n linregress = Dispatch ( (llinregress, (ListType, TupleType)),\r\n                         (alinregress, (N.ndarray,)) )\r\n \r\n## INFERENTIAL STATS:\r\n ttest_1samp = Dispatch ( (lttest_1samp, (ListType, TupleType)),\r\n                          (attest_1samp, (N.ndarray,)) )\r\n ttest_ind = Dispatch ( (lttest_ind, (ListType, TupleType)),\r\n                        (attest_ind, (N.ndarray,)) )\r\n ttest_rel = Dispatch ( (lttest_rel, (ListType, TupleType)),\r\n                        (attest_rel, (N.ndarray,)) )\r\n chisquare = Dispatch ( (lchisquare, (ListType, TupleType)),\r\n                        (achisquare, (N.ndarray,)) )\r\n ks_2samp = Dispatch ( (lks_2samp, (ListType, TupleType)),\r\n                       (aks_2samp, (N.ndarray,)) )\r\n mannwhitneyu = Dispatch ( (lmannwhitneyu, (ListType, TupleType)),\r\n                           (amannwhitneyu, (N.ndarray,)) )\r\n tiecorrect = Dispatch ( (ltiecorrect, (ListType, TupleType)),\r\n                         (atiecorrect, (N.ndarray,)) )\r\n ranksums = Dispatch ( (lranksums, (ListType, TupleType)),\r\n                       (aranksums, (N.ndarray,)) )\r\n wilcoxont = Dispatch ( (lwilcoxont, (ListType, TupleType)),\r\n                        (awilcoxont, (N.ndarray,)) )\r\n kruskalwallish = Dispatch ( (lkruskalwallish, (ListType, TupleType)),\r\n                             (akruskalwallish, (N.ndarray,)) )\r\n friedmanchisquare = Dispatch ( (lfriedmanchisquare, (ListType, TupleType)),\r\n                                (afriedmanchisquare, (N.ndarray,)) )\r\n \r\n## PROBABILITY CALCS:\r\n chisqprob = Dispatch ( (lchisqprob, (IntType, FloatType)),\r\n                        (achisqprob, (N.ndarray,)) )\r\n zprob = Dispatch ( (lzprob, (IntType, FloatType)),\r\n                    (azprob, (N.ndarray,)) )\r\n ksprob = Dispatch ( (lksprob, (IntType, FloatType)),\r\n                     (aksprob, (N.ndarray,)) )\r\n fprob = Dispatch ( (lfprob, (IntType, FloatType)),\r\n                    (afprob, (N.ndarray,)) )\r\n betacf = Dispatch ( (lbetacf, (IntType, FloatType)),\r\n                     (abetacf, (N.ndarray,)) )\r\n betai = Dispatch ( (lbetai, (IntType, FloatType)),\r\n                    (abetai, (N.ndarray,)) )\r\n erfcc = Dispatch ( (lerfcc, (IntType, FloatType)),\r\n                    (aerfcc, (N.ndarray,)) )\r\n gammln = Dispatch ( (lgammln, (IntType, FloatType)),\r\n                     (agammln, (N.ndarray,)) )\r\n \r\n## ANOVA FUNCTIONS:\r\n F_oneway = Dispatch ( (lF_oneway, (ListType, TupleType)),\r\n                       (aF_oneway, (N.ndarray,)) )\r\n F_value = Dispatch ( (lF_value, (ListType, TupleType)),\r\n                      (aF_value, (N.ndarray,)) )\r\n\r\n## SUPPORT FUNCTIONS:\r\n incr = Dispatch ( (lincr, (ListType, TupleType, N.ndarray)), )\r\n sum = Dispatch ( (lsum, (ListType, TupleType)),\r\n                  (asum, (N.ndarray,)) )\r\n cumsum = Dispatch ( (lcumsum, (ListType, TupleType)),\r\n                     (acumsum, (N.ndarray,)) )\r\n ss = Dispatch ( (lss, (ListType, TupleType)),\r\n                 (ass, (N.ndarray,)) )\r\n summult = Dispatch ( (lsummult, (ListType, TupleType)),\r\n                      (asummult, (N.ndarray,)) )\r\n square_of_sums = Dispatch ( (lsquare_of_sums, (ListType, TupleType)),\r\n                             (asquare_of_sums, (N.ndarray,)) )\r\n sumdiffsquared = Dispatch ( (lsumdiffsquared, (ListType, TupleType)),\r\n                             (asumdiffsquared, (N.ndarray,)) )\r\n shellsort = Dispatch ( (lshellsort, (ListType, TupleType)),\r\n                        (ashellsort, (N.ndarray,)) )\r\n rankdata = Dispatch ( (lrankdata, (ListType, TupleType)),\r\n                       (arankdata, (N.ndarray,)) )\r\n findwithin = Dispatch ( (lfindwithin, (ListType, TupleType)),\r\n                         (afindwithin, (N.ndarray,)) )\r\n\r\n######################  END OF NUMERIC FUNCTION BLOCK  #####################\r\n\r\n######################  END OF STATISTICAL FUNCTIONS  ######################\r\n\r\nexcept ImportError:\r\n pass\r\n"
  },
  {
    "path": "src/main/thrift/build.sh",
    "content": "#\n# Copyright 2013 The Regents of The University California\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#   http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n\n# Helper for building thrift files\n\nrm -rf ../gen-java/*\n\nfor FILE in $(ls |grep thrift)\ndo \n  thrift --gen java:java5 -o ../ $FILE\ndone\n"
  },
  {
    "path": "src/main/thrift/service.thrift",
    "content": "#\n# Copyright 2013 The Regents of The University California\n# \n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n# \n#   http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n\ninclude 'types.thrift'\n\nnamespace java edu.berkeley.sparrow.thrift\n\n# SchedulerService is used by application frontends to communicate with Sparrow\n# and place jobs.\nservice SchedulerService {\n  # Register a frontend for the given application.\n  bool registerFrontend(1: string app, 2: string socketAddress);\n\n  # Submit a job composed of a list of individual tasks.\n  void submitJob(1: types.TSchedulingRequest req) throws (1: types.IncompleteRequestException e);\n\n  # Send a message to be delivered to the frontend for {app} pertaining\n  # to the task {taskId}. The {status} field allows for application-specific\n  # status enumerations. Right now this is used only for Spark, which relies on\n  # the scheduler to send task completion messages to frontends.\n  void sendFrontendMessage(1: string app, 2: types.TFullTaskId taskId,\n                           3: i32 status, 4: binary message);\n}\n\nservice GetTaskService {\n  # Called by a node monitor when it has available responses to run a task. Always called in\n  # response to an enqueueTask() request from this scheduler, requestId specifies the ID given\n  # in that enqueueTask() request. Currently, we only support returning 0 or 1 task\n  # specs, where 0 signals that the given request has no more tasks that can be launched on the\n  # node.\n  # TODO: Add a numTasks parameter to signal how many slots are free, and support\n  #       returning more than 1 tasks.\n  list<types.TTaskLaunchSpec> getTask(1: string requestId, 2: types.THostPort nodeMonitorAddress);\n}\n\n# A service used by application backends to coordinate with Sparrow.\nservice NodeMonitorService {\n  # Register this machine as a backend for the given application.\n  bool registerBackend(1: string app, 2: string listenSocket);\n\n  # Inform the NodeMonitor that a particular task has finished\n  void tasksFinished(1: list<types.TFullTaskId> tasks);\n\n  # See SchedulerService.sendFrontendMessage\n  void sendFrontendMessage(1: string app, 2: types.TFullTaskId taskId,\n                           3: i32 status, 4: binary message);\n}\n\n# A service that backends are expected to extend. Handles communication\n# from a NodeMonitor.\nservice BackendService {\n  void launchTask(1: binary message, 2: types.TFullTaskId taskId,\n                  3: types.TUserGroupInfo user);\n}\n\n# A service that frontends are expected to extend. Handles communication from\n# a Scheduler.\nservice FrontendService {\n  # See SchedulerService.sendFrontendMessage\n  void frontendMessage(1: types.TFullTaskId taskId, 2: i32 status,\n                       3: binary message);\n}\n\n# The InternalService exposes state about application backends to other Sparrow daemons.\nservice InternalService {\n  # Enqueues a reservation to launch the given number of tasks. The NodeMonitor sends\n  # a GetTask() RPC to the given schedulerAddress when it is ready to launch a task, for each\n  # enqueued task reservation. Returns whether or not the task was successfully enqueued.\n  bool enqueueTaskReservations(1: types.TEnqueueTaskReservationsRequest request);\n\n  # Cancels reservations for jobs for which all tasks have already been launched.\n  void cancelTaskReservations(1: types.TCancelTaskReservationsRequest request);\n}\n\nservice SchedulerStateStoreService {\n  # Message from the state store giving the scheduler new information\n  void updateNodeState(1: map<string, types.TNodeState> snapshot);\n}\n\nservice StateStoreService {\n  # Register a scheduler with the given socket address (IP: Port)\n  void registerScheduler(1: string schedulerAddress);\n\n  # Register a node monitor with the given socket address (IP: Port)\n  void registerNodeMonitor(1: string nodeMonitorAddress);\n}\n\n# Service to use for debugging network latencies.\nservice PongService {\n  string ping(1: string data);\n}\n"
  },
  {
    "path": "src/main/thrift/types.thrift",
    "content": "#\n# Copyright 2013 The Regents of The University California\n# \n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n# \n#   http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n\nnamespace java edu.berkeley.sparrow.thrift\n\nexception IncompleteRequestException {\n  1: string message;\n}\n\nstruct THostPort {\n  // The host should always be represented as an IP address!\n  1: string host;\n  2: i32 port;\n}\n\nstruct TPlacementPreference {\n  1: list<string> nodes; // List of preferred nodes, described by their hostname.\n  2: list<string> racks; // Not currently supported.\n  3: i32 delayThreshold; // Threshold for delay scheduling (not currently supported).\n}\n\nstruct TResourceVector {\n  1: i64 memory;      // Memory, in Mb\n  2: i32 cores;       // # Cores\n}\n\n\n// A fully-specified Sparrow task has four identifiers\n// neeed?\nstruct TFullTaskId {\n  1: string taskId;    // Task ID as reported from the FE\n  2: string requestId; // Scheduling request ID as assigned by the FE\n  3: string appId;     // ID of the application\n  4: THostPort schedulerAddress; // Address of the scheduler that scheduled the task.\n}\n\nstruct TUserGroupInfo {\n  1: string user;\n  2: string group;\n  // Priority of the user. If the node monitor is using the priority task scheduler,\n  // it will place the tasks with the smallest numbered priority first.\n  3: i32 priority;\n}\n\nstruct TTaskSpec {\n  1: string taskId;\n  2: TPlacementPreference preference;\n  3: binary message;\n}\n\nstruct TSchedulingRequest {\n  1: string app;\n  2: list<TTaskSpec> tasks;\n  3: TUserGroupInfo user;\n  # A description that will be logged alongside the requestId that Sparrow assigns.\n  4: optional string description;\n  # Hack to allow us to specify the probe ratio for certain types of requests.\n  5: optional double probeRatio;\n}\n\nstruct TEnqueueTaskReservationsRequest {\n  1: string appId;\n  2: TUserGroupInfo user;\n  3: string requestId;\n  4: THostPort schedulerAddress;\n  5: i32 numTasks;\n}\n\nstruct TCancelTaskReservationsRequest {\n  1: string requestId;\n}\n\n# Information needed to launch a task.  The application and user information are not needed\n# because they're included when the task is enqueued, so the node monitor already has them at\n# launch time.\nstruct TTaskLaunchSpec {\n  # Task ID (originally assigned by the application)\n  1: string taskId;\n\n  # Description of the task passed on to the application backend (opaque to Sparrow).\n  2: binary message;\n}\n\nstruct LoadSpec {\n  1: double load;\n}\n\n# Represents the State Store's view of resource consumption on a Sparrow node.\n# TODO: will include information about per-user accounting.\nstruct TNodeState {\n  1: TResourceVector sparrowUsage;   # Resources used by Sparrow\n  2: TResourceVector externalUsage;  # Resources used by other schedulers\n}\n"
  },
  {
    "path": "src/test/java/edu/berkeley/sparrow/daemon/nodemonitor/TestTaskScheduler.java",
    "content": "/*\n * Copyright 2013 The Regents of The University California\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *   http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage edu.berkeley.sparrow.daemon.nodemonitor;\nimport static org.junit.Assert.assertEquals;\n\nimport java.net.InetSocketAddress;\nimport java.util.List;\n\nimport org.apache.commons.configuration.PropertiesConfiguration;\nimport org.apache.log4j.BasicConfigurator;\nimport org.junit.Before;\nimport org.junit.Test;\n\nimport com.google.common.collect.Lists;\n\nimport edu.berkeley.sparrow.daemon.nodemonitor.TaskScheduler.TaskSpec;\nimport edu.berkeley.sparrow.thrift.TEnqueueTaskReservationsRequest;\nimport edu.berkeley.sparrow.thrift.TFullTaskId;\nimport edu.berkeley.sparrow.thrift.THostPort;\nimport edu.berkeley.sparrow.thrift.TUserGroupInfo;\n\npublic class TestTaskScheduler {\n  int requestId;\n\n  @Before\n  public void setUp() {\n    // Set up a simple configuration that logs on the console.\n    BasicConfigurator.configure();\n    requestId = 1;\n  }\n\n  private TEnqueueTaskReservationsRequest createTaskReservationRequest(\n      int numTasks, TaskScheduler scheduler, String userId) {\n    return createTaskReservationRequest(numTasks, scheduler, userId, 0);\n  }\n\n  private TEnqueueTaskReservationsRequest createTaskReservationRequest(\n      int numTasks, TaskScheduler scheduler, String userId, int priority) {\n    String idStr = Integer.toString(requestId++);\n    TUserGroupInfo user = new TUserGroupInfo(userId, \"group\", priority);\n    THostPort schedulerAddress = new THostPort(\"1.2.3.4\", 52);\n    return new TEnqueueTaskReservationsRequest(\n        \"appId\", user, idStr, schedulerAddress, numTasks);\n  }\n\n  /**\n   * Tests the fifo task scheduler.\n   */\n  @Test\n  public void testFifo() {\n    TaskScheduler scheduler = new FifoTaskScheduler(4);\n    scheduler.initialize(new PropertiesConfiguration(), 12345);\n\n    final String testApp = \"test app\";\n    final InetSocketAddress backendAddress = new InetSocketAddress(\"123.4.5.6\", 2);\n\n    // Make sure that tasks are launched right away, if resources are available.\n    scheduler.submitTaskReservations(createTaskReservationRequest(1, scheduler, testApp),\n                                     backendAddress);\n    assertEquals(1, scheduler.runnableTasks());\n    TaskSpec task = scheduler.getNextTask();\n    assertEquals(\"1\", task.requestId);\n    assertEquals(0, scheduler.runnableTasks());\n\n    scheduler.submitTaskReservations(createTaskReservationRequest(2, scheduler, testApp),\n                                     backendAddress);\n    assertEquals(2, scheduler.runnableTasks());\n\n    // Make sure the request to schedule 3 tasks is appropriately split, with one task running\n    // now and others started later.\n    scheduler.submitTaskReservations(createTaskReservationRequest(3, scheduler, testApp),\n                                     backendAddress);\n    /* 4 tasks have been launched but one was already removed from the runnable queue using\n     * getTask(), leaving 3 runnable tasks. */\n    assertEquals(3, scheduler.runnableTasks());\n    task = scheduler.getNextTask();\n    assertEquals(\"2\", task.requestId);\n    task = scheduler.getNextTask();\n    assertEquals(\"2\", task.requestId);\n    /* Make a list of task ids to use in every call to tasksFinished, and just update the request\n     * id for each call. */\n    TFullTaskId fullTaskId = new TFullTaskId();\n    fullTaskId.taskId = \"\";\n    List<TFullTaskId> completedTasks = Lists.newArrayList();\n    completedTasks.add(fullTaskId);\n\n    // Have a few tasks complete before the last runnable task is removed from the queue.\n    fullTaskId.requestId = \"2\";\n    scheduler.tasksFinished(completedTasks);\n    scheduler.tasksFinished(completedTasks);\n    fullTaskId.requestId = \"1\";\n    scheduler.tasksFinished(completedTasks);\n\n    task = scheduler.getNextTask();\n    assertEquals(\"3\", task.requestId);\n    task = scheduler.getNextTask();\n    assertEquals(\"3\", task.requestId);\n    task = scheduler.getNextTask();\n    assertEquals(\"3\", task.requestId);\n    assertEquals(0, scheduler.runnableTasks());\n  }\n\n  /**\n   * Tests the round robin task scheduler.\n   */\n  @Test\n  public void testBasicRoundRobin() {\n    TaskScheduler scheduler = new RoundRobinTaskScheduler(4);\n    scheduler.initialize(new PropertiesConfiguration(), 12345);\n\n    final String user1 = \"user1\";\n    final InetSocketAddress address1 = new InetSocketAddress(\"localhost\", 1);\n    final String user2 = \"user2\";\n    final InetSocketAddress address2 = new InetSocketAddress(\"localhost\", 1);\n    final String user3 = \"user3\";\n    final InetSocketAddress address3 = new InetSocketAddress(\"localhost\", 1);\n    final String user4 = \"user4\";\n    final InetSocketAddress address4 = new InetSocketAddress(\"localhost\", 1);\n\n    // Submit enough tasks to saturate the existing capacity.\n    scheduler.submitTaskReservations(createTaskReservationRequest(1, scheduler, user1), address1);\n    assertEquals(1, scheduler.runnableTasks());\n    scheduler.getNextTask();\n    assertEquals(0, scheduler.runnableTasks());\n\n    scheduler.submitTaskReservations(createTaskReservationRequest(1, scheduler, user2), address2);\n    assertEquals(1, scheduler.runnableTasks());\n    scheduler.getNextTask();\n    assertEquals(0, scheduler.runnableTasks());\n\n    scheduler.submitTaskReservations(createTaskReservationRequest(1, scheduler, user3), address3);\n    assertEquals(1, scheduler.runnableTasks());\n    scheduler.getNextTask();\n    assertEquals(0, scheduler.runnableTasks());\n\n    scheduler.submitTaskReservations(createTaskReservationRequest(1, scheduler, user4), address4);\n    assertEquals(1, scheduler.runnableTasks());\n    scheduler.getNextTask();\n    assertEquals(0, scheduler.runnableTasks());\n\n    /* Create the following backlogs.\n     * user1: 2 tasks\n     * user2: 3 tasks\n     * user3: 4 tasks\n     */\n    scheduler.submitTaskReservations(\n        createTaskReservationRequest(2, scheduler, user1), address1);\n    scheduler.submitTaskReservations(\n        createTaskReservationRequest(1, scheduler, user2), address2);\n    scheduler.submitTaskReservations(\n        createTaskReservationRequest(1, scheduler, user2), address2);\n    scheduler.submitTaskReservations(\n        createTaskReservationRequest(1, scheduler, user2), address2);\n    scheduler.submitTaskReservations(\n        createTaskReservationRequest(4, scheduler, user3), address3);\n\n    assertEquals(0, scheduler.runnableTasks());\n\n    /* Make sure that as tasks finish (and space is freed up) new tasks are added to the runqueue\n     * in round-robin order.\n     * Make a list of task ids to use in every call to tasksFinished, and just update the request\n     * id. */\n    TFullTaskId fullTaskId = new TFullTaskId();\n    fullTaskId.taskId = \"\";\n    List<TFullTaskId> completedTasks = Lists.newArrayList();\n    completedTasks.add(fullTaskId);\n    fullTaskId.requestId = \"1\";\n\n    scheduler.tasksFinished(completedTasks);\n    assertEquals(1, scheduler.runnableTasks());\n    TaskSpec task = scheduler.getNextTask();\n    assertEquals(\"5\", task.requestId);\n    assertEquals(0, scheduler.runnableTasks());\n\n    fullTaskId.requestId = task.requestId;\n    scheduler.tasksFinished(completedTasks);\n    assertEquals(1, scheduler.runnableTasks());\n    task = scheduler.getNextTask();\n    assertEquals(\"6\", task.requestId);\n    assertEquals(0, scheduler.runnableTasks());\n    fullTaskId.requestId = task.requestId;\n    scheduler.tasksFinished(completedTasks);\n    assertEquals(1, scheduler.runnableTasks());\n    task = scheduler.getNextTask();\n    assertEquals(\"9\", task.requestId);\n    assertEquals(0, scheduler.runnableTasks());\n\n    fullTaskId.requestId = task.requestId;\n    scheduler.tasksFinished(completedTasks);\n    assertEquals(1, scheduler.runnableTasks());\n    task = scheduler.getNextTask();\n    assertEquals(\"5\", task.requestId);\n    assertEquals(0, scheduler.runnableTasks());\n\n    fullTaskId.requestId = task.requestId;\n    scheduler.tasksFinished(completedTasks);\n    assertEquals(1, scheduler.runnableTasks());\n    task = scheduler.getNextTask();\n    assertEquals(\"7\", task.requestId);\n    assertEquals(0, scheduler.runnableTasks());\n\n    fullTaskId.requestId = task.requestId;\n    scheduler.tasksFinished(completedTasks);\n    assertEquals(1, scheduler.runnableTasks());\n    task = scheduler.getNextTask();\n    assertEquals(\"9\", task.requestId);\n    assertEquals(0, scheduler.runnableTasks());\n\n    fullTaskId.requestId = task.requestId;\n    scheduler.tasksFinished(completedTasks);\n    assertEquals(1, scheduler.runnableTasks());\n    task = scheduler.getNextTask();\n    assertEquals(\"8\", task.requestId);\n    assertEquals(0, scheduler.runnableTasks());\n\n    fullTaskId.requestId = task.requestId;\n    scheduler.tasksFinished(completedTasks);\n    assertEquals(1, scheduler.runnableTasks());\n    task = scheduler.getNextTask();\n    assertEquals(\"9\", task.requestId);\n    assertEquals(0, scheduler.runnableTasks());\n\n    fullTaskId.requestId = task.requestId;\n    scheduler.tasksFinished(completedTasks);\n    assertEquals(1, scheduler.runnableTasks());\n    task = scheduler.getNextTask();\n    assertEquals(\"9\", task.requestId);\n    assertEquals(0, scheduler.runnableTasks());\n  }\n\n  @Test\n  public void testRoundRobinDoesNotGiveUpUserSpotWhenGetTaskFails() {\n    TaskScheduler scheduler = new RoundRobinTaskScheduler(4);\n    scheduler.initialize(new PropertiesConfiguration(), 12345);\n\n    final String user1 = \"user1\";\n    final InetSocketAddress address1 = new InetSocketAddress(\"localhost\", 1);\n    final String user2 = \"user2\";\n    final InetSocketAddress address2 = new InetSocketAddress(\"localhost\", 1);\n    final String user3 = \"user3\";\n    final InetSocketAddress address3 = new InetSocketAddress(\"localhost\", 1);\n    final String user4 = \"user4\";\n    final InetSocketAddress address4 = new InetSocketAddress(\"localhost\", 1);\n\n    // Submit enough tasks to saturate the existing capacity.\n    scheduler.submitTaskReservations(createTaskReservationRequest(1, scheduler, user1), address1);\n    assertEquals(1, scheduler.runnableTasks());\n    scheduler.getNextTask();\n    assertEquals(0, scheduler.runnableTasks());\n\n    scheduler.submitTaskReservations(createTaskReservationRequest(1, scheduler, user2), address2);\n    assertEquals(1, scheduler.runnableTasks());\n    TaskSpec user2Task = scheduler.getNextTask();\n    assertEquals(0, scheduler.runnableTasks());\n\n    scheduler.submitTaskReservations(createTaskReservationRequest(1, scheduler, user3), address3);\n    assertEquals(1, scheduler.runnableTasks());\n    scheduler.getNextTask();\n    assertEquals(0, scheduler.runnableTasks());\n\n    scheduler.submitTaskReservations(createTaskReservationRequest(1, scheduler, user4), address4);\n    assertEquals(1, scheduler.runnableTasks());\n    scheduler.getNextTask();\n    assertEquals(0, scheduler.runnableTasks());\n\n    /* Create the following backlogs.\n     * user1: 2 tasks\n     * user2: 3 tasks\n     * user3: 4 tasks\n     */\n    scheduler.submitTaskReservations(\n        createTaskReservationRequest(2, scheduler, user1), address1);\n    scheduler.submitTaskReservations(\n        createTaskReservationRequest(1, scheduler, user2), address2);\n    scheduler.submitTaskReservations(\n        createTaskReservationRequest(1, scheduler, user2), address2);\n    scheduler.submitTaskReservations(\n        createTaskReservationRequest(1, scheduler, user2), address2);\n    scheduler.submitTaskReservations(\n        createTaskReservationRequest(4, scheduler, user3), address3);\n\n    assertEquals(0, scheduler.runnableTasks());\n\n    // If the getTask() for user 2 fails, the scheduler should try to get another task\n    // for that user rather than using the usual round-robin ordering.\n    scheduler.noTaskForReservation(user2Task);\n    assertEquals(1, scheduler.runnableTasks());\n    user2Task = scheduler.getNextTask();\n    assertEquals(user2, user2Task.user.user);\n    assertEquals(\"6\", user2Task.requestId);\n    assertEquals(0, scheduler.runnableTasks());\n\n    // The scheduler should resume round-robin from user 1 (and not start the round-robin\n    // again after user 2).\n    TFullTaskId fullTaskId = new TFullTaskId();\n    fullTaskId.taskId = \"\";\n    List<TFullTaskId> completedTasks = Lists.newArrayList();\n    completedTasks.add(fullTaskId);\n    fullTaskId.requestId = \"1\";\n\n    scheduler.tasksFinished(completedTasks);\n    assertEquals(1, scheduler.runnableTasks());\n    TaskSpec task = scheduler.getNextTask();\n    assertEquals(user1, task.user.user);\n    assertEquals(\"5\", task.requestId);\n    assertEquals(0, scheduler.runnableTasks());\n\n    // If the scheduler eventually exhausts the queue of tasks for user 2, and cannot launch any,\n    // it sound continue in round-robin order.\n    scheduler.noTaskForReservation(user2Task);\n    assertEquals(1, scheduler.runnableTasks());\n    user2Task = scheduler.getNextTask();\n    assertEquals(user2, user2Task.user.user);\n    assertEquals(\"7\", user2Task.requestId);\n    assertEquals(0, scheduler.runnableTasks());\n\n    scheduler.noTaskForReservation(user2Task);\n    assertEquals(1, scheduler.runnableTasks());\n    user2Task = scheduler.getNextTask();\n    assertEquals(user2, user2Task.user.user);\n    assertEquals(\"8\", user2Task.requestId);\n    assertEquals(0, scheduler.runnableTasks());\n\n    scheduler.noTaskForReservation(user2Task);\n    assertEquals(1, scheduler.runnableTasks());\n    task = scheduler.getNextTask();\n    assertEquals(user3, task.user.user);\n    assertEquals(\"9\", task.requestId);\n    assertEquals(0, scheduler.runnableTasks());\n  }\n\n  @Test\n  public void testPriority() {\n    /* Submit tasks at priority 0, 1, and 2 and ensure that the highest priority tasks are\n     * run soonest.\n     */\n    TaskScheduler scheduler = new PriorityTaskScheduler(4);\n    scheduler.initialize(new PropertiesConfiguration(), 12345);\n\n    final InetSocketAddress appBackendAddress = new InetSocketAddress(\"localhost\", 1);\n    final String user = \"user\";\n\n    // Submit enough tasks to saturate the existing capacity (with one task queued).\n    scheduler.submitTaskReservations(\n        createTaskReservationRequest(5, scheduler, user, 2), appBackendAddress);\n    assertEquals(4, scheduler.runnableTasks());\n\n    // Submit 3 tasks for higher priority users (2 at priority 1 and 1 at priority 0).\n    scheduler.submitTaskReservations(\n        createTaskReservationRequest(2, scheduler, user, 1), appBackendAddress);\n    scheduler.submitTaskReservations(\n        createTaskReservationRequest(1, scheduler, user, 0), appBackendAddress);\n\n    TaskSpec task = scheduler.getNextTask();\n    assertEquals(\"1\", task.requestId);\n    assertEquals(3, scheduler.runnableTasks());\n    task = scheduler.getNextTask();\n    assertEquals(\"1\", task.requestId);\n    assertEquals(2, scheduler.runnableTasks());\n    task = scheduler.getNextTask();\n    assertEquals(\"1\", task.requestId);\n    assertEquals(1, scheduler.runnableTasks());\n    task = scheduler.getNextTask();\n    assertEquals(\"1\", task.requestId);\n    assertEquals(0, scheduler.runnableTasks());\n\n    /* Make sure that as tasks finish, new tasks are added to the runqueue in strictly priority\n     * order.\n     */\n    TFullTaskId fullTaskId = new TFullTaskId();\n    fullTaskId.taskId = \"\";\n    List<TFullTaskId> completedTasks = Lists.newArrayList();\n    completedTasks.add(fullTaskId);\n    fullTaskId.requestId = \"1\";\n\n    scheduler.tasksFinished(completedTasks);\n    assertEquals(1, scheduler.runnableTasks());\n    task = scheduler.getNextTask();\n    assertEquals(\"3\", task.requestId);\n    assertEquals(0, scheduler.runnableTasks());\n\n    scheduler.tasksFinished(completedTasks);\n    assertEquals(1, scheduler.runnableTasks());\n    task = scheduler.getNextTask();\n    assertEquals(\"2\", task.requestId);\n    assertEquals(0, scheduler.runnableTasks());\n\n    scheduler.tasksFinished(completedTasks);\n    assertEquals(1, scheduler.runnableTasks());\n    task = scheduler.getNextTask();\n    assertEquals(\"2\", task.requestId);\n    assertEquals(0, scheduler.runnableTasks());\n\n    scheduler.tasksFinished(completedTasks);\n    assertEquals(1, scheduler.runnableTasks());\n    task = scheduler.getNextTask();\n    assertEquals(\"1\", task.requestId);\n    assertEquals(0, scheduler.runnableTasks());\n  }\n}\n"
  },
  {
    "path": "src/test/java/edu/berkeley/sparrow/daemon/scheduler/TestConstrainedTaskPlacer.java",
    "content": "/*\n * Copyright 2013 The Regents of The University California\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *   http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage edu.berkeley.sparrow.daemon.scheduler;\nimport static org.junit.Assert.assertEquals;\nimport static org.junit.Assert.assertTrue;\n\nimport java.net.InetSocketAddress;\nimport java.nio.ByteBuffer;\nimport java.util.ArrayList;\nimport java.util.HashSet;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.Map.Entry;\nimport java.util.Set;\n\nimport org.apache.log4j.BasicConfigurator;\nimport org.junit.After;\nimport org.junit.Before;\nimport org.junit.Test;\n\nimport edu.berkeley.sparrow.daemon.util.Network;\nimport edu.berkeley.sparrow.thrift.TEnqueueTaskReservationsRequest;\nimport edu.berkeley.sparrow.thrift.THostPort;\nimport edu.berkeley.sparrow.thrift.TPlacementPreference;\nimport edu.berkeley.sparrow.thrift.TSchedulingRequest;\nimport edu.berkeley.sparrow.thrift.TTaskLaunchSpec;\nimport edu.berkeley.sparrow.thrift.TTaskSpec;\nimport edu.berkeley.sparrow.thrift.TUserGroupInfo;\n\npublic class TestConstrainedTaskPlacer {\n  private static final String APP_ID = \"test app\";\n  private static final String USER = \"user\";\n  private static final String GROUP = \"group\";\n  private static final int PRIORITY = 0;\n  private static final String REQUEST_ID = \"request id\";\n  private static final THostPort SCHEDULER_ADDRESS = new THostPort(\"localhost\", 12345);\n  private static final int ITERATIONS = 1;\n\n  private static final TUserGroupInfo user = new TUserGroupInfo(USER, GROUP, PRIORITY);\n  private static final Set<InetSocketAddress> preferredNodes = new HashSet<InetSocketAddress>();\n  private static final Set<InetSocketAddress> allBackends = new HashSet<InetSocketAddress>();\n\n  @Before\n  public void setUp() {\n    // Set up a simple configuration that logs on the console.\n    BasicConfigurator.configure();\n  }\n\n  @After\n  public void tearDown() {\n    preferredNodes.clear();\n    allBackends.clear();\n  }\n\n  /** Sanity checks a list of requests returned by {@code getEnqueueTaskReservationsRequests()}.\n   *\n   * For each request, ensures that the reservation is on one of the preferred nodes, and that it\n   * has the appropriate app id/user/request id/scheduler address.\n   */\n  private void sanityCheckRequests(\n      Map<InetSocketAddress, TEnqueueTaskReservationsRequest> requests,\n      int expectedTotalReservations) {\n    int totalEnqueuedTasks = 0;\n    for (Entry<InetSocketAddress, TEnqueueTaskReservationsRequest> entry : requests.entrySet()) {\n      // The node monitor the request is being sent to should be among the list of preferred\n      // nodes.\n      assertTrue(\"Expect \" + entry.getKey() + \" to be among the set of preferred nodes\",\n                 preferredNodes.contains(entry.getKey()));\n      TEnqueueTaskReservationsRequest request = entry.getValue();\n      assertEquals(request.getAppId(), APP_ID);\n      assertEquals(request.getUser(), user);\n      assertEquals(request.getRequestId(), REQUEST_ID);\n      assertEquals(request.getSchedulerAddress(), SCHEDULER_ADDRESS);\n      assertTrue(request.getNumTasks() > 0);\n      totalEnqueuedTasks += request.getNumTasks();\n    }\n    assertEquals(expectedTotalReservations, totalEnqueuedTasks);\n  }\n\n  /** Generates a scheduling request with 3 tasks, and populates preferredNodes/allBackends. */\n  private TSchedulingRequest generateSchedulingRequests() {\n    preferredNodes.add(new InetSocketAddress(\"123.4.5.6\", 1));\n    preferredNodes.add(new InetSocketAddress(\"3.4.5.6\", 56));\n    preferredNodes.add(new InetSocketAddress(\"4.2.3.67\", 89));\n    preferredNodes.add(new InetSocketAddress(\"4.1.23.45\", 100));\n    preferredNodes.add(new InetSocketAddress(\"9.0.0.0\", 204));\n\n    List<InetSocketAddress> preferredNodesList = new ArrayList<InetSocketAddress>(preferredNodes);\n\n    // Create 3 tasks with overlapping placement preferences (all tasks include\n    // preferredNodesList[2] in their placement preferences).\n    ByteBuffer message = ByteBuffer.allocate(1);\n    List<TTaskSpec> tasks = new ArrayList<TTaskSpec>();\n    final int NUM_TASKS = 3;\n    for (int i = 0; i < NUM_TASKS; ++i) {\n      TPlacementPreference placementPreference = new TPlacementPreference();\n      for (int j = i; j < i + 3; ++j) {\n        placementPreference.addToNodes(preferredNodesList.get(j).getAddress().getHostAddress());\n      }\n      String id = \"test task \" + i;\n      tasks.add(new TTaskSpec(id, placementPreference, message));\n    }\n\n    TSchedulingRequest schedulingRequest = new TSchedulingRequest(APP_ID, tasks, user);\n\n    // Create list of available backend nodes, with some additional nodes in addition to the\n    // preferred ones.\n    allBackends.addAll(preferredNodes);\n    allBackends.add(new InetSocketAddress(\"1.2.3.4\", 345));\n    allBackends.add(new InetSocketAddress(\"5.6.7.81\", 2000));\n    return schedulingRequest;\n  }\n\n  /**\n   * Creates a scheduling request with a single task that has 3 preferred nodes, and ensures\n   * that repeated calls to getEnqueueTaskReservationsRequests always returns requests for one\n   * of those three nodes.\n   */\n  @Test\n  public void testGetEnqueueTaskReservationsRequestsSingleTask() {\n    ConstrainedTaskPlacer taskPlacer = new ConstrainedTaskPlacer(REQUEST_ID, 2);\n\n    preferredNodes.add(new InetSocketAddress(\"127.0.0.1\", 22));\n    preferredNodes.add(new InetSocketAddress(\"123.4.5.6\", 20000));\n    preferredNodes.add(new InetSocketAddress(\"7.0.0.9\", 45));\n\n    // Create a single task with three placement preferences.\n    ByteBuffer message = ByteBuffer.allocate(1);\n    TPlacementPreference placementPreference = new TPlacementPreference();\n    for (InetSocketAddress address : preferredNodes) {\n      placementPreference.addToNodes(address.getAddress().getHostAddress());\n    }\n    TTaskSpec task = new TTaskSpec(\"test task\", placementPreference, message);\n\n    // Create the scheduling request.\n    List<TTaskSpec> tasks = new ArrayList<TTaskSpec>();\n    tasks.add(task);\n    TSchedulingRequest schedulingRequest = new TSchedulingRequest(APP_ID, tasks, user);\n\n    // Create a set of backends, including all of the preferred nodes and some extra nodes too.\n    allBackends.add(new InetSocketAddress(\"3.4.5.6\", 174));\n    for (InetSocketAddress node : preferredNodes) {\n      allBackends.add(node);\n    }\n    allBackends.add(new InetSocketAddress(\"234.5.6.7\", 22));\n    allBackends.add(new InetSocketAddress(\"9.8.7.6\", 1));\n\n    for (int i = 0; i < ITERATIONS; ++i) {\n      Map<InetSocketAddress, TEnqueueTaskReservationsRequest> requests =\n          taskPlacer.getEnqueueTaskReservationsRequests(schedulingRequest, REQUEST_ID, allBackends,\n                                                        SCHEDULER_ADDRESS);\n      sanityCheckRequests(requests, 2);\n    }\n  }\n\n  /**\n   * Creates a scheduling request with 3 tasks, and sanity checks the result of\n   * getEnqueueTaskReservationsRequests()\n   */\n  @Test\n  public void testMultipleTasks() {\n    TSchedulingRequest schedulingRequest = generateSchedulingRequests();\n\n    for (int i = 0; i < ITERATIONS; ++i) {\n      ConstrainedTaskPlacer taskPlacer = new ConstrainedTaskPlacer(REQUEST_ID, 2);\n\n      Map<InetSocketAddress, TEnqueueTaskReservationsRequest> requests =\n          taskPlacer.getEnqueueTaskReservationsRequests(schedulingRequest, REQUEST_ID,\n                                                        allBackends, SCHEDULER_ADDRESS);\n      sanityCheckRequests(requests, 6);\n      sanityCheckGetTasksAndCancellation(schedulingRequest, taskPlacer,\n          requests);\n    }\n\n  }\n\n  private void sanityCheckGetTasksAndCancellation(\n      TSchedulingRequest schedulingRequest, ConstrainedTaskPlacer taskPlacer,\n      Map<InetSocketAddress, TEnqueueTaskReservationsRequest> requests) {\n    Set<String> taskIds = new HashSet<String>();\n    for (TTaskSpec task : schedulingRequest.tasks) {\n      taskIds.add(task.taskId);\n    }\n\n    // Now try to get the three tasks.\n    Set<String> unlaunchedTaskIds = new HashSet<String>(taskIds);\n    int numGetTasks = 0;\n    Set<THostPort> cancellations = null;\n    for (Entry<InetSocketAddress, TEnqueueTaskReservationsRequest> entry : requests.entrySet()) {\n      // For each entry, try to assign the tasks.  Once all tasks have been assigned, cancel the\n      // remaining reservations.\n\n      THostPort hostPort = Network.socketAddressToThrift(entry.getKey());\n      // If the request has been cancelled, remove the current node monitor from the\n      // cancellations set, so we can check at the end that the cancellations set is empty to\n      // ensure that the cancellations returned were correct.\n      if (cancellations != null) {\n        assertTrue(cancellations.contains(hostPort));\n        cancellations.remove(hostPort);\n      }\n\n      for (int taskIndex = 0; taskIndex < entry.getValue().numTasks;\n          taskIndex++) {\n        ++numGetTasks;\n        List<TTaskLaunchSpec> specs = taskPlacer.assignTask(hostPort);\n        assertTrue(specs != null);\n        if (numGetTasks == 0) {\n          // If this is the first attempt, we should definitely get a task.\n          assertEquals(specs.size(), 1);\n        }\n        if (specs.size() == 1) {\n          assertTrue(\"assignTask() returned a task after all tasks were launched!\",\n              unlaunchedTaskIds.size() > 0);\n          TTaskLaunchSpec spec = specs.get(0);\n          assertTrue(spec != null);\n          assertTrue(unlaunchedTaskIds.contains(spec.getTaskId()));\n          unlaunchedTaskIds.remove(spec.getTaskId());\n        }\n\n        // If all of the tasks have been launched, cancel the outstanding ones.\n        if (unlaunchedTaskIds.size() == 0 && cancellations == null) {\n          assertTrue(taskPlacer.allTasksPlaced());\n          cancellations = new HashSet<THostPort>(\n              taskPlacer.getOutstandingNodeMonitorsForCancellation());\n          assertTrue(cancellations.size() > 0);\n\n          // If not all of the reservations at the current node monitor have been replied to yet,\n          // there should be a cancellation for the current node monitor.\n          if (taskIndex < entry.getValue().numTasks - 1) {\n            assertTrue(cancellations.contains(hostPort));\n            cancellations.remove(hostPort);\n          }\n\n          // Another cancellation should lead to no outstanding node monitors.\n          Set<THostPort> secondCancellations = new HashSet<THostPort>(\n              taskPlacer.getOutstandingNodeMonitorsForCancellation());\n          assertEquals(secondCancellations.size(), 0);\n\n          // Keep going after the cancellation, since this can happen if a getTask() is in flight\n          // when the original cancellation occurs.\n        }\n      }\n    }\n  }\n\n  /**\n   * Creates a scheduling request with 3 constrained tasks and 1 unconstrained task, and sanity\n   * checks the result of getEnqueueTaskReservationsRequests(). Then verifies the result of\n   * assignTask().\n   */\n  @Test\n  public void testConstrainedAndUnconstrainedTasks() {\n    List<InetSocketAddress> preferredNodes = new ArrayList<InetSocketAddress>();\n    preferredNodes.add(new InetSocketAddress(\"123.4.5.6\", 1));\n    preferredNodes.add(new InetSocketAddress(\"3.4.5.6\", 56));\n    preferredNodes.add(new InetSocketAddress(\"4.2.3.67\", 89));\n    preferredNodes.add(new InetSocketAddress(\"4.1.23.45\", 100));\n    preferredNodes.add(new InetSocketAddress(\"9.0.0.0\", 204));\n\n    // Create 3 tasks with overlapping placement preferences (all tasks include nodes[2] in their\n    // placement preferences).\n    ByteBuffer message = ByteBuffer.allocate(1);\n    List<TTaskSpec> tasks = new ArrayList<TTaskSpec>();\n    final int NUM_TASKS = 3;\n    Set<String> constrainedTaskIds = new HashSet<String>();\n    for (int i = 0; i < NUM_TASKS; ++i) {\n      TPlacementPreference placementPreference = new TPlacementPreference();\n      for (int j = i; j < i + 3; ++j) {\n        placementPreference.addToNodes(preferredNodes.get(j).getAddress().getHostAddress());\n      }\n      String id = \"constrained test task \" + i;\n      constrainedTaskIds.add(id);\n      tasks.add(new TTaskSpec(id, placementPreference, message));\n    }\n\n    String unconstrainedTaskId = \"unconstrained test task\";\n    tasks.add(new TTaskSpec(unconstrainedTaskId, null, message));\n\n    TUserGroupInfo user = new TUserGroupInfo(USER, GROUP, PRIORITY);\n    TSchedulingRequest schedulingRequest = new TSchedulingRequest(APP_ID, tasks, user);\n\n    // Create list of available backend nodes, with some additional nodes in additional to the\n    // preferred ones.\n    List<InetSocketAddress> backendNodes = new ArrayList<InetSocketAddress>(preferredNodes);\n    backendNodes.add(new InetSocketAddress(\"1.2.3.4\", 345));\n    backendNodes.add(new InetSocketAddress(\"5.6.7.81\", 2000));\n\n    for (int i = 0; i < ITERATIONS; ++i) {\n      ConstrainedTaskPlacer taskPlacer = new ConstrainedTaskPlacer(REQUEST_ID, 2);\n\n      Map<InetSocketAddress, TEnqueueTaskReservationsRequest> requests =\n          taskPlacer.getEnqueueTaskReservationsRequests(schedulingRequest, REQUEST_ID,\n                                                        backendNodes, SCHEDULER_ADDRESS);\n\n      // Sanity check the list of requests.\n      int totalEnqueuedTasks = 0;\n      /* Number of requests not in the list of preferred nodes (expect at most 2, corresponding\n       * to the two reservations for the unconstrained task). */\n      int nonPreferredNodes = 0;\n      for (Entry<InetSocketAddress, TEnqueueTaskReservationsRequest> entry : requests.entrySet()) {\n        if (!preferredNodes.contains(entry.getKey())) {\n          nonPreferredNodes++;\n          assertTrue(\"Expect at most two entrys to be outside the set of preferred nodes\",\n              nonPreferredNodes <= 2);\n        }\n        TEnqueueTaskReservationsRequest request = entry.getValue();\n        assertEquals(request.getAppId(), APP_ID);\n        assertEquals(request.getUser(), user);\n        assertEquals(request.getRequestId(), REQUEST_ID);\n        assertEquals(request.getSchedulerAddress(), SCHEDULER_ADDRESS);\n        assertTrue(request.getNumTasks() > 0);\n        totalEnqueuedTasks += request.getNumTasks();\n      }\n      // Expect two choices for each of the 4 tasks.\n      assertEquals(totalEnqueuedTasks, 8);\n\n      sanityCheckGetTasksAndCancellation(schedulingRequest, taskPlacer, requests);\n    }\n\n  }\n\n}\n"
  },
  {
    "path": "src/test/java/edu/berkeley/sparrow/daemon/scheduler/TestUnconstrainedTaskPlacer.java",
    "content": "/*\n * Copyright 2013 The Regents of The University California\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *   http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage edu.berkeley.sparrow.daemon.scheduler;\n\nimport static org.junit.Assert.assertEquals;\nimport static org.junit.Assert.assertTrue;\n\nimport java.net.InetSocketAddress;\nimport java.nio.ByteBuffer;\nimport java.util.Collections;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.Map.Entry;\nimport java.util.Set;\n\nimport org.apache.log4j.BasicConfigurator;\nimport org.junit.Before;\nimport org.junit.Test;\n\nimport com.google.common.collect.Lists;\nimport com.google.common.collect.Sets;\n\nimport edu.berkeley.sparrow.thrift.TEnqueueTaskReservationsRequest;\nimport edu.berkeley.sparrow.thrift.THostPort;\nimport edu.berkeley.sparrow.thrift.TPlacementPreference;\nimport edu.berkeley.sparrow.thrift.TSchedulingRequest;\nimport edu.berkeley.sparrow.thrift.TTaskLaunchSpec;\nimport edu.berkeley.sparrow.thrift.TTaskSpec;\nimport edu.berkeley.sparrow.thrift.TUserGroupInfo;\n\npublic class TestUnconstrainedTaskPlacer {\n  private static final String APP_ID = \"test app\";\n  private static final String USER = \"user\";\n  private static final String GROUP = \"group\";\n  private static final int PRIORITY = 0;\n  private static final String REQUEST_ID = \"request id\";\n  private static final THostPort SCHEDULER_ADDRESS = new THostPort(\"localhost\", 12345);\n  private static final int NUM_TASKS = 2;\n  private static final double PROBE_RATIO = 1.5;\n  private static TUserGroupInfo user = new TUserGroupInfo(USER, GROUP, PRIORITY);\n  private static List<TTaskSpec> tasks;\n  Set<String> taskIds;\n  private static List<InetSocketAddress> backendNodes;\n\n  @Before\n  public void setUp() throws Exception {\n    // Set up a simple configuration that logs on the console.\n    BasicConfigurator.configure();\n    tasks = Lists.newArrayList();\n    taskIds = Sets.newHashSet();\n    ByteBuffer message = ByteBuffer.allocate(1);\n    TPlacementPreference placementPreference = new TPlacementPreference();\n    for (int i = 0; i < NUM_TASKS; ++i) {\n      String id = \"test task \" + i;\n      taskIds.add(id);\n      tasks.add(new TTaskSpec(id, placementPreference, message));\n    }\n\n    backendNodes = Lists.newArrayList();\n    backendNodes.add(new InetSocketAddress(\"3.4.5.6\", 174));\n    backendNodes.add(new InetSocketAddress(\"127.124.0.1\", 22));\n    backendNodes.add(new InetSocketAddress(\"123.4.5.6\", 20000));\n    backendNodes.add(new InetSocketAddress(\"7.0.0.9\", 45));\n    backendNodes.add(new InetSocketAddress(\"234.5.6.7\", 22));\n    backendNodes.add(new InetSocketAddress(\"9.8.7.6\", 1));\n  }\n  \n  @Test\n  public void enqueueTaskReservationsWithMoreReservationsThanNodes() {\n\tfinal double PROBE_RATIO = 2;\n\tfinal int NUM_TASKS = 14;\n\n    ByteBuffer message = ByteBuffer.allocate(1);\n    TPlacementPreference placementPreference = new TPlacementPreference();\n    while (tasks.size() < NUM_TASKS) {\n      String id = \"test task \" + tasks.size();\n      taskIds.add(id);\n      tasks.add(new TTaskSpec(id, placementPreference, message));\n    }\n\n    TSchedulingRequest schedulingRequest = new TSchedulingRequest(APP_ID, tasks, user);\n    \n    final int NUM_ITERATIONS = 100;\n    for (int i = 0; i < NUM_ITERATIONS; ++i) {\n      UnconstrainedTaskPlacer taskPlacer = new UnconstrainedTaskPlacer(REQUEST_ID, PROBE_RATIO);\n\n      Map<InetSocketAddress, TEnqueueTaskReservationsRequest> requests =\n          taskPlacer.getEnqueueTaskReservationsRequests(schedulingRequest, REQUEST_ID, backendNodes,\n                                                        SCHEDULER_ADDRESS);\n      // Sanity check the list of requests.\n      final int EXPECTED_RESERVATIONS = 28;\n      int reservationsCount = 0;\n      for (Entry<InetSocketAddress, TEnqueueTaskReservationsRequest> entry : requests.entrySet()) {\n        // The node monitor the request is being sent to should be among the list of backend nodes.\n        assertTrue(\"Expect \" + entry.getKey() + \" to be among the set of backend nodes\",\n                   backendNodes.contains(entry.getKey()));\n        TEnqueueTaskReservationsRequest request = entry.getValue();\n        assertEquals(request.getAppId(), APP_ID);\n        assertEquals(request.getUser(), user);\n        assertEquals(request.getRequestId(), REQUEST_ID);\n        assertEquals(request.getSchedulerAddress(), SCHEDULER_ADDRESS);\n        // Expect the reservations to be evenly balanced over the machines.\n        assertTrue(request.getNumTasks() == 4 || request.getNumTasks() == 5);\n        reservationsCount += request.getNumTasks();\n      }\n      assertEquals(reservationsCount, EXPECTED_RESERVATIONS);\n    }\n  }\n\n\n  /**\n   * Calls getEnqueueTaskReservations() for two tasks, with 6 possible backend nodes, and ensures\n   * that the reservations returned are for distinct nodes in the set of backends.\n   */\n  @Test\n  public void sanityCheckEnqueueTaskReservations() {\n    TSchedulingRequest schedulingRequest = new TSchedulingRequest(APP_ID, tasks, user);\n\n    final int NUM_ITERATIONS = 100;\n    for (int i = 0; i < NUM_ITERATIONS; ++i) {\n      UnconstrainedTaskPlacer taskPlacer = new UnconstrainedTaskPlacer(REQUEST_ID, PROBE_RATIO);\n\n      Map<InetSocketAddress, TEnqueueTaskReservationsRequest> requests =\n          taskPlacer.getEnqueueTaskReservationsRequests(schedulingRequest, REQUEST_ID, backendNodes,\n                                                        SCHEDULER_ADDRESS);\n      // Sanity check the list of requests.\n      final int EXPECTED_REQUESTS = 3;\n      assertEquals(EXPECTED_REQUESTS, requests.size());\n      for (Entry<InetSocketAddress, TEnqueueTaskReservationsRequest> entry : requests.entrySet()) {\n        // The node monitor the request is being sent to should be among the list of backend nodes.\n        assertTrue(\"Expect \" + entry.getKey() + \" to be among the set of backend nodes\",\n                   backendNodes.contains(entry.getKey()));\n        TEnqueueTaskReservationsRequest request = entry.getValue();\n        assertEquals(request.getAppId(), APP_ID);\n        assertEquals(request.getUser(), user);\n        assertEquals(request.getRequestId(), REQUEST_ID);\n        assertEquals(request.getSchedulerAddress(), SCHEDULER_ADDRESS);\n        assertEquals(1, request.getNumTasks());\n      }\n    }\n  }\n\n  /**\n   * First, calls getEnqueueTaskReservationsRequests() for a job with two tasks.  Then, calls\n   * assignTasks() for the backends returned by getEnqueueTaskReservationsRequests() and ensures\n   * that the tasks returned are consistent with the original scheduling request.\n   */\n  @Test\n  public void testAssignTask() {\n    TSchedulingRequest schedulingRequest = new TSchedulingRequest(APP_ID, tasks, user);\n\n    final int numIterations = 100;\n    final int expectedReservations = 3;\n    for (int i = 0; i < numIterations; ++i) {\n      UnconstrainedTaskPlacer taskPlacer = new UnconstrainedTaskPlacer(REQUEST_ID, PROBE_RATIO);\n\n      Map<InetSocketAddress, TEnqueueTaskReservationsRequest> requests =\n          taskPlacer.getEnqueueTaskReservationsRequests(schedulingRequest, REQUEST_ID, backendNodes,\n                                                        SCHEDULER_ADDRESS);\n\n      // Now try to get tasks, and ensure that the task placer will return exactly 2 tasks.\n      List<InetSocketAddress> nodes = Lists.newArrayList(requests.keySet());\n      assertEquals(nodes.size(), expectedReservations);\n      Collections.shuffle(nodes);\n      Set<String> taskIdsCopy = Sets.newHashSet(taskIds);\n      for (int j = 0; j < expectedReservations; ++j) {\n        THostPort hostPort = new THostPort(nodes.get(j).getHostName(), nodes.get(j).getPort());\n        List<TTaskLaunchSpec> specs = taskPlacer.assignTask(hostPort);\n        assertTrue(specs != null);\n        if (j < NUM_TASKS) {\n          assertEquals(specs.size(), 1);\n          TTaskLaunchSpec spec = specs.get(0);\n          assertTrue(\"Expect to receive a task spec for task \" + j + \" at \" +\n                     hostPort.getHost() + \":\" + hostPort.getPort(), spec != null);\n          assertTrue(\"Expect list of unlaunched tasks to contain \" + spec.getTaskId(),\n                     taskIdsCopy.contains(spec.getTaskId()));\n          taskIdsCopy.remove(spec.getTaskId());\n        } else {\n          assertEquals(specs.size(), 0);\n        }\n      }\n    }\n  }\n\n  /**\n   * Verifies that allTasksPlaced() works correctly by first calling\n   * getEnqueueTaskReservationsRequests() for a job with two tasks. Then, dovetails calls to\n   * assignTasks() to calls of allTasksPlaced() to ensure that allTasksPlaced() returns\n   * the correct answer.\n   */\n  @Test\n  public void testAllTasksPlaced() {\n    TSchedulingRequest schedulingRequest = new TSchedulingRequest(APP_ID, tasks, user);\n\n    final int numIterations = 100;\n    final int expectedReservations = 3;\n    for (int i = 0; i < numIterations; ++i) {\n      UnconstrainedTaskPlacer taskPlacer = new UnconstrainedTaskPlacer(REQUEST_ID, PROBE_RATIO);\n\n      Map<InetSocketAddress, TEnqueueTaskReservationsRequest> requests =\n          taskPlacer.getEnqueueTaskReservationsRequests(schedulingRequest, REQUEST_ID, backendNodes,\n                                                        SCHEDULER_ADDRESS);\n\n      // Now try to get tasks, and ensure that the task placer will return exactly 2 tasks.\n      List<InetSocketAddress> nodes = Lists.newArrayList(requests.keySet());\n      assertEquals(nodes.size(), expectedReservations);\n      Collections.shuffle(nodes);\n      Set<String> taskIdsCopy = Sets.newHashSet(taskIds);\n      for (int j = 0; j < expectedReservations; ++j) {\n        if (j < NUM_TASKS) {\n          assertTrue(!taskPlacer.allTasksPlaced());\n        }\n        THostPort hostPort = new THostPort(nodes.get(j).getHostName(), nodes.get(j).getPort());\n        List<TTaskLaunchSpec> specs = taskPlacer.assignTask(hostPort);\n        assertTrue(specs != null);\n        if (j < NUM_TASKS) {\n          assertEquals(1, specs.size());\n          TTaskLaunchSpec spec = specs.get(0);\n          assertTrue(\"Expect to receive a task spec for task \" + j + \" at \" +\n                     hostPort.getHost() + \":\" + hostPort.getPort(), spec != null);\n          assertTrue(\"Expect list of unlaunched tasks to contain \" + spec.getTaskId(),\n                     taskIdsCopy.contains(spec.getTaskId()));\n          taskIdsCopy.remove(spec.getTaskId());\n        } else {\n          assertTrue(taskPlacer.allTasksPlaced());\n          assertEquals(0, specs.size());\n        }\n      }\n    }\n  }\n\n  @Test\n  public void testCancellation() {\n    TSchedulingRequest schedulingRequest = new TSchedulingRequest(APP_ID, tasks, user);\n\n    final int numIterations = 100;\n    for (int i = 0; i < numIterations; ++i) {\n      UnconstrainedTaskPlacer taskPlacer = new UnconstrainedTaskPlacer(REQUEST_ID, PROBE_RATIO);\n      Map<InetSocketAddress, TEnqueueTaskReservationsRequest> requests =\n          taskPlacer.getEnqueueTaskReservationsRequests(schedulingRequest, REQUEST_ID, backendNodes,\n              SCHEDULER_ADDRESS);\n\n      List<InetSocketAddress> nodes = Lists.newArrayList(requests.keySet());\n      for (int taskIndex = 0; taskIndex < NUM_TASKS; ++taskIndex) {\n        THostPort hostPort = new THostPort(nodes.get(0).getAddress().getHostAddress(),\n                                           nodes.get(0).getPort());\n        nodes.remove(0);\n        taskPlacer.assignTask(hostPort);\n      }\n\n      // Get the node monitors that should be cancelled.  At this point, the remaining entries in\n      // nodes should be the set of nodes where requests should be cancelled.\n      Set<THostPort> remainingNodeMonitors = taskPlacer.getOutstandingNodeMonitorsForCancellation();\n      assertEquals(nodes.size(), remainingNodeMonitors.size());\n      for (InetSocketAddress node : nodes) {\n        THostPort hostPort = new THostPort(node.getAddress().getHostAddress(), node.getPort());\n        assertTrue(remainingNodeMonitors.contains(hostPort));\n      }\n\n      // Trying to get the outstanding NMs for cancellation again should return an empty set.\n      assertEquals(0, taskPlacer.getOutstandingNodeMonitorsForCancellation().size());\n    }\n  }\n}\n"
  },
  {
    "path": "src/test/java/edu/berkeley/sparrow/daemon/util/TestThriftClientPool.java",
    "content": "/*\n * Copyright 2013 The Regents of The University California\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *   http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage edu.berkeley.sparrow.daemon.util;\nimport static org.junit.Assert.*;\nimport static org.mockito.Mockito.*;\n\nimport java.net.InetSocketAddress;\n\nimport org.apache.commons.pool.impl.GenericKeyedObjectPool.Config;\nimport org.apache.thrift.async.TAsyncClient;\nimport org.apache.thrift.async.TAsyncClientManager;\nimport org.apache.thrift.protocol.TProtocolFactory;\nimport org.apache.thrift.transport.TNonblockingTransport;\nimport org.junit.Test;\n\nimport edu.berkeley.sparrow.daemon.util.ThriftClientPool.MakerFactory;\n\npublic class TestThriftClientPool {\n\n  private class MockedMakerFactory implements MakerFactory<TAsyncClient> {\n    @Override\n    public TAsyncClient create(TNonblockingTransport tr,\n        TAsyncClientManager mgr, TProtocolFactory factory) {\n      return mock(TAsyncClient.class);\n    }\n  }\n  \n  /** Test a very common scenario where we make two thrift function calls to the same\n      node in rapid succession. This test ensures that a single client is created and \n      used for both calls. */\n  @Test\n  public void ensureConnectionReUsed() throws Exception {\n    InetSocketAddress sock = new InetSocketAddress(12345);\n    ThriftClientPool<TAsyncClient> pool = new ThriftClientPool<TAsyncClient>(\n        new MockedMakerFactory());\n    assertEquals(0, pool.getNumIdle(sock));\n    assertEquals(0, pool.getNumActive(sock));\n\n    TAsyncClient client1 = pool.borrowClient(sock);\n    \n    assertEquals(0, pool.getNumIdle(sock));\n    assertEquals(1, pool.getNumActive(sock));\n    \n    pool.returnClient(sock, client1);\n    \n    assertEquals(1, pool.getNumIdle(sock));\n    assertEquals(0, pool.getNumActive(sock));\n    \n    TAsyncClient client2 = pool.borrowClient(sock);\n\n    assertEquals(0, pool.getNumIdle(sock));\n    assertEquals(1, pool.getNumActive(sock));\n    \n    assertEquals(client1, client2);\n  }\n  \n  @Test\n  public void testPoolExpiration() throws Exception {\n    // Makes sure that a thrift client gets evicted (and therefore closed) if it is not \n    // used for a certain amount of time.\n    Config conf = ThriftClientPool.getPoolConfig();\n    \n    // We decrease the defaults here so the test runs in reasonable time\n    conf.minEvictableIdleTimeMillis = 10;\n    conf.timeBetweenEvictionRunsMillis = 50;\n    \n    InetSocketAddress sock = new InetSocketAddress(12345);    \n    \n    ThriftClientPool<TAsyncClient> pool = new ThriftClientPool<TAsyncClient>(\n        new MockedMakerFactory(), conf);\n    \n    assertEquals(0, pool.getNumIdle(sock));\n    assertEquals(0, pool.getNumActive(sock));\n    \n    TAsyncClient client = pool.borrowClient(sock);\n    \n    assertEquals(0, pool.getNumIdle(sock));\n    assertEquals(1, pool.getNumActive(sock));\n    \n    pool.returnClient(sock, client);\n    \n    assertEquals(1, pool.getNumIdle(sock));\n    assertEquals(0, pool.getNumActive(sock));\n    \n    Thread.sleep(conf.timeBetweenEvictionRunsMillis * 2);\n    \n    assertEquals(0, pool.getNumIdle(sock));\n    assertEquals(0, pool.getNumActive(sock));\n  }\n}\n"
  },
  {
    "path": "upload.py",
    "content": "#!/usr/bin/env python\n# coding: utf-8\n#\n# Copyright 2007 Google Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n\"\"\"Tool for uploading diffs from a version control system to the codereview app.\n\nUsage summary: upload.py [options] [-- diff_options] [path...]\n\nDiff options are passed to the diff command of the underlying system.\n\nSupported version control systems:\n  Git\n  Mercurial\n  Subversion\n  Perforce\n  CVS\n\nIt is important for Git/Mercurial users to specify a tree/node/branch to diff\nagainst by using the '--rev' option.\n\"\"\"\n# This code is derived from appcfg.py in the App Engine SDK (open source),\n# and from ASPN recipe #146306.\n\nimport ConfigParser\nimport cookielib\nimport errno\nimport fnmatch\nimport getpass\nimport logging\nimport marshal\nimport mimetypes\nimport optparse\nimport os\nimport re\nimport socket\nimport subprocess\nimport sys\nimport urllib\nimport urllib2\nimport urlparse\n\n# The md5 module was deprecated in Python 2.5.\ntry:\n  from hashlib import md5\nexcept ImportError:\n  from md5 import md5\n\ntry:\n  import readline\nexcept ImportError:\n  pass\n\ntry:\n  import keyring\nexcept ImportError:\n  keyring = None\n\n# The logging verbosity:\n#  0: Errors only.\n#  1: Status messages.\n#  2: Info logs.\n#  3: Debug logs.\nverbosity = 1\n\n# The account type used for authentication.\n# This line could be changed by the review server (see handler for\n# upload.py).\nAUTH_ACCOUNT_TYPE = \"GOOGLE\"\n\n# URL of the default review server. As for AUTH_ACCOUNT_TYPE, this line could be\n# changed by the review server (see handler for upload.py).\nDEFAULT_REVIEW_SERVER = \"codereview.appspot.com\"\n\n# Max size of patch or base file.\nMAX_UPLOAD_SIZE = 900 * 1024\n\n# Constants for version control names.  Used by GuessVCSName.\nVCS_GIT = \"Git\"\nVCS_MERCURIAL = \"Mercurial\"\nVCS_SUBVERSION = \"Subversion\"\nVCS_PERFORCE = \"Perforce\"\nVCS_CVS = \"CVS\"\nVCS_UNKNOWN = \"Unknown\"\n\nVCS_ABBREVIATIONS = {\n  VCS_MERCURIAL.lower(): VCS_MERCURIAL,\n  \"hg\": VCS_MERCURIAL,\n  VCS_SUBVERSION.lower(): VCS_SUBVERSION,\n  \"svn\": VCS_SUBVERSION,\n  VCS_PERFORCE.lower(): VCS_PERFORCE,\n  \"p4\": VCS_PERFORCE,\n  VCS_GIT.lower(): VCS_GIT,\n  VCS_CVS.lower(): VCS_CVS,\n}\n\n# The result of parsing Subversion's [auto-props] setting.\nsvn_auto_props_map = None\n\ndef GetEmail(prompt):\n  \"\"\"Prompts the user for their email address and returns it.\n\n  The last used email address is saved to a file and offered up as a suggestion\n  to the user. If the user presses enter without typing in anything the last\n  used email address is used. If the user enters a new address, it is saved\n  for next time we prompt.\n\n  \"\"\"\n  last_email_file_name = os.path.expanduser(\"~/.last_codereview_email_address\")\n  last_email = \"\"\n  if os.path.exists(last_email_file_name):\n    try:\n      last_email_file = open(last_email_file_name, \"r\")\n      last_email = last_email_file.readline().strip(\"\\n\")\n      last_email_file.close()\n      prompt += \" [%s]\" % last_email\n    except IOError, e:\n      pass\n  email = raw_input(prompt + \": \").strip()\n  if email:\n    try:\n      last_email_file = open(last_email_file_name, \"w\")\n      last_email_file.write(email)\n      last_email_file.close()\n    except IOError, e:\n      pass\n  else:\n    email = last_email\n  return email\n\n\ndef StatusUpdate(msg):\n  \"\"\"Print a status message to stdout.\n\n  If 'verbosity' is greater than 0, print the message.\n\n  Args:\n    msg: The string to print.\n  \"\"\"\n  if verbosity > 0:\n    print msg\n\n\ndef ErrorExit(msg):\n  \"\"\"Print an error message to stderr and exit.\"\"\"\n  print >>sys.stderr, msg\n  sys.exit(1)\n\n\nclass ClientLoginError(urllib2.HTTPError):\n  \"\"\"Raised to indicate there was an error authenticating with ClientLogin.\"\"\"\n\n  def __init__(self, url, code, msg, headers, args):\n    urllib2.HTTPError.__init__(self, url, code, msg, headers, None)\n    self.args = args\n    self._reason = args[\"Error\"]\n    self.info = args.get(\"Info\", None)\n\n  @property\n  def reason(self):\n    # reason is a property on python 2.7 but a member variable on <=2.6.\n    # self.args is modified so it cannot be used as-is so save the value in\n    # self._reason.\n    return self._reason\n\n\nclass AbstractRpcServer(object):\n  \"\"\"Provides a common interface for a simple RPC server.\"\"\"\n\n  def __init__(self, host, auth_function, host_override=None, extra_headers={},\n               save_cookies=False, account_type=AUTH_ACCOUNT_TYPE):\n    \"\"\"Creates a new AbstractRpcServer.\n\n    Args:\n      host: The host to send requests to.\n      auth_function: A function that takes no arguments and returns an\n        (email, password) tuple when called. Will be called if authentication\n        is required.\n      host_override: The host header to send to the server (defaults to host).\n      extra_headers: A dict of extra headers to append to every request.\n      save_cookies: If True, save the authentication cookies to local disk.\n        If False, use an in-memory cookiejar instead.  Subclasses must\n        implement this functionality.  Defaults to False.\n      account_type: Account type used for authentication. Defaults to\n        AUTH_ACCOUNT_TYPE.\n    \"\"\"\n    self.host = host\n    if (not self.host.startswith(\"http://\") and\n        not self.host.startswith(\"https://\")):\n      self.host = \"http://\" + self.host\n    self.host_override = host_override\n    self.auth_function = auth_function\n    self.authenticated = False\n    self.extra_headers = extra_headers\n    self.save_cookies = save_cookies\n    self.account_type = account_type\n    self.opener = self._GetOpener()\n    if self.host_override:\n      logging.info(\"Server: %s; Host: %s\", self.host, self.host_override)\n    else:\n      logging.info(\"Server: %s\", self.host)\n\n  def _GetOpener(self):\n    \"\"\"Returns an OpenerDirector for making HTTP requests.\n\n    Returns:\n      A urllib2.OpenerDirector object.\n    \"\"\"\n    raise NotImplementedError()\n\n  def _CreateRequest(self, url, data=None):\n    \"\"\"Creates a new urllib request.\"\"\"\n    logging.debug(\"Creating request for: '%s' with payload:\\n%s\", url, data)\n    req = urllib2.Request(url, data=data, headers={\"Accept\": \"text/plain\"})\n    if self.host_override:\n      req.add_header(\"Host\", self.host_override)\n    for key, value in self.extra_headers.iteritems():\n      req.add_header(key, value)\n    return req\n\n  def _GetAuthToken(self, email, password):\n    \"\"\"Uses ClientLogin to authenticate the user, returning an auth token.\n\n    Args:\n      email:    The user's email address\n      password: The user's password\n\n    Raises:\n      ClientLoginError: If there was an error authenticating with ClientLogin.\n      HTTPError: If there was some other form of HTTP error.\n\n    Returns:\n      The authentication token returned by ClientLogin.\n    \"\"\"\n    account_type = self.account_type\n    if self.host.endswith(\".google.com\"):\n      # Needed for use inside Google.\n      account_type = \"HOSTED\"\n    req = self._CreateRequest(\n        url=\"https://www.google.com/accounts/ClientLogin\",\n        data=urllib.urlencode({\n            \"Email\": email,\n            \"Passwd\": password,\n            \"service\": \"ah\",\n            \"source\": \"rietveld-codereview-upload\",\n            \"accountType\": account_type,\n        }),\n    )\n    try:\n      response = self.opener.open(req)\n      response_body = response.read()\n      response_dict = dict(x.split(\"=\")\n                           for x in response_body.split(\"\\n\") if x)\n      return response_dict[\"Auth\"]\n    except urllib2.HTTPError, e:\n      if e.code == 403:\n        body = e.read()\n        response_dict = dict(x.split(\"=\", 1) for x in body.split(\"\\n\") if x)\n        raise ClientLoginError(req.get_full_url(), e.code, e.msg,\n                               e.headers, response_dict)\n      else:\n        raise\n\n  def _GetAuthCookie(self, auth_token):\n    \"\"\"Fetches authentication cookies for an authentication token.\n\n    Args:\n      auth_token: The authentication token returned by ClientLogin.\n\n    Raises:\n      HTTPError: If there was an error fetching the authentication cookies.\n    \"\"\"\n    # This is a dummy value to allow us to identify when we're successful.\n    continue_location = \"http://localhost/\"\n    args = {\"continue\": continue_location, \"auth\": auth_token}\n    req = self._CreateRequest(\"%s/_ah/login?%s\" %\n                              (self.host, urllib.urlencode(args)))\n    try:\n      response = self.opener.open(req)\n    except urllib2.HTTPError, e:\n      response = e\n    if (response.code != 302 or\n        response.info()[\"location\"] != continue_location):\n      raise urllib2.HTTPError(req.get_full_url(), response.code, response.msg,\n                              response.headers, response.fp)\n    self.authenticated = True\n\n  def _Authenticate(self):\n    \"\"\"Authenticates the user.\n\n    The authentication process works as follows:\n     1) We get a username and password from the user\n     2) We use ClientLogin to obtain an AUTH token for the user\n        (see http://code.google.com/apis/accounts/AuthForInstalledApps.html).\n     3) We pass the auth token to /_ah/login on the server to obtain an\n        authentication cookie. If login was successful, it tries to redirect\n        us to the URL we provided.\n\n    If we attempt to access the upload API without first obtaining an\n    authentication cookie, it returns a 401 response (or a 302) and\n    directs us to authenticate ourselves with ClientLogin.\n    \"\"\"\n    for i in range(3):\n      credentials = self.auth_function()\n      try:\n        auth_token = self._GetAuthToken(credentials[0], credentials[1])\n      except ClientLoginError, e:\n        print >>sys.stderr, ''\n        if e.reason == \"BadAuthentication\":\n          if e.info == \"InvalidSecondFactor\":\n            print >>sys.stderr, (\n                \"Use an application-specific password instead \"\n                \"of your regular account password.\\n\"\n                \"See http://www.google.com/\"\n                \"support/accounts/bin/answer.py?answer=185833\")\n          else:\n            print >>sys.stderr, \"Invalid username or password.\"\n        elif e.reason == \"CaptchaRequired\":\n          print >>sys.stderr, (\n              \"Please go to\\n\"\n              \"https://www.google.com/accounts/DisplayUnlockCaptcha\\n\"\n              \"and verify you are a human.  Then try again.\\n\"\n              \"If you are using a Google Apps account the URL is:\\n\"\n              \"https://www.google.com/a/yourdomain.com/UnlockCaptcha\")\n        elif e.reason == \"NotVerified\":\n          print >>sys.stderr, \"Account not verified.\"\n        elif e.reason == \"TermsNotAgreed\":\n          print >>sys.stderr, \"User has not agreed to TOS.\"\n        elif e.reason == \"AccountDeleted\":\n          print >>sys.stderr, \"The user account has been deleted.\"\n        elif e.reason == \"AccountDisabled\":\n          print >>sys.stderr, \"The user account has been disabled.\"\n          break\n        elif e.reason == \"ServiceDisabled\":\n          print >>sys.stderr, (\"The user's access to the service has been \"\n                               \"disabled.\")\n        elif e.reason == \"ServiceUnavailable\":\n          print >>sys.stderr, \"The service is not available; try again later.\"\n        else:\n          # Unknown error.\n          raise\n        print >>sys.stderr, ''\n        continue\n      self._GetAuthCookie(auth_token)\n      return\n\n  def Send(self, request_path, payload=None,\n           content_type=\"application/octet-stream\",\n           timeout=None,\n           extra_headers=None,\n           **kwargs):\n    \"\"\"Sends an RPC and returns the response.\n\n    Args:\n      request_path: The path to send the request to, eg /api/appversion/create.\n      payload: The body of the request, or None to send an empty request.\n      content_type: The Content-Type header to use.\n      timeout: timeout in seconds; default None i.e. no timeout.\n        (Note: for large requests on OS X, the timeout doesn't work right.)\n      extra_headers: Dict containing additional HTTP headers that should be\n        included in the request (string header names mapped to their values),\n        or None to not include any additional headers.\n      kwargs: Any keyword arguments are converted into query string parameters.\n\n    Returns:\n      The response body, as a string.\n    \"\"\"\n    # TODO: Don't require authentication.  Let the server say\n    # whether it is necessary.\n    if not self.authenticated:\n      self._Authenticate()\n\n    old_timeout = socket.getdefaulttimeout()\n    socket.setdefaulttimeout(timeout)\n    try:\n      tries = 0\n      while True:\n        tries += 1\n        args = dict(kwargs)\n        url = \"%s%s\" % (self.host, request_path)\n        if args:\n          url += \"?\" + urllib.urlencode(args)\n        req = self._CreateRequest(url=url, data=payload)\n        req.add_header(\"Content-Type\", content_type)\n        if extra_headers:\n          for header, value in extra_headers.items():\n            req.add_header(header, value)\n        try:\n          f = self.opener.open(req)\n          response = f.read()\n          f.close()\n          return response\n        except urllib2.HTTPError, e:\n          if tries > 3:\n            raise\n          elif e.code == 401 or e.code == 302:\n            self._Authenticate()\n          elif e.code == 301:\n            # Handle permanent redirect manually.\n            url = e.info()[\"location\"]\n            url_loc = urlparse.urlparse(url)\n            self.host = '%s://%s' % (url_loc[0], url_loc[1])\n          elif e.code >= 500:\n            ErrorExit(e.read())\n          else:\n            raise\n    finally:\n      socket.setdefaulttimeout(old_timeout)\n\n\nclass HttpRpcServer(AbstractRpcServer):\n  \"\"\"Provides a simplified RPC-style interface for HTTP requests.\"\"\"\n\n  def _Authenticate(self):\n    \"\"\"Save the cookie jar after authentication.\"\"\"\n    super(HttpRpcServer, self)._Authenticate()\n    if self.save_cookies:\n      StatusUpdate(\"Saving authentication cookies to %s\" % self.cookie_file)\n      self.cookie_jar.save()\n\n  def _GetOpener(self):\n    \"\"\"Returns an OpenerDirector that supports cookies and ignores redirects.\n\n    Returns:\n      A urllib2.OpenerDirector object.\n    \"\"\"\n    opener = urllib2.OpenerDirector()\n    opener.add_handler(urllib2.ProxyHandler())\n    opener.add_handler(urllib2.UnknownHandler())\n    opener.add_handler(urllib2.HTTPHandler())\n    opener.add_handler(urllib2.HTTPDefaultErrorHandler())\n    opener.add_handler(urllib2.HTTPSHandler())\n    opener.add_handler(urllib2.HTTPErrorProcessor())\n    if self.save_cookies:\n      self.cookie_file = os.path.expanduser(\"~/.codereview_upload_cookies\")\n      self.cookie_jar = cookielib.MozillaCookieJar(self.cookie_file)\n      if os.path.exists(self.cookie_file):\n        try:\n          self.cookie_jar.load()\n          self.authenticated = True\n          StatusUpdate(\"Loaded authentication cookies from %s\" %\n                       self.cookie_file)\n        except (cookielib.LoadError, IOError):\n          # Failed to load cookies - just ignore them.\n          pass\n      else:\n        # Create an empty cookie file with mode 600\n        fd = os.open(self.cookie_file, os.O_CREAT, 0600)\n        os.close(fd)\n      # Always chmod the cookie file\n      os.chmod(self.cookie_file, 0600)\n    else:\n      # Don't save cookies across runs of update.py.\n      self.cookie_jar = cookielib.CookieJar()\n    opener.add_handler(urllib2.HTTPCookieProcessor(self.cookie_jar))\n    return opener\n\n\nclass CondensedHelpFormatter(optparse.IndentedHelpFormatter):\n   \"\"\"Frees more horizontal space by removing indentation from group\n      options and collapsing arguments between short and long, e.g.\n      '-o ARG, --opt=ARG' to -o --opt ARG\"\"\"\n\n   def format_heading(self, heading):\n     return \"%s:\\n\" % heading\n\n   def format_option(self, option):\n     self.dedent()\n     res = optparse.HelpFormatter.format_option(self, option)\n     self.indent()\n     return res\n\n   def format_option_strings(self, option):\n     self.set_long_opt_delimiter(\" \")\n     optstr = optparse.HelpFormatter.format_option_strings(self, option)\n     optlist = optstr.split(\", \")\n     if len(optlist) > 1:\n       if option.takes_value():\n         # strip METAVAR from all but the last option\n         optlist = [x.split()[0] for x in optlist[:-1]] + optlist[-1:]\n       optstr = \" \".join(optlist)\n     return optstr\n\n\nparser = optparse.OptionParser(\n    usage=\"%prog [options] [-- diff_options] [path...]\",\n    add_help_option=False,\n    formatter=CondensedHelpFormatter()\n)\nparser.add_option(\"-h\", \"--help\", action=\"store_true\",\n                  help=\"Show this help message and exit.\")\nparser.add_option(\"-y\", \"--assume_yes\", action=\"store_true\",\n                  dest=\"assume_yes\", default=False,\n                  help=\"Assume that the answer to yes/no questions is 'yes'.\")\n# Logging\ngroup = parser.add_option_group(\"Logging options\")\ngroup.add_option(\"-q\", \"--quiet\", action=\"store_const\", const=0,\n                 dest=\"verbose\", help=\"Print errors only.\")\ngroup.add_option(\"-v\", \"--verbose\", action=\"store_const\", const=2,\n                 dest=\"verbose\", default=1,\n                 help=\"Print info level logs.\")\ngroup.add_option(\"--noisy\", action=\"store_const\", const=3,\n                 dest=\"verbose\", help=\"Print all logs.\")\ngroup.add_option(\"--print_diffs\", dest=\"print_diffs\", action=\"store_true\",\n                 help=\"Print full diffs.\")\n# Review server\ngroup = parser.add_option_group(\"Review server options\")\ngroup.add_option(\"-s\", \"--server\", action=\"store\", dest=\"server\",\n                 default=DEFAULT_REVIEW_SERVER,\n                 metavar=\"SERVER\",\n                 help=(\"The server to upload to. The format is host[:port]. \"\n                       \"Defaults to '%default'.\"))\ngroup.add_option(\"-e\", \"--email\", action=\"store\", dest=\"email\",\n                 metavar=\"EMAIL\", default=None,\n                 help=\"The username to use. Will prompt if omitted.\")\ngroup.add_option(\"-H\", \"--host\", action=\"store\", dest=\"host\",\n                 metavar=\"HOST\", default=None,\n                 help=\"Overrides the Host header sent with all RPCs.\")\ngroup.add_option(\"--no_cookies\", action=\"store_false\",\n                 dest=\"save_cookies\", default=True,\n                 help=\"Do not save authentication cookies to local disk.\")\ngroup.add_option(\"--account_type\", action=\"store\", dest=\"account_type\",\n                 metavar=\"TYPE\", default=AUTH_ACCOUNT_TYPE,\n                 choices=[\"GOOGLE\", \"HOSTED\"],\n                 help=(\"Override the default account type \"\n                       \"(defaults to '%default', \"\n                       \"valid choices are 'GOOGLE' and 'HOSTED').\"))\n# Issue\ngroup = parser.add_option_group(\"Issue options\")\ngroup.add_option(\"-t\", \"--title\", action=\"store\", dest=\"title\",\n                 help=\"New issue subject or new patch set title\")\ngroup.add_option(\"-m\", \"--message\", action=\"store\", dest=\"message\",\n                 default=None,\n                 help=\"New issue description or new patch set message\")\ngroup.add_option(\"-F\", \"--file\", action=\"store\", dest=\"file\",\n                 default=None, help=\"Read the message above from file.\")\ngroup.add_option(\"-r\", \"--reviewers\", action=\"store\", dest=\"reviewers\",\n                 metavar=\"REVIEWERS\",\n                 default=\"keo@eecs.berkeley.edu,pwendell@gmail.com\",\n                 help=\"Add reviewers (comma separated email addresses).\")\ngroup.add_option(\"--cc\", action=\"store\", dest=\"cc\",\n                 metavar=\"CC\", default=None,\n                 help=\"Add CC (comma separated email addresses).\")\ngroup.add_option(\"--private\", action=\"store_true\", dest=\"private\",\n                 default=True,\n                 help=\"Make the issue restricted to reviewers and those CCed\")\n# Upload options\ngroup = parser.add_option_group(\"Patch options\")\ngroup.add_option(\"-i\", \"--issue\", type=\"int\", action=\"store\",\n                 metavar=\"ISSUE\", default=None,\n                 help=\"Issue number to which to add. Defaults to new issue.\")\ngroup.add_option(\"--base_url\", action=\"store\", dest=\"base_url\", default=None,\n                 help=\"Base URL path for files (listed as \\\"Base URL\\\" when \"\n                 \"viewing issue).  If omitted, will be guessed automatically \"\n                 \"for SVN repos and left blank for others.\")\ngroup.add_option(\"--download_base\", action=\"store_true\",\n                 dest=\"download_base\", default=False,\n                 help=\"Base files will be downloaded by the server \"\n                 \"(side-by-side diffs may not work on files with CRs).\")\ngroup.add_option(\"--rev\", action=\"store\", dest=\"revision\",\n                 metavar=\"REV\", default=None,\n                 help=\"Base revision/branch/tree to diff against. Use \"\n                      \"rev1:rev2 range to review already committed changeset.\")\ngroup.add_option(\"--send_mail\", action=\"store_true\",\n                 dest=\"send_mail\", default=True,\n                 help=\"Send notification email to reviewers.\")\ngroup.add_option(\"-p\", \"--send_patch\", action=\"store_true\",\n                 dest=\"send_patch\", default=False,\n                 help=\"Same as --send_mail, but include diff as an \"\n                      \"attachment, and prepend email subject with 'PATCH:'.\")\ngroup.add_option(\"--vcs\", action=\"store\", dest=\"vcs\",\n                 metavar=\"VCS\", default=None,\n                 help=(\"Version control system (optional, usually upload.py \"\n                       \"already guesses the right VCS).\"))\ngroup.add_option(\"--emulate_svn_auto_props\", action=\"store_true\",\n                 dest=\"emulate_svn_auto_props\", default=False,\n                 help=(\"Emulate Subversion's auto properties feature.\"))\n# Git-specific\ngroup = parser.add_option_group(\"Git-specific options\")\ngroup.add_option(\"--git_similarity\", action=\"store\", dest=\"git_similarity\",\n                 metavar=\"SIM\", type=\"int\", default=50,\n                 help=(\"Set the minimum similarity index for detecting renames \"\n                       \"and copies. See `git diff -C`. (default 50).\"))\ngroup.add_option(\"--git_no_find_copies\", action=\"store_false\", default=True,\n                 dest=\"git_find_copies\",\n                 help=(\"Prevents git from looking for copies (default off).\"))\n# Perforce-specific\ngroup = parser.add_option_group(\"Perforce-specific options \"\n                                \"(overrides P4 environment variables)\")\ngroup.add_option(\"--p4_port\", action=\"store\", dest=\"p4_port\",\n                 metavar=\"P4_PORT\", default=None,\n                 help=(\"Perforce server and port (optional)\"))\ngroup.add_option(\"--p4_changelist\", action=\"store\", dest=\"p4_changelist\",\n                 metavar=\"P4_CHANGELIST\", default=None,\n                 help=(\"Perforce changelist id\"))\ngroup.add_option(\"--p4_client\", action=\"store\", dest=\"p4_client\",\n                 metavar=\"P4_CLIENT\", default=None,\n                 help=(\"Perforce client/workspace\"))\ngroup.add_option(\"--p4_user\", action=\"store\", dest=\"p4_user\",\n                 metavar=\"P4_USER\", default=None,\n                 help=(\"Perforce user\"))\n\n\nclass KeyringCreds(object):\n  def __init__(self, server, host, email):\n    self.server = server\n    self.host = host\n    self.email = email\n    self.accounts_seen = set()\n\n  def GetUserCredentials(self):\n    \"\"\"Prompts the user for a username and password.\n\n    Only use keyring on the initial call. If the keyring contains the wrong\n    password, we want to give the user a chance to enter another one.\n    \"\"\"\n    # Create a local alias to the email variable to avoid Python's crazy\n    # scoping rules.\n    global keyring\n    email = self.email\n    if email is None:\n      email = GetEmail(\"Email (login for uploading to %s)\" % self.server)\n    password = None\n    if keyring and not email in self.accounts_seen:\n      try:\n        password = keyring.get_password(self.host, email)\n      except:\n        # Sadly, we have to trap all errors here as\n        # gnomekeyring.IOError inherits from object. :/\n        print \"Failed to get password from keyring\"\n        keyring = None\n    if password is not None:\n      print \"Using password from system keyring.\"\n      self.accounts_seen.add(email)\n    else:\n      password = getpass.getpass(\"Password for %s: \" % email)\n      if keyring:\n        answer = raw_input(\"Store password in system keyring?(y/N) \").strip()\n        if answer == \"y\":\n          keyring.set_password(self.host, email, password)\n          self.accounts_seen.add(email)\n    return (email, password)\n\n\ndef GetRpcServer(server, email=None, host_override=None, save_cookies=True,\n                 account_type=AUTH_ACCOUNT_TYPE):\n  \"\"\"Returns an instance of an AbstractRpcServer.\n\n  Args:\n    server: String containing the review server URL.\n    email: String containing user's email address.\n    host_override: If not None, string containing an alternate hostname to use\n      in the host header.\n    save_cookies: Whether authentication cookies should be saved to disk.\n    account_type: Account type for authentication, either 'GOOGLE'\n      or 'HOSTED'. Defaults to AUTH_ACCOUNT_TYPE.\n\n  Returns:\n    A new HttpRpcServer, on which RPC calls can be made.\n  \"\"\"\n\n  # If this is the dev_appserver, use fake authentication.\n  host = (host_override or server).lower()\n  if re.match(r'(http://)?localhost([:/]|$)', host):\n    if email is None:\n      email = \"test@example.com\"\n      logging.info(\"Using debug user %s.  Override with --email\" % email)\n    server = HttpRpcServer(\n        server,\n        lambda: (email, \"password\"),\n        host_override=host_override,\n        extra_headers={\"Cookie\":\n                       'dev_appserver_login=\"%s:False\"' % email},\n        save_cookies=save_cookies,\n        account_type=account_type)\n    # Don't try to talk to ClientLogin.\n    server.authenticated = True\n    return server\n\n  return HttpRpcServer(server,\n                       KeyringCreds(server, host, email).GetUserCredentials,\n                       host_override=host_override,\n                       save_cookies=save_cookies,\n                       account_type=account_type)\n\n\ndef EncodeMultipartFormData(fields, files):\n  \"\"\"Encode form fields for multipart/form-data.\n\n  Args:\n    fields: A sequence of (name, value) elements for regular form fields.\n    files: A sequence of (name, filename, value) elements for data to be\n           uploaded as files.\n  Returns:\n    (content_type, body) ready for httplib.HTTP instance.\n\n  Source:\n    http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/146306\n  \"\"\"\n  BOUNDARY = '-M-A-G-I-C---B-O-U-N-D-A-R-Y-'\n  CRLF = '\\r\\n'\n  lines = []\n  for (key, value) in fields:\n    lines.append('--' + BOUNDARY)\n    lines.append('Content-Disposition: form-data; name=\"%s\"' % key)\n    lines.append('')\n    if isinstance(value, unicode):\n      value = value.encode('utf-8')\n    lines.append(value)\n  for (key, filename, value) in files:\n    lines.append('--' + BOUNDARY)\n    lines.append('Content-Disposition: form-data; name=\"%s\"; filename=\"%s\"' %\n             (key, filename))\n    lines.append('Content-Type: %s' % GetContentType(filename))\n    lines.append('')\n    if isinstance(value, unicode):\n      value = value.encode('utf-8')\n    lines.append(value)\n  lines.append('--' + BOUNDARY + '--')\n  lines.append('')\n  body = CRLF.join(lines)\n  content_type = 'multipart/form-data; boundary=%s' % BOUNDARY\n  return content_type, body\n\n\ndef GetContentType(filename):\n  \"\"\"Helper to guess the content-type from the filename.\"\"\"\n  return mimetypes.guess_type(filename)[0] or 'application/octet-stream'\n\n\n# Use a shell for subcommands on Windows to get a PATH search.\nuse_shell = sys.platform.startswith(\"win\")\n\ndef RunShellWithReturnCodeAndStderr(command, print_output=False,\n                           universal_newlines=True,\n                           env=os.environ):\n  \"\"\"Executes a command and returns the output from stdout, stderr and the return code.\n\n  Args:\n    command: Command to execute.\n    print_output: If True, the output is printed to stdout.\n                  If False, both stdout and stderr are ignored.\n    universal_newlines: Use universal_newlines flag (default: True).\n\n  Returns:\n    Tuple (stdout, stderr, return code)\n  \"\"\"\n  logging.info(\"Running %s\", command)\n  env = env.copy()\n  env['LC_MESSAGES'] = 'C'\n  p = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE,\n                       shell=use_shell, universal_newlines=universal_newlines,\n                       env=env)\n  if print_output:\n    output_array = []\n    while True:\n      line = p.stdout.readline()\n      if not line:\n        break\n      print line.strip(\"\\n\")\n      output_array.append(line)\n    output = \"\".join(output_array)\n  else:\n    output = p.stdout.read()\n  p.wait()\n  errout = p.stderr.read()\n  if print_output and errout:\n    print >>sys.stderr, errout\n  p.stdout.close()\n  p.stderr.close()\n  return output, errout, p.returncode\n\ndef RunShellWithReturnCode(command, print_output=False,\n                           universal_newlines=True,\n                           env=os.environ):\n  \"\"\"Executes a command and returns the output from stdout and the return code.\"\"\"\n  out, err, retcode = RunShellWithReturnCodeAndStderr(command, print_output,\n                           universal_newlines, env)\n  return out, retcode\n\ndef RunShell(command, silent_ok=False, universal_newlines=True,\n             print_output=False, env=os.environ):\n  data, retcode = RunShellWithReturnCode(command, print_output,\n                                         universal_newlines, env)\n  if retcode:\n    ErrorExit(\"Got error status from %s:\\n%s\" % (command, data))\n  if not silent_ok and not data:\n    ErrorExit(\"No output from %s\" % command)\n  return data\n\n\nclass VersionControlSystem(object):\n  \"\"\"Abstract base class providing an interface to the VCS.\"\"\"\n\n  def __init__(self, options):\n    \"\"\"Constructor.\n\n    Args:\n      options: Command line options.\n    \"\"\"\n    self.options = options\n\n  def GetGUID(self):\n    \"\"\"Return string to distinguish the repository from others, for example to\n    query all opened review issues for it\"\"\"\n    raise NotImplementedError(\n        \"abstract method -- subclass %s must override\" % self.__class__)\n\n  def PostProcessDiff(self, diff):\n    \"\"\"Return the diff with any special post processing this VCS needs, e.g.\n    to include an svn-style \"Index:\".\"\"\"\n    return diff\n\n  def GenerateDiff(self, args):\n    \"\"\"Return the current diff as a string.\n\n    Args:\n      args: Extra arguments to pass to the diff command.\n    \"\"\"\n    raise NotImplementedError(\n        \"abstract method -- subclass %s must override\" % self.__class__)\n\n  def GetUnknownFiles(self):\n    \"\"\"Return a list of files unknown to the VCS.\"\"\"\n    raise NotImplementedError(\n        \"abstract method -- subclass %s must override\" % self.__class__)\n\n  def CheckForUnknownFiles(self):\n    \"\"\"Show an \"are you sure?\" prompt if there are unknown files.\"\"\"\n    unknown_files = self.GetUnknownFiles()\n    if unknown_files:\n      print \"The following files are not added to version control:\"\n      for line in unknown_files:\n        print line\n      prompt = \"Are you sure to continue?(y/N) \"\n      answer = raw_input(prompt).strip()\n      if answer != \"y\":\n        ErrorExit(\"User aborted\")\n\n  def GetBaseFile(self, filename):\n    \"\"\"Get the content of the upstream version of a file.\n\n    Returns:\n      A tuple (base_content, new_content, is_binary, status)\n        base_content: The contents of the base file.\n        new_content: For text files, this is empty.  For binary files, this is\n          the contents of the new file, since the diff output won't contain\n          information to reconstruct the current file.\n        is_binary: True iff the file is binary.\n        status: The status of the file.\n    \"\"\"\n\n    raise NotImplementedError(\n        \"abstract method -- subclass %s must override\" % self.__class__)\n\n\n  def GetBaseFiles(self, diff):\n    \"\"\"Helper that calls GetBase file for each file in the patch.\n\n    Returns:\n      A dictionary that maps from filename to GetBaseFile's tuple.  Filenames\n      are retrieved based on lines that start with \"Index:\" or\n      \"Property changes on:\".\n    \"\"\"\n    files = {}\n    for line in diff.splitlines(True):\n      if line.startswith('Index:') or line.startswith('Property changes on:'):\n        unused, filename = line.split(':', 1)\n        # On Windows if a file has property changes its filename uses '\\'\n        # instead of '/'.\n        filename = filename.strip().replace('\\\\', '/')\n        files[filename] = self.GetBaseFile(filename)\n    return files\n\n\n  def UploadBaseFiles(self, issue, rpc_server, patch_list, patchset, options,\n                      files):\n    \"\"\"Uploads the base files (and if necessary, the current ones as well).\"\"\"\n\n    def UploadFile(filename, file_id, content, is_binary, status, is_base):\n      \"\"\"Uploads a file to the server.\"\"\"\n      file_too_large = False\n      if is_base:\n        type = \"base\"\n      else:\n        type = \"current\"\n      if len(content) > MAX_UPLOAD_SIZE:\n        print (\"Not uploading the %s file for %s because it's too large.\" %\n               (type, filename))\n        file_too_large = True\n        content = \"\"\n      checksum = md5(content).hexdigest()\n      if options.verbose > 0 and not file_too_large:\n        print \"Uploading %s file for %s\" % (type, filename)\n      url = \"/%d/upload_content/%d/%d\" % (int(issue), int(patchset), file_id)\n      form_fields = [(\"filename\", filename),\n                     (\"status\", status),\n                     (\"checksum\", checksum),\n                     (\"is_binary\", str(is_binary)),\n                     (\"is_current\", str(not is_base)),\n                    ]\n      if file_too_large:\n        form_fields.append((\"file_too_large\", \"1\"))\n      if options.email:\n        form_fields.append((\"user\", options.email))\n      ctype, body = EncodeMultipartFormData(form_fields,\n                                            [(\"data\", filename, content)])\n      response_body = rpc_server.Send(url, body,\n                                      content_type=ctype)\n      if not response_body.startswith(\"OK\"):\n        StatusUpdate(\"  --> %s\" % response_body)\n        sys.exit(1)\n\n    patches = dict()\n    [patches.setdefault(v, k) for k, v in patch_list]\n    for filename in patches.keys():\n      base_content, new_content, is_binary, status = files[filename]\n      file_id_str = patches.get(filename)\n      if file_id_str.find(\"nobase\") != -1:\n        base_content = None\n        file_id_str = file_id_str[file_id_str.rfind(\"_\") + 1:]\n      file_id = int(file_id_str)\n      if base_content != None:\n        UploadFile(filename, file_id, base_content, is_binary, status, True)\n      if new_content != None:\n        UploadFile(filename, file_id, new_content, is_binary, status, False)\n\n  def IsImage(self, filename):\n    \"\"\"Returns true if the filename has an image extension.\"\"\"\n    mimetype =  mimetypes.guess_type(filename)[0]\n    if not mimetype:\n      return False\n    return mimetype.startswith(\"image/\")\n\n  def IsBinaryData(self, data):\n    \"\"\"Returns true if data contains a null byte.\"\"\"\n    # Derived from how Mercurial's heuristic, see\n    # http://selenic.com/hg/file/848a6658069e/mercurial/util.py#l229\n    return bool(data and \"\\0\" in data)\n\n\nclass SubversionVCS(VersionControlSystem):\n  \"\"\"Implementation of the VersionControlSystem interface for Subversion.\"\"\"\n\n  def __init__(self, options):\n    super(SubversionVCS, self).__init__(options)\n    if self.options.revision:\n      match = re.match(r\"(\\d+)(:(\\d+))?\", self.options.revision)\n      if not match:\n        ErrorExit(\"Invalid Subversion revision %s.\" % self.options.revision)\n      self.rev_start = match.group(1)\n      self.rev_end = match.group(3)\n    else:\n      self.rev_start = self.rev_end = None\n    # Cache output from \"svn list -r REVNO dirname\".\n    # Keys: dirname, Values: 2-tuple (ouput for start rev and end rev).\n    self.svnls_cache = {}\n    # Base URL is required to fetch files deleted in an older revision.\n    # Result is cached to not guess it over and over again in GetBaseFile().\n    required = self.options.download_base or self.options.revision is not None\n    self.svn_base = self._GuessBase(required)\n\n  def GetGUID(self):\n    return self._GetInfo(\"Repository UUID\")\n\n  def GuessBase(self, required):\n    \"\"\"Wrapper for _GuessBase.\"\"\"\n    return self.svn_base\n\n  def _GuessBase(self, required):\n    \"\"\"Returns base URL for current diff.\n\n    Args:\n      required: If true, exits if the url can't be guessed, otherwise None is\n        returned.\n    \"\"\"\n    url = self._GetInfo(\"URL\")\n    if url:\n        scheme, netloc, path, params, query, fragment = urlparse.urlparse(url)\n        guess = \"\"\n        # TODO(anatoli) - repository specific hacks should be handled by server\n        if netloc == \"svn.python.org\" and scheme == \"svn+ssh\":\n          path = \"projects\" + path\n          scheme = \"http\"\n          guess = \"Python \"\n        elif netloc.endswith(\".googlecode.com\"):\n          scheme = \"http\"\n          guess = \"Google Code \"\n        path = path + \"/\"\n        base = urlparse.urlunparse((scheme, netloc, path, params,\n                                    query, fragment))\n        logging.info(\"Guessed %sbase = %s\", guess, base)\n        return base\n    if required:\n      ErrorExit(\"Can't find URL in output from svn info\")\n    return None\n\n  def _GetInfo(self, key):\n    \"\"\"Parses 'svn info' for current dir. Returns value for key or None\"\"\"\n    for line in RunShell([\"svn\", \"info\"]).splitlines():\n      if line.startswith(key + \": \"):\n        return line.split(\":\", 1)[1].strip()\n\n  def _EscapeFilename(self, filename):\n    \"\"\"Escapes filename for SVN commands.\"\"\"\n    if \"@\" in filename and not filename.endswith(\"@\"):\n      filename = \"%s@\" % filename\n    return filename\n\n  def GenerateDiff(self, args):\n    cmd = [\"svn\", \"diff\"]\n    if self.options.revision:\n      cmd += [\"-r\", self.options.revision]\n    cmd.extend(args)\n    data = RunShell(cmd)\n    count = 0\n    for line in data.splitlines():\n      if line.startswith(\"Index:\") or line.startswith(\"Property changes on:\"):\n        count += 1\n        logging.info(line)\n    if not count:\n      ErrorExit(\"No valid patches found in output from svn diff\")\n    return data\n\n  def _CollapseKeywords(self, content, keyword_str):\n    \"\"\"Collapses SVN keywords.\"\"\"\n    # svn cat translates keywords but svn diff doesn't. As a result of this\n    # behavior patching.PatchChunks() fails with a chunk mismatch error.\n    # This part was originally written by the Review Board development team\n    # who had the same problem (http://reviews.review-board.org/r/276/).\n    # Mapping of keywords to known aliases\n    svn_keywords = {\n      # Standard keywords\n      'Date':                ['Date', 'LastChangedDate'],\n      'Revision':            ['Revision', 'LastChangedRevision', 'Rev'],\n      'Author':              ['Author', 'LastChangedBy'],\n      'HeadURL':             ['HeadURL', 'URL'],\n      'Id':                  ['Id'],\n\n      # Aliases\n      'LastChangedDate':     ['LastChangedDate', 'Date'],\n      'LastChangedRevision': ['LastChangedRevision', 'Rev', 'Revision'],\n      'LastChangedBy':       ['LastChangedBy', 'Author'],\n      'URL':                 ['URL', 'HeadURL'],\n    }\n\n    def repl(m):\n       if m.group(2):\n         return \"$%s::%s$\" % (m.group(1), \" \" * len(m.group(3)))\n       return \"$%s$\" % m.group(1)\n    keywords = [keyword\n                for name in keyword_str.split(\" \")\n                for keyword in svn_keywords.get(name, [])]\n    return re.sub(r\"\\$(%s):(:?)([^\\$]+)\\$\" % '|'.join(keywords), repl, content)\n\n  def GetUnknownFiles(self):\n    status = RunShell([\"svn\", \"status\", \"--ignore-externals\"], silent_ok=True)\n    unknown_files = []\n    for line in status.split(\"\\n\"):\n      if line and line[0] == \"?\":\n        unknown_files.append(line)\n    return unknown_files\n\n  def ReadFile(self, filename):\n    \"\"\"Returns the contents of a file.\"\"\"\n    file = open(filename, 'rb')\n    result = \"\"\n    try:\n      result = file.read()\n    finally:\n      file.close()\n    return result\n\n  def GetStatus(self, filename):\n    \"\"\"Returns the status of a file.\"\"\"\n    if not self.options.revision:\n      status = RunShell([\"svn\", \"status\", \"--ignore-externals\",\n                         self._EscapeFilename(filename)])\n      if not status:\n        ErrorExit(\"svn status returned no output for %s\" % filename)\n      status_lines = status.splitlines()\n      # If file is in a cl, the output will begin with\n      # \"\\n--- Changelist 'cl_name':\\n\".  See\n      # http://svn.collab.net/repos/svn/trunk/notes/changelist-design.txt\n      if (len(status_lines) == 3 and\n          not status_lines[0] and\n          status_lines[1].startswith(\"--- Changelist\")):\n        status = status_lines[2]\n      else:\n        status = status_lines[0]\n    # If we have a revision to diff against we need to run \"svn list\"\n    # for the old and the new revision and compare the results to get\n    # the correct status for a file.\n    else:\n      dirname, relfilename = os.path.split(filename)\n      if dirname not in self.svnls_cache:\n        cmd = [\"svn\", \"list\", \"-r\", self.rev_start,\n               self._EscapeFilename(dirname) or \".\"]\n        out, err, returncode = RunShellWithReturnCodeAndStderr(cmd)\n        if returncode:\n          # Directory might not yet exist at start revison\n          # svn: Unable to find repository location for 'abc' in revision nnn\n          if re.match('^svn: Unable to find repository location for .+ in revision \\d+', err):\n            old_files = ()\n          else:\n            ErrorExit(\"Failed to get status for %s:\\n%s\" % (filename, err))\n        else:\n          old_files = out.splitlines()\n        args = [\"svn\", \"list\"]\n        if self.rev_end:\n          args += [\"-r\", self.rev_end]\n        cmd = args + [self._EscapeFilename(dirname) or \".\"]\n        out, returncode = RunShellWithReturnCode(cmd)\n        if returncode:\n          ErrorExit(\"Failed to run command %s\" % cmd)\n        self.svnls_cache[dirname] = (old_files, out.splitlines())\n      old_files, new_files = self.svnls_cache[dirname]\n      if relfilename in old_files and relfilename not in new_files:\n        status = \"D   \"\n      elif relfilename in old_files and relfilename in new_files:\n        status = \"M   \"\n      else:\n        status = \"A   \"\n    return status\n\n  def GetBaseFile(self, filename):\n    status = self.GetStatus(filename)\n    base_content = None\n    new_content = None\n\n    # If a file is copied its status will be \"A  +\", which signifies\n    # \"addition-with-history\".  See \"svn st\" for more information.  We need to\n    # upload the original file or else diff parsing will fail if the file was\n    # edited.\n    if status[0] == \"A\" and status[3] != \"+\":\n      # We'll need to upload the new content if we're adding a binary file\n      # since diff's output won't contain it.\n      mimetype = RunShell([\"svn\", \"propget\", \"svn:mime-type\",\n                           self._EscapeFilename(filename)], silent_ok=True)\n      base_content = \"\"\n      is_binary = bool(mimetype) and not mimetype.startswith(\"text/\")\n      if is_binary:\n        new_content = self.ReadFile(filename)\n    elif (status[0] in (\"M\", \"D\", \"R\") or\n          (status[0] == \"A\" and status[3] == \"+\") or  # Copied file.\n          (status[0] == \" \" and status[1] == \"M\")):  # Property change.\n      args = []\n      if self.options.revision:\n        # filename must not be escaped. We already add an ampersand here.\n        url = \"%s/%s@%s\" % (self.svn_base, filename, self.rev_start)\n      else:\n        # Don't change filename, it's needed later.\n        url = filename\n        args += [\"-r\", \"BASE\"]\n      cmd = [\"svn\"] + args + [\"propget\", \"svn:mime-type\", url]\n      mimetype, returncode = RunShellWithReturnCode(cmd)\n      if returncode:\n        # File does not exist in the requested revision.\n        # Reset mimetype, it contains an error message.\n        mimetype = \"\"\n      else:\n        mimetype = mimetype.strip()\n      get_base = False\n      # this test for binary is exactly the test prescribed by the\n      # official SVN docs at\n      # http://subversion.apache.org/faq.html#binary-files\n      is_binary = (bool(mimetype) and\n        not mimetype.startswith(\"text/\") and\n        mimetype not in (\"image/x-xbitmap\", \"image/x-xpixmap\"))\n      if status[0] == \" \":\n        # Empty base content just to force an upload.\n        base_content = \"\"\n      elif is_binary:\n        get_base = True\n        if status[0] == \"M\":\n          if not self.rev_end:\n            new_content = self.ReadFile(filename)\n          else:\n            url = \"%s/%s@%s\" % (self.svn_base, filename, self.rev_end)\n            new_content = RunShell([\"svn\", \"cat\", url],\n                                   universal_newlines=True, silent_ok=True)\n      else:\n        get_base = True\n\n      if get_base:\n        if is_binary:\n          universal_newlines = False\n        else:\n          universal_newlines = True\n        if self.rev_start:\n          # \"svn cat -r REV delete_file.txt\" doesn't work. cat requires\n          # the full URL with \"@REV\" appended instead of using \"-r\" option.\n          url = \"%s/%s@%s\" % (self.svn_base, filename, self.rev_start)\n          base_content = RunShell([\"svn\", \"cat\", url],\n                                  universal_newlines=universal_newlines,\n                                  silent_ok=True)\n        else:\n          base_content, ret_code = RunShellWithReturnCode(\n            [\"svn\", \"cat\", self._EscapeFilename(filename)],\n            universal_newlines=universal_newlines)\n          if ret_code and status[0] == \"R\":\n            # It's a replaced file without local history (see issue208).\n            # The base file needs to be fetched from the server.\n            url = \"%s/%s\" % (self.svn_base, filename)\n            base_content = RunShell([\"svn\", \"cat\", url],\n                                    universal_newlines=universal_newlines,\n                                    silent_ok=True)\n          elif ret_code:\n            ErrorExit(\"Got error status from 'svn cat %s'\" % filename)\n        if not is_binary:\n          args = []\n          if self.rev_start:\n            url = \"%s/%s@%s\" % (self.svn_base, filename, self.rev_start)\n          else:\n            url = filename\n            args += [\"-r\", \"BASE\"]\n          cmd = [\"svn\"] + args + [\"propget\", \"svn:keywords\", url]\n          keywords, returncode = RunShellWithReturnCode(cmd)\n          if keywords and not returncode:\n            base_content = self._CollapseKeywords(base_content, keywords)\n    else:\n      StatusUpdate(\"svn status returned unexpected output: %s\" % status)\n      sys.exit(1)\n    return base_content, new_content, is_binary, status[0:5]\n\n\nclass GitVCS(VersionControlSystem):\n  \"\"\"Implementation of the VersionControlSystem interface for Git.\"\"\"\n\n  def __init__(self, options):\n    super(GitVCS, self).__init__(options)\n    # Map of filename -> (hash before, hash after) of base file.\n    # Hashes for \"no such file\" are represented as None.\n    self.hashes = {}\n    # Map of new filename -> old filename for renames.\n    self.renames = {}\n\n  def GetGUID(self):\n    revlist = RunShell(\"git rev-list --parents HEAD\".split()).splitlines()\n    # M-A: Return the 1st root hash, there could be multiple when a\n    # subtree is merged. In that case, more analysis would need to\n    # be done to figure out which HEAD is the 'most representative'.\n    for r in revlist:\n      if ' ' not in r:\n        return r\n\n  def PostProcessDiff(self, gitdiff):\n    \"\"\"Converts the diff output to include an svn-style \"Index:\" line as well\n    as record the hashes of the files, so we can upload them along with our\n    diff.\"\"\"\n    # Special used by git to indicate \"no such content\".\n    NULL_HASH = \"0\"*40\n\n    def IsFileNew(filename):\n      return filename in self.hashes and self.hashes[filename][0] is None\n\n    def AddSubversionPropertyChange(filename):\n      \"\"\"Add svn's property change information into the patch if given file is\n      new file.\n\n      We use Subversion's auto-props setting to retrieve its property.\n      See http://svnbook.red-bean.com/en/1.1/ch07.html#svn-ch-7-sect-1.3.2 for\n      Subversion's [auto-props] setting.\n      \"\"\"\n      if self.options.emulate_svn_auto_props and IsFileNew(filename):\n        svnprops = GetSubversionPropertyChanges(filename)\n        if svnprops:\n          svndiff.append(\"\\n\" + svnprops + \"\\n\")\n\n    svndiff = []\n    filecount = 0\n    filename = None\n    for line in gitdiff.splitlines():\n      match = re.match(r\"diff --git a/(.*) b/(.*)$\", line)\n      if match:\n        # Add auto property here for previously seen file.\n        if filename is not None:\n          AddSubversionPropertyChange(filename)\n        filecount += 1\n        # Intentionally use the \"after\" filename so we can show renames.\n        filename = match.group(2)\n        svndiff.append(\"Index: %s\\n\" % filename)\n        if match.group(1) != match.group(2):\n          self.renames[match.group(2)] = match.group(1)\n      else:\n        # The \"index\" line in a git diff looks like this (long hashes elided):\n        #   index 82c0d44..b2cee3f 100755\n        # We want to save the left hash, as that identifies the base file.\n        match = re.match(r\"index (\\w+)\\.\\.(\\w+)\", line)\n        if match:\n          before, after = (match.group(1), match.group(2))\n          if before == NULL_HASH:\n            before = None\n          if after == NULL_HASH:\n            after = None\n          self.hashes[filename] = (before, after)\n      svndiff.append(line + \"\\n\")\n    if not filecount:\n      ErrorExit(\"No valid patches found in output from git diff\")\n    # Add auto property for the last seen file.\n    assert filename is not None\n    AddSubversionPropertyChange(filename)\n    return \"\".join(svndiff)\n\n  def GenerateDiff(self, extra_args):\n    extra_args = extra_args[:]\n    if self.options.revision:\n      if \":\" in self.options.revision:\n        extra_args = self.options.revision.split(\":\", 1) + extra_args\n      else:\n        extra_args = [self.options.revision] + extra_args\n\n    # --no-ext-diff is broken in some versions of Git, so try to work around\n    # this by overriding the environment (but there is still a problem if the\n    # git config key \"diff.external\" is used).\n    env = os.environ.copy()\n    if \"GIT_EXTERNAL_DIFF\" in env:\n      del env[\"GIT_EXTERNAL_DIFF\"]\n    # -M/-C will not print the diff for the deleted file when a file is renamed.\n    # This is confusing because the original file will not be shown on the\n    # review when a file is renamed. So, get a diff with ONLY deletes, then\n    # append a diff (with rename detection), without deletes.\n    cmd = [\n        \"git\", \"diff\", \"--no-color\", \"--no-ext-diff\", \"--full-index\",\n        \"--ignore-submodules\",\n    ]\n    diff = RunShell(\n        cmd + [\"--no-renames\", \"--diff-filter=D\"] + extra_args,\n        env=env, silent_ok=True)\n    if self.options.git_find_copies:\n      similarity_options = [\"--find-copies-harder\", \"-l100000\",\n                            \"-C%s\" % self.options.git_similarity ]\n    else:\n      similarity_options = [\"-M%s\" % self.options.git_similarity ]\n    diff += RunShell(\n        cmd + [\"--diff-filter=AMCRT\"] + similarity_options + extra_args,\n        env=env, silent_ok=True)\n\n    # The CL could be only file deletion or not. So accept silent diff for both\n    # commands then check for an empty diff manually.\n    if not diff:\n      ErrorExit(\"No output from %s\" % (cmd + extra_args))\n    return diff\n\n  def GetUnknownFiles(self):\n    status = RunShell([\"git\", \"ls-files\", \"--exclude-standard\", \"--others\"],\n                      silent_ok=True)\n    return status.splitlines()\n\n  def GetFileContent(self, file_hash, is_binary):\n    \"\"\"Returns the content of a file identified by its git hash.\"\"\"\n    data, retcode = RunShellWithReturnCode([\"git\", \"show\", file_hash],\n                                            universal_newlines=not is_binary)\n    if retcode:\n      ErrorExit(\"Got error status from 'git show %s'\" % file_hash)\n    return data\n\n  def GetBaseFile(self, filename):\n    hash_before, hash_after = self.hashes.get(filename, (None,None))\n    base_content = None\n    new_content = None\n    status = None\n\n    if filename in self.renames:\n      status = \"A +\"  # Match svn attribute name for renames.\n      if filename not in self.hashes:\n        # If a rename doesn't change the content, we never get a hash.\n        base_content = RunShell(\n            [\"git\", \"show\", \"HEAD:\" + filename], silent_ok=True)\n    elif not hash_before:\n      status = \"A\"\n      base_content = \"\"\n    elif not hash_after:\n      status = \"D\"\n    else:\n      status = \"M\"\n\n    is_binary = self.IsBinaryData(base_content)\n    is_image = self.IsImage(filename)\n\n    # Grab the before/after content if we need it.\n    # Grab the base content if we don't have it already.\n    if base_content is None and hash_before:\n      base_content = self.GetFileContent(hash_before, is_binary)\n    # Only include the \"after\" file if it's an image; otherwise it\n    # it is reconstructed from the diff.\n    if is_image and hash_after:\n      new_content = self.GetFileContent(hash_after, is_binary)\n\n    return (base_content, new_content, is_binary, status)\n\n\nclass CVSVCS(VersionControlSystem):\n  \"\"\"Implementation of the VersionControlSystem interface for CVS.\"\"\"\n\n  def __init__(self, options):\n    super(CVSVCS, self).__init__(options)\n\n  def GetGUID(self):\n    \"\"\"For now we don't know how to get repository ID for CVS\"\"\"\n    return\n\n  def GetOriginalContent_(self, filename):\n    RunShell([\"cvs\", \"up\", filename], silent_ok=True)\n    # TODO need detect file content encoding\n    content = open(filename).read()\n    return content.replace(\"\\r\\n\", \"\\n\")\n\n  def GetBaseFile(self, filename):\n    base_content = None\n    new_content = None\n    status = \"A\"\n\n    output, retcode = RunShellWithReturnCode([\"cvs\", \"status\", filename])\n    if retcode:\n      ErrorExit(\"Got error status from 'cvs status %s'\" % filename)\n\n    if output.find(\"Status: Locally Modified\") != -1:\n      status = \"M\"\n      temp_filename = \"%s.tmp123\" % filename\n      os.rename(filename, temp_filename)\n      base_content = self.GetOriginalContent_(filename)\n      os.rename(temp_filename, filename)\n    elif output.find(\"Status: Locally Added\"):\n      status = \"A\"\n      base_content = \"\"\n    elif output.find(\"Status: Needs Checkout\"):\n      status = \"D\"\n      base_content = self.GetOriginalContent_(filename)\n\n    return (base_content, new_content, self.IsBinaryData(base_content), status)\n\n  def GenerateDiff(self, extra_args):\n    cmd = [\"cvs\", \"diff\", \"-u\", \"-N\"]\n    if self.options.revision:\n      cmd += [\"-r\", self.options.revision]\n\n    cmd.extend(extra_args)\n    data, retcode = RunShellWithReturnCode(cmd)\n    count = 0\n    if retcode in [0, 1]:\n      for line in data.splitlines():\n        if line.startswith(\"Index:\"):\n          count += 1\n          logging.info(line)\n\n    if not count:\n      ErrorExit(\"No valid patches found in output from cvs diff\")\n\n    return data\n\n  def GetUnknownFiles(self):\n    data, retcode = RunShellWithReturnCode([\"cvs\", \"diff\"])\n    if retcode not in [0, 1]:\n      ErrorExit(\"Got error status from 'cvs diff':\\n%s\" % (data,))\n    unknown_files = []\n    for line in data.split(\"\\n\"):\n      if line and line[0] == \"?\":\n        unknown_files.append(line)\n    return unknown_files\n\nclass MercurialVCS(VersionControlSystem):\n  \"\"\"Implementation of the VersionControlSystem interface for Mercurial.\"\"\"\n\n  def __init__(self, options, repo_dir):\n    super(MercurialVCS, self).__init__(options)\n    # Absolute path to repository (we can be in a subdir)\n    self.repo_dir = os.path.normpath(repo_dir)\n    # Compute the subdir\n    cwd = os.path.normpath(os.getcwd())\n    assert cwd.startswith(self.repo_dir)\n    self.subdir = cwd[len(self.repo_dir):].lstrip(r\"\\/\")\n    if self.options.revision:\n      self.base_rev = self.options.revision\n    else:\n      self.base_rev = RunShell([\"hg\", \"parent\", \"-q\"]).split(':')[1].strip()\n\n  def GetGUID(self):\n    # See chapter \"Uniquely identifying a repository\"\n    # http://hgbook.red-bean.com/read/customizing-the-output-of-mercurial.html\n    info = RunShell(\"hg log -r0 --template {node}\".split())\n    return info.strip()\n\n  def _GetRelPath(self, filename):\n    \"\"\"Get relative path of a file according to the current directory,\n    given its logical path in the repo.\"\"\"\n    absname = os.path.join(self.repo_dir, filename)\n    return os.path.relpath(absname)\n\n  def GenerateDiff(self, extra_args):\n    cmd = [\"hg\", \"diff\", \"--git\", \"-r\", self.base_rev] + extra_args\n    data = RunShell(cmd, silent_ok=True)\n    svndiff = []\n    filecount = 0\n    for line in data.splitlines():\n      m = re.match(\"diff --git a/(\\S+) b/(\\S+)\", line)\n      if m:\n        # Modify line to make it look like as it comes from svn diff.\n        # With this modification no changes on the server side are required\n        # to make upload.py work with Mercurial repos.\n        # NOTE: for proper handling of moved/copied files, we have to use\n        # the second filename.\n        filename = m.group(2)\n        svndiff.append(\"Index: %s\" % filename)\n        svndiff.append(\"=\" * 67)\n        filecount += 1\n        logging.info(line)\n      else:\n        svndiff.append(line)\n    if not filecount:\n      ErrorExit(\"No valid patches found in output from hg diff\")\n    return \"\\n\".join(svndiff) + \"\\n\"\n\n  def GetUnknownFiles(self):\n    \"\"\"Return a list of files unknown to the VCS.\"\"\"\n    args = []\n    status = RunShell([\"hg\", \"status\", \"--rev\", self.base_rev, \"-u\", \".\"],\n        silent_ok=True)\n    unknown_files = []\n    for line in status.splitlines():\n      st, fn = line.split(\" \", 1)\n      if st == \"?\":\n        unknown_files.append(fn)\n    return unknown_files\n\n  def GetBaseFile(self, filename):\n    # \"hg status\" and \"hg cat\" both take a path relative to the current subdir,\n    # but \"hg diff\" has given us the path relative to the repo root.\n    base_content = \"\"\n    new_content = None\n    is_binary = False\n    oldrelpath = relpath = self._GetRelPath(filename)\n    # \"hg status -C\" returns two lines for moved/copied files, one otherwise\n    out = RunShell([\"hg\", \"status\", \"-C\", \"--rev\", self.base_rev, relpath])\n    out = out.splitlines()\n    # HACK: strip error message about missing file/directory if it isn't in\n    # the working copy\n    if out[0].startswith('%s: ' % relpath):\n      out = out[1:]\n    status, _ = out[0].split(' ', 1)\n    if len(out) > 1 and status == \"A\":\n      # Moved/copied => considered as modified, use old filename to\n      # retrieve base contents\n      oldrelpath = out[1].strip()\n      status = \"M\"\n    if \":\" in self.base_rev:\n      base_rev = self.base_rev.split(\":\", 1)[0]\n    else:\n      base_rev = self.base_rev\n    if status != \"A\":\n      base_content = RunShell([\"hg\", \"cat\", \"-r\", base_rev, oldrelpath],\n        silent_ok=True)\n      is_binary = self.IsBinaryData(base_content)\n    if status != \"R\":\n      new_content = open(relpath, \"rb\").read()\n      is_binary = is_binary or self.IsBinaryData(new_content)\n    if is_binary and base_content:\n      # Fetch again without converting newlines\n      base_content = RunShell([\"hg\", \"cat\", \"-r\", base_rev, oldrelpath],\n        silent_ok=True, universal_newlines=False)\n    if not is_binary:\n      new_content = None\n    return base_content, new_content, is_binary, status\n\n\nclass PerforceVCS(VersionControlSystem):\n  \"\"\"Implementation of the VersionControlSystem interface for Perforce.\"\"\"\n\n  def __init__(self, options):\n\n    def ConfirmLogin():\n      # Make sure we have a valid perforce session\n      while True:\n        data, retcode = self.RunPerforceCommandWithReturnCode(\n            [\"login\", \"-s\"], marshal_output=True)\n        if not data:\n          ErrorExit(\"Error checking perforce login\")\n        if not retcode and (not \"code\" in data or data[\"code\"] != \"error\"):\n          break\n        print \"Enter perforce password: \"\n        self.RunPerforceCommandWithReturnCode([\"login\"])\n\n    super(PerforceVCS, self).__init__(options)\n\n    self.p4_changelist = options.p4_changelist\n    if not self.p4_changelist:\n      ErrorExit(\"A changelist id is required\")\n    if (options.revision):\n      ErrorExit(\"--rev is not supported for perforce\")\n\n    self.p4_port = options.p4_port\n    self.p4_client = options.p4_client\n    self.p4_user = options.p4_user\n\n    ConfirmLogin()\n\n    if not options.title:\n      description = self.RunPerforceCommand([\"describe\", self.p4_changelist],\n                                            marshal_output=True)\n      if description and \"desc\" in description:\n        # Rietveld doesn't support multi-line descriptions\n        raw_title = description[\"desc\"].strip()\n        lines = raw_title.splitlines()\n        if len(lines):\n          options.title = lines[0]\n\n  def GetGUID(self):\n    \"\"\"For now we don't know how to get repository ID for Perforce\"\"\"\n    return\n\n  def RunPerforceCommandWithReturnCode(self, extra_args, marshal_output=False,\n                                       universal_newlines=True):\n    args = [\"p4\"]\n    if marshal_output:\n      # -G makes perforce format its output as marshalled python objects\n      args.extend([\"-G\"])\n    if self.p4_port:\n      args.extend([\"-p\", self.p4_port])\n    if self.p4_client:\n      args.extend([\"-c\", self.p4_client])\n    if self.p4_user:\n      args.extend([\"-u\", self.p4_user])\n    args.extend(extra_args)\n\n    data, retcode = RunShellWithReturnCode(\n        args, print_output=False, universal_newlines=universal_newlines)\n    if marshal_output and data:\n      data = marshal.loads(data)\n    return data, retcode\n\n  def RunPerforceCommand(self, extra_args, marshal_output=False,\n                         universal_newlines=True):\n    # This might be a good place to cache call results, since things like\n    # describe or fstat might get called repeatedly.\n    data, retcode = self.RunPerforceCommandWithReturnCode(\n        extra_args, marshal_output, universal_newlines)\n    if retcode:\n      ErrorExit(\"Got error status from %s:\\n%s\" % (extra_args, data))\n    return data\n\n  def GetFileProperties(self, property_key_prefix = \"\", command = \"describe\"):\n    description = self.RunPerforceCommand([\"describe\", self.p4_changelist],\n                                          marshal_output=True)\n\n    changed_files = {}\n    file_index = 0\n    # Try depotFile0, depotFile1, ... until we don't find a match\n    while True:\n      file_key = \"depotFile%d\" % file_index\n      if file_key in description:\n        filename = description[file_key]\n        change_type = description[property_key_prefix + str(file_index)]\n        changed_files[filename] = change_type\n        file_index += 1\n      else:\n        break\n    return changed_files\n\n  def GetChangedFiles(self):\n    return self.GetFileProperties(\"action\")\n\n  def GetUnknownFiles(self):\n    # Perforce doesn't detect new files, they have to be explicitly added\n    return []\n\n  def IsBaseBinary(self, filename):\n    base_filename = self.GetBaseFilename(filename)\n    return self.IsBinaryHelper(base_filename, \"files\")\n\n  def IsPendingBinary(self, filename):\n    return self.IsBinaryHelper(filename, \"describe\")\n\n  def IsBinaryHelper(self, filename, command):\n    file_types = self.GetFileProperties(\"type\", command)\n    if not filename in file_types:\n      ErrorExit(\"Trying to check binary status of unknown file %s.\" % filename)\n    # This treats symlinks, macintosh resource files, temporary objects, and\n    # unicode as binary. See the Perforce docs for more details:\n    # http://www.perforce.com/perforce/doc.current/manuals/cmdref/o.ftypes.html\n    return not file_types[filename].endswith(\"text\")\n\n  def GetFileContent(self, filename, revision, is_binary):\n    file_arg = filename\n    if revision:\n      file_arg += \"#\" + revision\n    # -q suppresses the initial line that displays the filename and revision\n    return self.RunPerforceCommand([\"print\", \"-q\", file_arg],\n                                   universal_newlines=not is_binary)\n\n  def GetBaseFilename(self, filename):\n    actionsWithDifferentBases = [\n        \"move/add\", # p4 move\n        \"branch\", # p4 integrate (to a new file), similar to hg \"add\"\n        \"add\", # p4 integrate (to a new file), after modifying the new file\n    ]\n\n    # We only see a different base for \"add\" if this is a downgraded branch\n    # after a file was branched (integrated), then edited.\n    if self.GetAction(filename) in actionsWithDifferentBases:\n      # -Or shows information about pending integrations/moves\n      fstat_result = self.RunPerforceCommand([\"fstat\", \"-Or\", filename],\n                                             marshal_output=True)\n\n      baseFileKey = \"resolveFromFile0\" # I think it's safe to use only file0\n      if baseFileKey in fstat_result:\n        return fstat_result[baseFileKey]\n\n    return filename\n\n  def GetBaseRevision(self, filename):\n    base_filename = self.GetBaseFilename(filename)\n\n    have_result = self.RunPerforceCommand([\"have\", base_filename],\n                                          marshal_output=True)\n    if \"haveRev\" in have_result:\n      return have_result[\"haveRev\"]\n\n  def GetLocalFilename(self, filename):\n    where = self.RunPerforceCommand([\"where\", filename], marshal_output=True)\n    if \"path\" in where:\n      return where[\"path\"]\n\n  def GenerateDiff(self, args):\n    class DiffData:\n      def __init__(self, perforceVCS, filename, action):\n        self.perforceVCS = perforceVCS\n        self.filename = filename\n        self.action = action\n        self.base_filename = perforceVCS.GetBaseFilename(filename)\n\n        self.file_body = None\n        self.base_rev = None\n        self.prefix = None\n        self.working_copy = True\n        self.change_summary = None\n\n    def GenerateDiffHeader(diffData):\n      header = []\n      header.append(\"Index: %s\" % diffData.filename)\n      header.append(\"=\" * 67)\n\n      if diffData.base_filename != diffData.filename:\n        if diffData.action.startswith(\"move\"):\n          verb = \"rename\"\n        else:\n          verb = \"copy\"\n        header.append(\"%s from %s\" % (verb, diffData.base_filename))\n        header.append(\"%s to %s\" % (verb, diffData.filename))\n\n      suffix = \"\\t(revision %s)\" % diffData.base_rev\n      header.append(\"--- \" + diffData.base_filename + suffix)\n      if diffData.working_copy:\n        suffix = \"\\t(working copy)\"\n      header.append(\"+++ \" + diffData.filename + suffix)\n      if diffData.change_summary:\n        header.append(diffData.change_summary)\n      return header\n\n    def GenerateMergeDiff(diffData, args):\n      # -du generates a unified diff, which is nearly svn format\n      diffData.file_body = self.RunPerforceCommand(\n          [\"diff\", \"-du\", diffData.filename] + args)\n      diffData.base_rev = self.GetBaseRevision(diffData.filename)\n      diffData.prefix = \"\"\n\n      # We have to replace p4's file status output (the lines starting\n      # with +++ or ---) to match svn's diff format\n      lines = diffData.file_body.splitlines()\n      first_good_line = 0\n      while (first_good_line < len(lines) and\n            not lines[first_good_line].startswith(\"@@\")):\n        first_good_line += 1\n      diffData.file_body = \"\\n\".join(lines[first_good_line:])\n      return diffData\n\n    def GenerateAddDiff(diffData):\n      fstat = self.RunPerforceCommand([\"fstat\", diffData.filename],\n                                      marshal_output=True)\n      if \"headRev\" in fstat:\n        diffData.base_rev = fstat[\"headRev\"] # Re-adding a deleted file\n      else:\n        diffData.base_rev = \"0\" # Brand new file\n      diffData.working_copy = False\n      rel_path = self.GetLocalFilename(diffData.filename)\n      diffData.file_body = open(rel_path, 'r').read()\n      # Replicate svn's list of changed lines\n      line_count = len(diffData.file_body.splitlines())\n      diffData.change_summary = \"@@ -0,0 +1\"\n      if line_count > 1:\n          diffData.change_summary += \",%d\" % line_count\n      diffData.change_summary += \" @@\"\n      diffData.prefix = \"+\"\n      return diffData\n\n    def GenerateDeleteDiff(diffData):\n      diffData.base_rev = self.GetBaseRevision(diffData.filename)\n      is_base_binary = self.IsBaseBinary(diffData.filename)\n      # For deletes, base_filename == filename\n      diffData.file_body = self.GetFileContent(diffData.base_filename,\n          None,\n          is_base_binary)\n      # Replicate svn's list of changed lines\n      line_count = len(diffData.file_body.splitlines())\n      diffData.change_summary = \"@@ -1\"\n      if line_count > 1:\n        diffData.change_summary += \",%d\" % line_count\n      diffData.change_summary += \" +0,0 @@\"\n      diffData.prefix = \"-\"\n      return diffData\n\n    changed_files = self.GetChangedFiles()\n\n    svndiff = []\n    filecount = 0\n    for (filename, action) in changed_files.items():\n      svn_status = self.PerforceActionToSvnStatus(action)\n      if svn_status == \"SKIP\":\n        continue\n\n      diffData = DiffData(self, filename, action)\n      # Is it possible to diff a branched file? Stackoverflow says no:\n      # http://stackoverflow.com/questions/1771314/in-perforce-command-line-how-to-diff-a-file-reopened-for-add\n      if svn_status == \"M\":\n        diffData = GenerateMergeDiff(diffData, args)\n      elif svn_status == \"A\":\n        diffData = GenerateAddDiff(diffData)\n      elif svn_status == \"D\":\n        diffData = GenerateDeleteDiff(diffData)\n      else:\n        ErrorExit(\"Unknown file action %s (svn action %s).\" % \\\n                  (action, svn_status))\n\n      svndiff += GenerateDiffHeader(diffData)\n\n      for line in diffData.file_body.splitlines():\n        svndiff.append(diffData.prefix + line)\n      filecount += 1\n    if not filecount:\n      ErrorExit(\"No valid patches found in output from p4 diff\")\n    return \"\\n\".join(svndiff) + \"\\n\"\n\n  def PerforceActionToSvnStatus(self, status):\n    # Mirroring the list at http://permalink.gmane.org/gmane.comp.version-control.mercurial.devel/28717\n    # Is there something more official?\n    return {\n            \"add\" : \"A\",\n            \"branch\" : \"A\",\n            \"delete\" : \"D\",\n            \"edit\" : \"M\", # Also includes changing file types.\n            \"integrate\" : \"M\",\n            \"move/add\" : \"M\",\n            \"move/delete\": \"SKIP\",\n            \"purge\" : \"D\", # How does a file's status become \"purge\"?\n            }[status]\n\n  def GetAction(self, filename):\n    changed_files = self.GetChangedFiles()\n    if not filename in changed_files:\n      ErrorExit(\"Trying to get base version of unknown file %s.\" % filename)\n\n    return changed_files[filename]\n\n  def GetBaseFile(self, filename):\n    base_filename = self.GetBaseFilename(filename)\n    base_content = \"\"\n    new_content = None\n\n    status = self.PerforceActionToSvnStatus(self.GetAction(filename))\n\n    if status != \"A\":\n      revision = self.GetBaseRevision(base_filename)\n      if not revision:\n        ErrorExit(\"Couldn't find base revision for file %s\" % filename)\n      is_base_binary = self.IsBaseBinary(base_filename)\n      base_content = self.GetFileContent(base_filename,\n                                         revision,\n                                         is_base_binary)\n\n    is_binary = self.IsPendingBinary(filename)\n    if status != \"D\" and status != \"SKIP\":\n      relpath = self.GetLocalFilename(filename)\n      if is_binary:\n        new_content = open(relpath, \"rb\").read()\n\n    return base_content, new_content, is_binary, status\n\n# NOTE: The SplitPatch function is duplicated in engine.py, keep them in sync.\ndef SplitPatch(data):\n  \"\"\"Splits a patch into separate pieces for each file.\n\n  Args:\n    data: A string containing the output of svn diff.\n\n  Returns:\n    A list of 2-tuple (filename, text) where text is the svn diff output\n      pertaining to filename.\n  \"\"\"\n  patches = []\n  filename = None\n  diff = []\n  for line in data.splitlines(True):\n    new_filename = None\n    if line.startswith('Index:'):\n      unused, new_filename = line.split(':', 1)\n      new_filename = new_filename.strip()\n    elif line.startswith('Property changes on:'):\n      unused, temp_filename = line.split(':', 1)\n      # When a file is modified, paths use '/' between directories, however\n      # when a property is modified '\\' is used on Windows.  Make them the same\n      # otherwise the file shows up twice.\n      temp_filename = temp_filename.strip().replace('\\\\', '/')\n      if temp_filename != filename:\n        # File has property changes but no modifications, create a new diff.\n        new_filename = temp_filename\n    if new_filename:\n      if filename and diff:\n        patches.append((filename, ''.join(diff)))\n      filename = new_filename\n      diff = [line]\n      continue\n    if diff is not None:\n      diff.append(line)\n  if filename and diff:\n    patches.append((filename, ''.join(diff)))\n  return patches\n\n\ndef UploadSeparatePatches(issue, rpc_server, patchset, data, options):\n  \"\"\"Uploads a separate patch for each file in the diff output.\n\n  Returns a list of [patch_key, filename] for each file.\n  \"\"\"\n  patches = SplitPatch(data)\n  rv = []\n  for patch in patches:\n    if len(patch[1]) > MAX_UPLOAD_SIZE:\n      print (\"Not uploading the patch for \" + patch[0] +\n             \" because the file is too large.\")\n      continue\n    form_fields = [(\"filename\", patch[0])]\n    if not options.download_base:\n      form_fields.append((\"content_upload\", \"1\"))\n    files = [(\"data\", \"data.diff\", patch[1])]\n    ctype, body = EncodeMultipartFormData(form_fields, files)\n    url = \"/%d/upload_patch/%d\" % (int(issue), int(patchset))\n    print \"Uploading patch for \" + patch[0]\n    response_body = rpc_server.Send(url, body, content_type=ctype)\n    lines = response_body.splitlines()\n    if not lines or lines[0] != \"OK\":\n      StatusUpdate(\"  --> %s\" % response_body)\n      sys.exit(1)\n    rv.append([lines[1], patch[0]])\n  return rv\n\n\ndef GuessVCSName(options):\n  \"\"\"Helper to guess the version control system.\n\n  This examines the current directory, guesses which VersionControlSystem\n  we're using, and returns an string indicating which VCS is detected.\n\n  Returns:\n    A pair (vcs, output).  vcs is a string indicating which VCS was detected\n    and is one of VCS_GIT, VCS_MERCURIAL, VCS_SUBVERSION, VCS_PERFORCE,\n    VCS_CVS, or VCS_UNKNOWN.\n    Since local perforce repositories can't be easily detected, this method\n    will only guess VCS_PERFORCE if any perforce options have been specified.\n    output is a string containing any interesting output from the vcs\n    detection routine, or None if there is nothing interesting.\n  \"\"\"\n  for attribute, value in options.__dict__.iteritems():\n    if attribute.startswith(\"p4\") and value != None:\n      return (VCS_PERFORCE, None)\n\n  def RunDetectCommand(vcs_type, command):\n    \"\"\"Helper to detect VCS by executing command.\n\n    Returns:\n       A pair (vcs, output) or None. Throws exception on error.\n    \"\"\"\n    try:\n      out, returncode = RunShellWithReturnCode(command)\n      if returncode == 0:\n        return (vcs_type, out.strip())\n    except OSError, (errcode, message):\n      if errcode != errno.ENOENT:  # command not found code\n        raise\n\n  # Mercurial has a command to get the base directory of a repository\n  # Try running it, but don't die if we don't have hg installed.\n  # NOTE: we try Mercurial first as it can sit on top of an SVN working copy.\n  res = RunDetectCommand(VCS_MERCURIAL, [\"hg\", \"root\"])\n  if res != None:\n    return res\n\n  # Subversion from 1.7 has a single centralized .svn folder\n  # ( see http://subversion.apache.org/docs/release-notes/1.7.html#wc-ng )\n  # That's why we use 'svn info' instead of checking for .svn dir\n  res = RunDetectCommand(VCS_SUBVERSION, [\"svn\", \"info\"])\n  if res != None:\n    return res\n\n  # Git has a command to test if you're in a git tree.\n  # Try running it, but don't die if we don't have git installed.\n  res = RunDetectCommand(VCS_GIT, [\"git\", \"rev-parse\",\n                                   \"--is-inside-work-tree\"])\n  if res != None:\n    return res\n\n  # detect CVS repos use `cvs status && $? == 0` rules\n  res = RunDetectCommand(VCS_CVS, [\"cvs\", \"status\"])\n  if res != None:\n    return res\n\n  return (VCS_UNKNOWN, None)\n\n\ndef GuessVCS(options):\n  \"\"\"Helper to guess the version control system.\n\n  This verifies any user-specified VersionControlSystem (by command line\n  or environment variable).  If the user didn't specify one, this examines\n  the current directory, guesses which VersionControlSystem we're using,\n  and returns an instance of the appropriate class.  Exit with an error\n  if we can't figure it out.\n\n  Returns:\n    A VersionControlSystem instance. Exits if the VCS can't be guessed.\n  \"\"\"\n  vcs = options.vcs\n  if not vcs:\n    vcs = os.environ.get(\"CODEREVIEW_VCS\")\n  if vcs:\n    v = VCS_ABBREVIATIONS.get(vcs.lower())\n    if v is None:\n      ErrorExit(\"Unknown version control system %r specified.\" % vcs)\n    (vcs, extra_output) = (v, None)\n  else:\n    (vcs, extra_output) = GuessVCSName(options)\n\n  if vcs == VCS_MERCURIAL:\n    if extra_output is None:\n      extra_output = RunShell([\"hg\", \"root\"]).strip()\n    return MercurialVCS(options, extra_output)\n  elif vcs == VCS_SUBVERSION:\n    return SubversionVCS(options)\n  elif vcs == VCS_PERFORCE:\n    return PerforceVCS(options)\n  elif vcs == VCS_GIT:\n    return GitVCS(options)\n  elif vcs == VCS_CVS:\n    return CVSVCS(options)\n\n  ErrorExit((\"Could not guess version control system. \"\n             \"Are you in a working copy directory?\"))\n\n\ndef CheckReviewer(reviewer):\n  \"\"\"Validate a reviewer -- either a nickname or an email addres.\n\n  Args:\n    reviewer: A nickname or an email address.\n\n  Calls ErrorExit() if it is an invalid email address.\n  \"\"\"\n  if \"@\" not in reviewer:\n    return  # Assume nickname\n  parts = reviewer.split(\"@\")\n  if len(parts) > 2:\n    ErrorExit(\"Invalid email address: %r\" % reviewer)\n  assert len(parts) == 2\n  if \".\" not in parts[1]:\n    ErrorExit(\"Invalid email address: %r\" % reviewer)\n\n\ndef LoadSubversionAutoProperties():\n  \"\"\"Returns the content of [auto-props] section of Subversion's config file as\n  a dictionary.\n\n  Returns:\n    A dictionary whose key-value pair corresponds the [auto-props] section's\n      key-value pair.\n    In following cases, returns empty dictionary:\n      - config file doesn't exist, or\n      - 'enable-auto-props' is not set to 'true-like-value' in [miscellany].\n  \"\"\"\n  if os.name == 'nt':\n    subversion_config = os.environ.get(\"APPDATA\") + \"\\\\Subversion\\\\config\"\n  else:\n    subversion_config = os.path.expanduser(\"~/.subversion/config\")\n  if not os.path.exists(subversion_config):\n    return {}\n  config = ConfigParser.ConfigParser()\n  config.read(subversion_config)\n  if (config.has_section(\"miscellany\") and\n      config.has_option(\"miscellany\", \"enable-auto-props\") and\n      config.getboolean(\"miscellany\", \"enable-auto-props\") and\n      config.has_section(\"auto-props\")):\n    props = {}\n    for file_pattern in config.options(\"auto-props\"):\n      props[file_pattern] = ParseSubversionPropertyValues(\n        config.get(\"auto-props\", file_pattern))\n    return props\n  else:\n    return {}\n\ndef ParseSubversionPropertyValues(props):\n  \"\"\"Parse the given property value which comes from [auto-props] section and\n  returns a list whose element is a (svn_prop_key, svn_prop_value) pair.\n\n  See the following doctest for example.\n\n  >>> ParseSubversionPropertyValues('svn:eol-style=LF')\n  [('svn:eol-style', 'LF')]\n  >>> ParseSubversionPropertyValues('svn:mime-type=image/jpeg')\n  [('svn:mime-type', 'image/jpeg')]\n  >>> ParseSubversionPropertyValues('svn:eol-style=LF;svn:executable')\n  [('svn:eol-style', 'LF'), ('svn:executable', '*')]\n  \"\"\"\n  key_value_pairs = []\n  for prop in props.split(\";\"):\n    key_value = prop.split(\"=\")\n    assert len(key_value) <= 2\n    if len(key_value) == 1:\n      # If value is not given, use '*' as a Subversion's convention.\n      key_value_pairs.append((key_value[0], \"*\"))\n    else:\n      key_value_pairs.append((key_value[0], key_value[1]))\n  return key_value_pairs\n\n\ndef GetSubversionPropertyChanges(filename):\n  \"\"\"Return a Subversion's 'Property changes on ...' string, which is used in\n  the patch file.\n\n  Args:\n    filename: filename whose property might be set by [auto-props] config.\n\n  Returns:\n    A string like 'Property changes on |filename| ...' if given |filename|\n      matches any entries in [auto-props] section. None, otherwise.\n  \"\"\"\n  global svn_auto_props_map\n  if svn_auto_props_map is None:\n    svn_auto_props_map = LoadSubversionAutoProperties()\n\n  all_props = []\n  for file_pattern, props in svn_auto_props_map.items():\n    if fnmatch.fnmatch(filename, file_pattern):\n      all_props.extend(props)\n  if all_props:\n    return FormatSubversionPropertyChanges(filename, all_props)\n  return None\n\n\ndef FormatSubversionPropertyChanges(filename, props):\n  \"\"\"Returns Subversion's 'Property changes on ...' strings using given filename\n  and properties.\n\n  Args:\n    filename: filename\n    props: A list whose element is a (svn_prop_key, svn_prop_value) pair.\n\n  Returns:\n    A string which can be used in the patch file for Subversion.\n\n  See the following doctest for example.\n\n  >>> print FormatSubversionPropertyChanges('foo.cc', [('svn:eol-style', 'LF')])\n  Property changes on: foo.cc\n  ___________________________________________________________________\n  Added: svn:eol-style\n     + LF\n  <BLANKLINE>\n  \"\"\"\n  prop_changes_lines = [\n    \"Property changes on: %s\" % filename,\n    \"___________________________________________________________________\"]\n  for key, value in props:\n    prop_changes_lines.append(\"Added: \" + key)\n    prop_changes_lines.append(\"   + \" + value)\n  return \"\\n\".join(prop_changes_lines) + \"\\n\"\n\n\ndef RealMain(argv, data=None):\n  \"\"\"The real main function.\n\n  Args:\n    argv: Command line arguments.\n    data: Diff contents. If None (default) the diff is generated by\n      the VersionControlSystem implementation returned by GuessVCS().\n\n  Returns:\n    A 2-tuple (issue id, patchset id).\n    The patchset id is None if the base files are not uploaded by this\n    script (applies only to SVN checkouts).\n  \"\"\"\n  options, args = parser.parse_args(argv[1:])\n  if options.help:\n    if options.verbose < 2:\n      # hide Perforce options\n      parser.epilog = \"Use '--help -v' to show additional Perforce options.\"\n      parser.option_groups.remove(parser.get_option_group('--p4_port'))\n    parser.print_help()\n    sys.exit(0)\n\n  global verbosity\n  verbosity = options.verbose\n  if verbosity >= 3:\n    logging.getLogger().setLevel(logging.DEBUG)\n  elif verbosity >= 2:\n    logging.getLogger().setLevel(logging.INFO)\n\n  vcs = GuessVCS(options)\n\n  base = options.base_url\n  if isinstance(vcs, SubversionVCS):\n    # Guessing the base field is only supported for Subversion.\n    # Note: Fetching base files may become deprecated in future releases.\n    guessed_base = vcs.GuessBase(options.download_base)\n    if base:\n      if guessed_base and base != guessed_base:\n        print \"Using base URL \\\"%s\\\" from --base_url instead of \\\"%s\\\"\" % \\\n            (base, guessed_base)\n    else:\n      base = guessed_base\n\n  if not base and options.download_base:\n    options.download_base = True\n    logging.info(\"Enabled upload of base file\")\n  if not options.assume_yes:\n    vcs.CheckForUnknownFiles()\n  if data is None:\n    data = vcs.GenerateDiff(args)\n  data = vcs.PostProcessDiff(data)\n  if options.print_diffs:\n    print \"Rietveld diff start:*****\"\n    print data\n    print \"Rietveld diff end:*****\"\n  files = vcs.GetBaseFiles(data)\n  if verbosity >= 1:\n    print \"Upload server:\", options.server, \"(change with -s/--server)\"\n  rpc_server = GetRpcServer(options.server,\n                            options.email,\n                            options.host,\n                            options.save_cookies,\n                            options.account_type)\n  form_fields = []\n\n  repo_guid = vcs.GetGUID()\n  if repo_guid:\n    form_fields.append((\"repo_guid\", repo_guid))\n  if base:\n    b = urlparse.urlparse(base)\n    username, netloc = urllib.splituser(b.netloc)\n    if username:\n      logging.info(\"Removed username from base URL\")\n      base = urlparse.urlunparse((b.scheme, netloc, b.path, b.params,\n                                  b.query, b.fragment))\n    form_fields.append((\"base\", base))\n  if options.issue:\n    form_fields.append((\"issue\", str(options.issue)))\n  if options.email:\n    form_fields.append((\"user\", options.email))\n  if options.reviewers:\n    for reviewer in options.reviewers.split(','):\n      CheckReviewer(reviewer)\n    form_fields.append((\"reviewers\", options.reviewers))\n  if options.cc:\n    for cc in options.cc.split(','):\n      CheckReviewer(cc)\n    form_fields.append((\"cc\", options.cc))\n\n  # Process --message, --title and --file.\n  message = options.message or \"\"\n  title = options.title or \"\"\n  if options.file:\n    if options.message:\n      ErrorExit(\"Can't specify both message and message file options\")\n    file = open(options.file, 'r')\n    message = file.read()\n    file.close()\n  if options.issue:\n    prompt = \"Title describing this patch set: \"\n  else:\n    prompt = \"New issue subject: \"\n  title = (\n      title or message.split('\\n', 1)[0].strip() or raw_input(prompt).strip())\n  if not title and not options.issue:\n    ErrorExit(\"A non-empty title is required for a new issue\")\n  # For existing issues, it's fine to give a patchset an empty name. Rietveld\n  # doesn't accept that so use a whitespace.\n  title = title or \" \"\n  if len(title) > 100:\n    title = title[:99] + '…'\n  if title and not options.issue:\n    message = message or title\n\n  form_fields.append((\"subject\", title))\n  # If it's a new issue send message as description. Otherwise a new\n  # message is created below on upload_complete.\n  if message and not options.issue:\n    form_fields.append((\"description\", message))\n\n  # Send a hash of all the base file so the server can determine if a copy\n  # already exists in an earlier patchset.\n  base_hashes = \"\"\n  for file, info in files.iteritems():\n    if not info[0] is None:\n      checksum = md5(info[0]).hexdigest()\n      if base_hashes:\n        base_hashes += \"|\"\n      base_hashes += checksum + \":\" + file\n  form_fields.append((\"base_hashes\", base_hashes))\n  if options.private:\n    if options.issue:\n      print \"Warning: Private flag ignored when updating an existing issue.\"\n    else:\n      form_fields.append((\"private\", \"1\"))\n  if options.send_patch:\n    options.send_mail = True\n  if not options.download_base:\n    form_fields.append((\"content_upload\", \"1\"))\n  if len(data) > MAX_UPLOAD_SIZE:\n    print \"Patch is large, so uploading file patches separately.\"\n    uploaded_diff_file = []\n    form_fields.append((\"separate_patches\", \"1\"))\n  else:\n    uploaded_diff_file = [(\"data\", \"data.diff\", data)]\n  ctype, body = EncodeMultipartFormData(form_fields, uploaded_diff_file)\n  response_body = rpc_server.Send(\"/upload\", body, content_type=ctype)\n  patchset = None\n  if not options.download_base or not uploaded_diff_file:\n    lines = response_body.splitlines()\n    if len(lines) >= 2:\n      msg = lines[0]\n      patchset = lines[1].strip()\n      patches = [x.split(\" \", 1) for x in lines[2:]]\n    else:\n      msg = response_body\n  else:\n    msg = response_body\n  StatusUpdate(msg)\n  if not response_body.startswith(\"Issue created.\") and \\\n  not response_body.startswith(\"Issue updated.\"):\n    sys.exit(0)\n  issue = msg[msg.rfind(\"/\")+1:]\n\n  if not uploaded_diff_file:\n    result = UploadSeparatePatches(issue, rpc_server, patchset, data, options)\n    if not options.download_base:\n      patches = result\n\n  if not options.download_base:\n    vcs.UploadBaseFiles(issue, rpc_server, patches, patchset, options, files)\n\n  payload = {}  # payload for final request\n  if options.send_mail:\n    payload[\"send_mail\"] = \"yes\"\n    if options.send_patch:\n      payload[\"attach_patch\"] = \"yes\"\n  if options.issue and message:\n    payload[\"message\"] = message\n  payload = urllib.urlencode(payload)\n  rpc_server.Send(\"/\" + issue + \"/upload_complete/\" + (patchset or \"\"),\n                  payload=payload)\n  return issue, patchset\n\n\ndef main():\n  try:\n    logging.basicConfig(format=(\"%(asctime).19s %(levelname)s %(filename)s:\"\n                                \"%(lineno)s %(message)s \"))\n    os.environ['LC_ALL'] = 'C'\n    RealMain(sys.argv)\n  except KeyboardInterrupt:\n    print\n    StatusUpdate(\"Interrupted.\")\n    sys.exit(1)\n\n\nif __name__ == \"__main__\":\n  main()\n"
  }
]